Environment Variables
All variables declared in the current sample file.
NasDash Variables
| Variable | Environment | Required | Effect |
|---|---|---|---|
NEXT_PUBLIC_DASHBOARD_TITLE | development / build | no | build-time fallback when no saved title exists; normally use Settings → Header; sample NASDASH |
NASDASH_ADMIN_PASSWORD | production | no; new accounts only | first password for admin, instead of a generated setup code |
NASDASH_VIEWER_PASSWORD | legacy initialization | no | only initializes an existing legacy viewer placeholder; does not create a viewer on a fresh install or set the public-mode account password |
NASDASH_JWT_SECRET | production | no; advanced override | stable secret for sessions and encrypted credentials |
NASDASH_DATA_DIR | advanced / testing | no | replaces the data directory, normally <project>/data |
NASDASH_ALLOWED_DEV_ORIGINS | development only | no | list of hosts/IPs authorized to open npm run dev:lan from another private device |
NASDASH_DEMO_MODE | demo only | no | enables fictitious fixtures and disables real connections |
Image Variables
The image defines these defaults; Compose loads an optional environment file:
NODE_ENV=production
PORT=2504
HOSTNAME=0.0.0.0Generating the Secret
openssl rand -hex 32No environment secret is required: NasDash persists jwt.secret and encryption.key in its data directory. Only provide NASDASH_JWT_SECRET as an advanced first-install override. Once credentials are encrypted, keep the same key configuration across restarts, backups and updates: adding or changing this override can make credentials unreadable and invalidate sessions.
Without a password override
On a fresh installation, NasDash prints one Setup code: XXXX-XXXX-XXXX in the logs. This is the first administrator password. Enter it on the first-start screen, then choose a new password of at least 12 characters in the guide. No viewer is created by default.
docker compose logs nasdashSet passwords for existing accounts in Settings → Users and access. Changing environment variables never resets an existing password. For lost access use offline recovery.
.env File
NASDASH_ADMIN_PASSWORD=replace-with-a-unique-password
NASDASH_JWT_SECRET=replace-with-a-stable-random-secretNever commit .env. Do not copy a production secret into the public demo or a bug report.
For request rate limits, forwarded client addresses are ignored by default. Set NASDASH_TRUST_PROXY=true only behind a trusted reverse proxy that overwrites client-supplied forwarding headers and prevents direct access to NasDash. Otherwise keep NASDASH_TRUST_PROXY=false. This setting changes quota identity only; it does not change HTTPS detection or authentication cookie behaviour. Failed-login limits also apply per account, independently of forwarding headers.