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
| Variable | Default | Description |
|---|---|---|
PORT | 3000 | HTTP port for the application. The CloudPanel production deployment uses 3002. |
DATA_DIR | ./data | Persistent 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_ENV | development | Set to production to require HTTPS cookies and reject default secrets. |
TRUST_PROXY | 0 | Set 1 behind CloudPanel, nginx or another reverse proxy so client IPs and secure cookies behave correctly. |
INSTANCE_NAME | Simple Worship Presenter | Name 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
| Variable | Default | Description |
|---|---|---|
DEFAULT_QUOTA_BYTES | 262144000 | Storage quota granted to each new account — 250 MB by default. Administrators can override it per account. |
MAX_UPLOAD_BYTES | 262144000 | Largest single upload accepted. The reverse proxy body size limit must be at least this large. |
IMPORT_MAX_BYTES | 2147483648 | Largest 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_REGISTRATION | 1 | Set 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
| Variable | Default | Description |
|---|---|---|
LOG_LEVEL | info | debug, info, warn or error. Logs are structured JSON with request timing. |
RATE_LIMIT_MAX_AUTH | 10 | Sign-in and setup attempts per minute per IP address. |
RATE_LIMIT_MAX_WRITE | 240 | All other /api writes per minute per IP address. |
RATE_LIMIT_MAX_PAIRING | 12 | Pairing attempts per minute per IP address, for the mobile remote. |
RATE_LIMIT_MAX_REMOTE_COMMAND | 300 | Remote commands per minute per IP address. |
PAIRING_COOLDOWN_SECONDS | 30 | Minimum 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.
| Variable | Default | Description |
|---|---|---|
UPDATE_CHECK_URL | Official upstream release feed | A JSON endpoint returning { version, notes, url }. GitHub release feeds work. Set empty to disable update checks. |
UPDATE_COMMAND | node scripts/self-update.js | Command run by “Run update”, in the application directory. Never user input. Set empty to disable self-update. |
UPDATE_TIMEOUT_MS | 600000 | How 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
- Schema changes run automatically as numbered, additive migrations on startup.
- If the data file cannot be read, a
*.corrupt-<timestamp>copy is preserved rather than overwritten. - Do not run more than one instance against the same directory.
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.