Get started

Environment Variables

All variables declared in the current sample file.

NasDash Variables

VariableEnvironmentRequiredEffect
NEXT_PUBLIC_DASHBOARD_TITLEdevelopment / buildnobuild-time fallback when no saved title exists; normally use Settings → Header; sample NASDASH
NASDASH_ADMIN_PASSWORDproductionno; new accounts onlyfirst password for admin, instead of a generated setup code
NASDASH_VIEWER_PASSWORDlegacy initializationnoonly initializes an existing legacy viewer placeholder; does not create a viewer on a fresh install or set the public-mode account password
NASDASH_JWT_SECRETproductionno; advanced overridestable secret for sessions and encrypted credentials
NASDASH_DATA_DIRadvanced / testingnoreplaces the data directory, normally <project>/data
NASDASH_ALLOWED_DEV_ORIGINSdevelopment onlynolist of hosts/IPs authorized to open npm run dev:lan from another private device
NASDASH_DEMO_MODEdemo onlynoenables 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.0

Generating the Secret

openssl rand -hex 32

No 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 nasdash

Set 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-secret

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