HomeDocsConfigurationEnvironment Variables
Configuration

Environment Variables

All environment variables for panel configuration.

bthavanishBy bthavanish

Environment Variables

Required

VariableDescriptionExample
DATABASE_URLPostgreSQL connection stringpostgresql://user:pass@host:5432/db

Optional

VariableDefaultDescription
PORT3000HTTP listen port
URLhttp://localhost:3000Panel URL (used in emails and redirects)
NAMEAirlinkPanel display name
NODE_ENVdevelopmentdevelopment or production
SESSION_SECRETSecret for session cookies (generate with openssl rand -hex 32)
REDIS_URLredis://127.0.0.1:6379Redis connection string
DB_POOL_MAX20Maximum database connection pool size

Database Host Defaults

These set the defaults when creating database hosts via the admin panel:

VariableDefaultDescription
PGHOST127.0.0.1Default PostgreSQL host
PGPORT5432Default PostgreSQL port
PGUSERairlinkDefault PostgreSQL user
PGPASSWORDDefault PostgreSQL password

Example File

The example.env file contains all variables with defaults:

URL="http://localhost:3000"
PORT=3000
NAME="Airlink"
DATABASE_URL="postgresql://airlink:airlink@127.0.0.1:5432/airlink"
DB_POOL_MAX=20
REDIS_URL="redis://127.0.0.1:6379"
NODE_ENV="development"
SESSION_SECRET="change_me"
PGHOST="127.0.0.1"
PGPORT="5432"
PGUSER="airlink"
PGPASSWORD=""

Generating SESSION_SECRET

openssl rand -hex 32

Production Considerations

  • Use a strong, unique SESSION_SECRET
  • Set NODE_ENV=production
  • Use a proper PostgreSQL password
  • Use a dedicated Redis instance
  • Set URL to your actual panel domain
  • Configure SMTP for email features
  • Configure S3 for backup storage (optional)