Nightscout — First-Run Setup

Nightscout is configured via environment variables. Set these in your .env.local file and restart the server.

Required

API_SECRET
Admin passwordSet ✓
MONGODB_URI
MongoDB connectionSet ✓
AUTH_SECRET
Session secretSet ✓

Optional

PUSHOVER_APP_TOKEN
Pushover app tokenMissing
PUSHOVER_USER_KEY
Pushover user keyMissing
TELEGRAM_BOT_TOKEN
Telegram bot tokenMissing
TELEGRAM_CHAT_ID
Telegram chat IDMissing
REDIS_URL
Redis cacheMissing
SHARE_TOKEN
Read-only share tokenMissing

Example .env.local

MONGODB_URI=mongodb://localhost:27017/nightscout
API_SECRET=your_secret_at_least_12_chars
AUTH_SECRET=a_random_string_for_sessions
AUTH_URL=http://localhost:3000

All required variables are set. You're ready to go.

Go to Login →

Nightscout uses a single API_SECRET as your admin password — there are no user accounts. Anyone with the secret has full access. Share the SHARE_TOKEN with followers for read-only access.