Configuration
All environment variables for configuring infrapage.
Configuration
infrapage is configured through environment variables. Set them in a .env file or pass them to your Docker container.
Database
| Variable | Required | Default | Description |
|---|---|---|---|
MONGODB_URI |
Yes | — | MongoDB connection string (e.g., mongodb://localhost:27017) |
MONGODB_DATABASE |
No | infrapage |
Database name to use |
Authentication
| Variable | Required | Default | Description |
|---|---|---|---|
FERRISKEY_URL |
For auth | — | FerrisKey base API URL (e.g., http://localhost:3333 or https://auth.example.com/api) |
FERRISKEY_ISSUER_URL |
No | Derived from FERRISKEY_URL |
FerrisKey public OIDC issuer base URL (e.g., https://auth.example.com) |
FERRISKEY_REALM |
For auth | — | FerrisKey realm name (e.g., infrapage) |
FERRISKEY_CLIENT_ID |
For auth | — | FerrisKey OIDC client ID |
FERRISKEY_CLIENT_SECRET |
For auth | — | FerrisKey confidential client secret (used for both authorization-code exchange and the client-credentials grant for user lookups) |
BASE_URL |
For auth | — | App base URL for redirects (e.g., https://app.example.com) |
SECURE_COOKIES |
No | false |
Set to true for HTTPS production deployments |
TRUST_PROXY_HEADERS |
No | false |
Set to true only when infrapage is behind a trusted reverse proxy that strips client-supplied forwarding headers |
Note
If any of the FERRISKEY_* variables is not set, authentication is completely disabled. All admin endpoints will be accessible without login. This is useful for local development and private deployments behind a VPN.
Session Storage
| Variable | Required | Default | Description |
|---|---|---|---|
VALKEY_URI |
No | — | Redis/Valkey URI for persistent session storage and widget caching (e.g., redis://localhost:6379) |
Without VALKEY_URI, sessions are stored in-memory and will be lost when the server restarts.
Integration Tokens
| Variable | Required | Default | Description |
|---|---|---|---|
GITHUB_TOKEN |
No | — | GitHub personal access token — seeded into the database on first run |
POLAR_TOKEN |
No | — | Polar API token — seeded into the database on first run |
Tip
These environment variables only seed the token into MongoDB on the very first startup. After that, manage tokens through the Settings page in the admin dashboard.
Server
| Variable | Required | Default | Description |
|---|---|---|---|
INFRAPAGE_HOST |
No | 0.0.0.0 |
Server bind address |
INFRAPAGE_PORT |
No | 8080 |
Server port |
Example .env File
bash
# Required
MONGODB_URI=mongodb://localhost:27017
MONGODB_DATABASE=infrapage
# Optional: Authentication
FERRISKEY_URL=http://localhost:3333
# FERRISKEY_ISSUER_URL is optional; set it when your API URL and issuer URL differ.
# FERRISKEY_ISSUER_URL=https://auth.example.com
FERRISKEY_REALM=infrapage
FERRISKEY_CLIENT_ID=infrapage-dashboard
FERRISKEY_CLIENT_SECRET=your-client-secret
BASE_URL=https://app.example.com
SECURE_COOKIES=true
TRUST_PROXY_HEADERS=true
# Optional: Session storage
VALKEY_URI=redis://localhost:6379
# Optional: Integration tokens (seeded on first run)
GITHUB_TOKEN=ghp_xxxxxxxxxxxx
POLAR_TOKEN=polar_xxxxxxxxxxxx
# Optional: Server config
INFRAPAGE_HOST=0.0.0.0
INFRAPAGE_PORT=8080