Configuration reference

Everything is configured with environment variables, documented in .env.example. Copy that file to .env and adjust it for your deployment — and never commit .env.

Precedence

The file is loaded automatically at startup. Values already present in the real environment always win, so a host panel or container can override anything in .env.

Core settings

VariableDefaultDescription
PORT3000HTTP port for the application. The CloudPanel production deployment uses 3002.
DATA_DIR./dataPersistent data root: the database and uploaded files. Keep this outside the release directory so updates never overwrite user data, and back it up.
SESSION_SECRET—Required in production. A long random string used to sign session tokens.
NODE_ENVdevelopmentSet to production to require HTTPS cookies and reject default secrets.
TRUST_PROXY0Set 1 behind CloudPanel, nginx or another reverse proxy so client IPs and secure cookies behave correctly.
INSTANCE_NAMESimple Worship PresenterName shown in the interface and the health endpoint.
PUBLIC_URL—Public base URL of the instance, if any. Used to build links, including the mobile remote pairing link — set it to your LAN address on local-network-only installs.

Storage, uploads and registration

VariableDefaultDescription
DEFAULT_QUOTA_BYTES262144000Storage quota granted to each new account — 250 MB by default. Administrators can override it per account.
MAX_UPLOAD_BYTES262144000Largest single upload accepted. The reverse proxy body size limit must be at least this large.
IMPORT_MAX_BYTES2147483648Largest import package accepted — 2 GB by default, because a package can carry a whole church's media library. Individual files inside it are still checked against MAX_UPLOAD_BYTES.
ALLOW_REGISTRATION1Set to 0 to close public sign-ups on this instance. Existing accounts keep working.

How this relates to the hosted service

These are the software's shipped defaults for self-hosted instances. The hosted service at app.simpleworshippresenter.com sets its own limits — 25 MB of storage per account — and a self-hosted instance can use whatever values suit the church running it.

Logging and rate limits

VariableDefaultDescription
LOG_LEVELinfodebug, info, warn or error. Logs are structured JSON with request timing.
RATE_LIMIT_MAX_AUTH10Sign-in and setup attempts per minute per IP address.
RATE_LIMIT_MAX_WRITE240All other /api writes per minute per IP address.
RATE_LIMIT_MAX_PAIRING12Pairing attempts per minute per IP address, for the mobile remote.
RATE_LIMIT_MAX_REMOTE_COMMAND300Remote commands per minute per IP address.
PAIRING_COOLDOWN_SECONDS30Minimum gap between pairing codes for one account, so the pairing screen cannot be flooded. Set 0 to disable.

Exceeding a limit returns 429 with a Retry-After header.

Self-update settings

Self-update is enabled by default but is used on demand only: nothing is contacted and nothing runs until an administrator presses the button in the maintenance panel.

VariableDefaultDescription
UPDATE_CHECK_URLOfficial upstream release feedA JSON endpoint returning { version, notes, url }. GitHub release feeds work. Set empty to disable update checks.
UPDATE_COMMANDnode scripts/self-update.jsCommand run by “Run update”, in the application directory. Never user input. Set empty to disable self-update.
UPDATE_TIMEOUT_MS600000How long an update command may run before it is abandoned.
UPDATE_TARGET_DIR, UPDATE_REPO, UPDATE_REF, UPDATE_ARCHIVE_URL—Optional overrides for mirrors and air-gapped installs.

The default update script works with both git checkouts and deployments made by copying files, and never touches data/, uploads/, .env, node_modules or .git. See Administration — updates.

Generating a session secret

node -e "console.log(require('crypto').randomBytes(48).toString('hex'))"

Paste the output into SESSION_SECRET. Rotate it if it is ever exposed; rotating signs everyone out, which is usually what you want in that situation.

Production example

NODE_ENV=production
PORT=3002
DATA_DIR=/home/cloudpanel/htdocs/simple-worship-data
SESSION_SECRET=<48+ random hex characters>
TRUST_PROXY=1
INSTANCE_NAME=Simple Worship Presenter
PUBLIC_URL=https://app.simpleworshippresenter.com
DEFAULT_QUOTA_BYTES=262144000
MAX_UPLOAD_BYTES=262144000
ALLOW_REGISTRATION=1
LOG_LEVEL=info

The data directory

DATA_DIR/
  lumenstage-data.json     # users, presentations, plans, songs, media metadata
  uploads/                 # uploaded media files

Bytes and megabytes

Configuration values are exact bytes; the interface displays megabytes. 250 MB is 262144000 bytes (250 × 1024 × 1024), which is what the defaults use.