ATStatus
ATStatus WikiLoading documentation...

Environment Variables

Complete reference for all configuration options

Complete reference for all environment variables used to configure ATStatus.

Security Notice: Never commit your .env file to version control. Use environment variables or secrets management in production.

Required Variables

These variables must be set for the application to function:

VariableDescriptionExample
DATABASE_URLDatabase connection string (SQLite default)file:./data.db
ADMIN_PASSWORDPassword for admin panel accessyour-secure-password
SESSION_SECRETSecret key for session signing (min 32 chars)your-super-secret-session-key
CRON_SECRETSecret for protecting monitor endpointsyour-cron-secret-key

Database Configuration

SQLite (Default - Recommended)

DATABASE_URL="file:./data.db"

SQLite is embedded and requires no external database server. Perfect for most deployments.

Network & Access Configuration

VariableDescriptionDefault
PORTServer port (auto-assigned if not set)3000
TRUST_PROXYEnable reverse proxy supportfalse
FORCE_SECURE_COOKIESForce secure cookies (set to "false" for HTTP)Auto-detect
NEXTAUTH_URLPublic URL of your status page-
LAN/Network Access: If you access the status page via HTTP from other devices (e.g., http://192.168.x.x:3000), set FORCE_SECURE_COOKIES="false" or login will not work.

Authentication

VariableDescriptionDefault
ADMIN_PASSWORDPrimary admin passwordRequired
SESSION_SECRETSecret for session token signingRequired
CRON_SECRETSecret for monitor API authenticationRequired
Generate Secure Secrets: Use this command to generate secure secrets: openssl rand -base64 32

Email Configuration (SMTP)

Configure email for notifications and subscriber updates:

VariableDescriptionExample
SMTP_HOSTSMTP server hostnamesmtp.gmail.com
SMTP_PORTSMTP server port587
SMTP_USERSMTP username/emailnoreply@example.com
SMTP_PASSSMTP password or app passwordyour-app-password
SMTP_FROMDefault from addressStatus Page <noreply@example.com>
SMTP_SECUREUse TLS (true/false)false

Gmail Configuration

SMTP_HOST="smtp.gmail.com"
SMTP_PORT="587"
SMTP_USER="your-email@gmail.com"
SMTP_PASS="your-app-password"

SendGrid Configuration

SMTP_HOST="smtp.sendgrid.net"
SMTP_PORT="587"
SMTP_USER="apikey"
SMTP_PASS="your-sendgrid-api-key"

Feature Flags

Enable or disable specific features:

VariableDescriptionDefault
ENABLE_PUSH_NOTIFICATIONSEnable browser push notificationsfalse
ENABLE_2FAEnable two-factor authenticationtrue
ENABLE_AUDIT_LOGEnable audit loggingtrue
ENABLE_COOKIE_CONSENTEnable cookie consent bannerfalse
ENABLE_RATE_LIMITINGEnable API rate limitingtrue