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
ZITADEL_CLIENT_ID For auth OIDC client ID from your Zitadel application
ZITADEL_DOMAIN For auth Zitadel instance domain (e.g., auth.example.com)
ZITADEL_REDIRECT_URI For auth OIDC callback URL (e.g., https://app.example.com/auth/callback)
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

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

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
ZITADEL_CLIENT_ID=your-client-id
ZITADEL_DOMAIN=auth.example.com
ZITADEL_REDIRECT_URI=https://app.example.com/auth/callback
BASE_URL=https://app.example.com
SECURE_COOKIES=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