Docs
/
Configuration
/
Environment Variables
Environment Variables
Required
| Variable |
Description |
Example |
DATABASE_URL |
PostgreSQL connection string |
postgresql://user:pass@host:5432/db |
Optional
| Variable |
Default |
Description |
PORT |
3000 |
HTTP listen port |
URL |
http://localhost:3000 |
Panel URL (used in emails and redirects) |
NAME |
Airlink |
Panel display name |
NODE_ENV |
development |
development or production |
SESSION_SECRET |
|
Secret for session cookies (generate with openssl rand -hex 32) |
REDIS_URL |
redis://127.0.0.1:6379 |
Redis connection string |
DB_POOL_MAX |
20 |
Maximum database connection pool size |
Database Host Defaults
These set the defaults when creating database hosts via the admin panel:
| Variable |
Default |
Description |
PGHOST |
127.0.0.1 |
Default PostgreSQL host |
PGPORT |
5432 |
Default PostgreSQL port |
PGUSER |
airlink |
Default PostgreSQL user |
PGPASSWORD |
|
Default 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
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)