Open Source

Your Own Content Platform.
Powered by Lightning.

An open-source, white-labeled media app that lets anyone sell digital content with Bitcoin Lightning payments. Fork it, brand it, deploy it. SatsRail handles the payment rail — you own everything else.

MIT License
White-labeled
Non-custodial
AES-256 Encrypted

WordPress for Paid Content. But with Lightning.

One codebase. Infinite deployments. Each instance is a standalone platform with its own brand, domain, categories, and content library.

Fork & Deploy

Clone the repo, run Docker, and you have a content platform. Setup wizard gets you live in minutes. No infrastructure expertise needed.

White-Label Everything

Your name, your colors, your domain. Every deployment is fully branded. SatsRail branding never appears on your platform.

Lightning Payments

Customers pay over Lightning. Funds go directly to the creator's wallet. No intermediary ever touches the money.

How the Payment Flow Works

End-to-end encrypted. Non-custodial. Instant.

1

Upload & Encrypt

Creator uploads content. The media URL is encrypted with AES-256-GCM using a product-specific key from SatsRail.

2

Customer Pays

Customer clicks buy, scans a Lightning QR code, and pays. Sats go directly to the creator's wallet in seconds.

3

Key Delivered

SatsRail confirms payment and returns the decryption key plus a signed macaroon for persistent access.

4

Browser Decrypts

The browser decrypts the content URL client-side using Web Crypto API. The plain URL never touches the server.

Everything You Need to Run a Content Platform

Built-in admin dashboard, encryption, customer accounts, and more.

Multi-Format Content

Video, audio, articles, photo sets, podcasts. Host on your CDN (Bunny.net, Vimeo, YouTube unlisted) — the app encrypts the access URL, not the file.

Creator Channels

Each creator gets a branded channel page with bio, social links, and theme. Managed by you or fully independent with their own SatsRail keys.

AES-256-GCM Encryption

Media URLs encrypted at rest. Decryption keys only released after confirmed Lightning payment. Keys rotate per-product with automatic re-encryption.

Macaroon-Based Access

Every purchase returns a signed macaroon — a ticket that proves payment and grants re-access without re-paying. Configurable expiry (30 days, 90 days, lifetime).

Admin Dashboard

Manage channels, media, categories, team members, and instance settings. Role-based access for owners and managers.

Privacy-First Customers

Pseudonymous signup — nickname and password, no email required. Favorites, purchase history, payment-gated comments, and content flagging.

Modern Stack

Built with Tools Developers Already Know

No exotic frameworks. No vendor lock-in. Standard tools, clean architecture, strict TypeScript throughout.

Next.js 15 + App Router Server components, streaming, built-in API routes.
MongoDB + Mongoose Flexible document store. Works with Atlas or self-hosted.
Tailwind CSS v4 CSS variables for white-label theming. Fully responsive.
NextAuth.js v5 Credentials provider for staff and customers. Role-based middleware.

Deploy in 3 commands

$ git clone https://github.com/SatsRail/media.git
$ cp .env.docker.example .env
$ docker compose up -d

Setup wizard launches at localhost:3000

TypeScript React 19 Next.js 15 MongoDB Tailwind v4 Docker

Two Ways to Onboard Creators

Start managed. Graduate to independent. Or go direct from day one.

Managed Creators

You run the channel. The creator provides content and you handle uploads, pricing, and tech. Payments flow through your SatsRail account.

Operator controls everything
Creator just provides content
Best for non-technical creators

Independent Creators

Creator gets their own SatsRail API keys. Payments go directly to their wallet. Full dashboard access to manage their own channel.

Creator controls their channel
Payments go directly to their wallet
Can graduate from managed anytime

Sell Anything Digital

The media app is content-agnostic. What you sell is your business.

Video Creators

Premium video content, courses, behind-the-scenes footage. Host on Bunny.net or Vimeo, sell through your platform.

Musicians

Sell albums, exclusive tracks, live recordings. Direct to fans with instant payouts — no label, no distributor.

Educators

Gate tutorials, courses, and guides behind Lightning payments. No institutional platform taking a cut of your revenue.

Journalists

Sell investigative pieces, reports, and exclusive newsletters. Micropayments make per-article pricing viable.

Podcasters

Exclusive episodes, early access, ad-free feeds. Listeners pay per episode or per series — you set the terms.

Photographers

Sell photo sets, exclusive galleries, and high-resolution downloads. Payment unlocks the content — no DRM headaches.

Security

Encrypted at Rest. Decrypted in the Browser.

Content URLs are never exposed in API responses. Encrypted blobs are delivered to the browser on page load. The decryption key is only released after confirmed Lightning payment.

API keys encrypted at rest — sk_live_ keys stored with AES-256-GCM
Client-side decryption — Web Crypto API, plain URLs never hit the server
Macaroon verification — HMAC-SHA256 signed tickets for persistent access
Role-based access — owner and manager roles with middleware enforcement
AES-256-GCM

Military-grade encryption

Macaroons

Signed access tickets

Key Rotation

Auto re-encryption

Web Crypto

Browser-side decryption

Why Fork This Instead of Building from Scratch?

Zero Payment Risk No processor account to get banned from. No payment holds. No chargebacks. Lightning is final settlement.
Global Reach Lightning works worldwide. No geographic restrictions, no cross-border fees, no banking requirements.
Complete Control Own your domain, your database, your brand. Content policies are yours to set. SatsRail is just the payment rail.
Regulatory Isolation The operator owns content liability, not SatsRail. Like WordPress hosting a blog — the platform builder isn't responsible for content.
Instant Creator Payouts Sats arrive in the creator's wallet the moment a customer pays. No payout schedules, no minimum thresholds.
MIT Licensed Fork it, modify it, sell through it. No strings attached. The code is yours.

Deploy Your Way

Docker, Vercel, or bare metal. Your infrastructure, your choice.

Docker

Recommended

One command. Includes MongoDB, auto-generated secrets, and setup wizard. Production-ready with docker-compose.

docker compose up -d

Vercel

Low-ops

One-click deploy with MongoDB Atlas. Native Next.js runtime, edge functions, auto-scaling. Zero server management.

Connect MongoDB Atlas + deploy

Self-Hosted

Full control

Node.js + MongoDB on your own hardware. Full control over infrastructure, backups, and scaling.

npm run build && npm start

Powered by the SatsRail API

The media app consumes SatsRail's merchant API for product management, checkout sessions, encryption key delivery, and payment verification. You get a SatsRail API key, the app handles the rest.

Endpoint Purpose
POST /products Create product with auto-generated encryption key
GET /products/:id/key Fetch encryption key for media URL
POST /checkout/sessions Initiate Lightning payment checkout
POST /access/verify Verify macaroon, return decryption key
POST /rotate_key Rotate product key (triggers webhook)
Bitcoin

Build Your Content Platform.
Own Every Sat.

Open source. Non-custodial. Encrypted. White-labeled. Deploy in minutes.

MIT License • Next.js 15 • Docker ready • SatsRail API powered