Skip to content
Configuration

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 .env

For production set these variables in your hosting platform’s environment / secrets manager. Never commit .env to version control.

Application

VariableRequiredDefaultDescription
APP_NAMENoSuperSatsDisplay name shown in the UI header
APP_URLYesFull public URL of your deployment (no trailing slash)
PORTNo3000HTTP port the server listens on
NODE_ENVNodevelopmentdevelopment or production

Authentication

VariableRequiredDefaultDescription
SESSION_SECRETYesSecret key used to sign session cookies — use a long random string
SESSION_EXPIRY_HOURSNo24How long a session stays valid

Generate a strong secret:

openssl rand -hex 32

Database

VariableRequiredDefaultDescription
DATABASE_URLYesDatabase connection string

SQLite (local dev):

DATABASE_URL=file:./dev.db

PostgreSQL (production):

DATABASE_URL=postgresql://user:password@host:5432/supersats

Lightning Network

VariableRequiredDefaultDescription
LIGHTNING_HOSTYesHostname or IP of your Lightning node
LIGHTNING_PORTNo10009gRPC port (LND default: 10009)
LIGHTNING_MACAROONYesHex-encoded admin or invoice macaroon
LIGHTNING_TLS_CERT_PATHYesPath to the node’s TLS certificate
LIGHTNING_NETWORKNomainnetmainnet, testnet, or regtest
Never commit LIGHTNING_MACAROON or your TLS certificate to version control. Use your platform’s secrets manager in production.

Feature flags

VariableRequiredDefaultDescription
ENABLE_REGISTRATIONNotrueAllow new user sign-ups
ENABLE_TESTNETNofalseShow 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 build

The 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.