Configuration
SuperSats is configured entirely through environment variables. This page documents every variable available, grouped by concern.
Setting variables
For local development use a .env file at the project root. Copy .env.example as your starting point:
cp .env.example .envFor production set these variables in your hosting platform’s environment / secrets manager. Never commit .env to version control.
Application
| Variable | Required | Default | Description |
|---|---|---|---|
APP_NAME | No | SuperSats | Display name shown in the UI header |
APP_URL | Yes | — | Full public URL of your deployment (no trailing slash) |
PORT | No | 3000 | HTTP port the server listens on |
NODE_ENV | No | development | development or production |
Authentication
| Variable | Required | Default | Description |
|---|---|---|---|
SESSION_SECRET | Yes | — | Secret key used to sign session cookies — use a long random string |
SESSION_EXPIRY_HOURS | No | 24 | How long a session stays valid |
Generate a strong secret:
openssl rand -hex 32Database
| Variable | Required | Default | Description |
|---|---|---|---|
DATABASE_URL | Yes | — | Database connection string |
SQLite (local dev):
DATABASE_URL=file:./dev.dbPostgreSQL (production):
DATABASE_URL=postgresql://user:password@host:5432/supersatsLightning Network
| Variable | Required | Default | Description |
|---|---|---|---|
LIGHTNING_HOST | Yes | — | Hostname or IP of your Lightning node |
LIGHTNING_PORT | No | 10009 | gRPC port (LND default: 10009) |
LIGHTNING_MACAROON | Yes | — | Hex-encoded admin or invoice macaroon |
LIGHTNING_TLS_CERT_PATH | Yes | — | Path to the node’s TLS certificate |
LIGHTNING_NETWORK | No | mainnet | mainnet, testnet, or regtest |
LIGHTNING_MACAROON or your TLS certificate to version control. Use your platform’s secrets manager in production.Feature flags
| Variable | Required | Default | Description |
|---|---|---|---|
ENABLE_REGISTRATION | No | true | Allow new user sign-ups |
ENABLE_TESTNET | No | false | Show testnet indicators in the UI |
Cloudflare Pages deployment
SuperSats is designed to deploy as a static front-end + serverless backend on Cloudflare Pages. Add all the variables above in your Cloudflare Pages project settings under Settings → Environment variables.
The build command is:
npm run buildThe output directory is:
out/For the Cloudflare Pages wrangler.toml (if using Workers for the API layer), a starter config is included in the repo at wrangler.example.toml.