Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Environment Variables

Environment variables override values from plinth.toml. This is useful for secrets and deployment-specific overrides.

Configuration path

VariableDefaultDescription
PLINTH_CONFIGplinth.tomlPath to the TOML configuration file

Server

VariableDefaultDescription
LEPTOS_SITE_ADDR127.0.0.1:3000Server bind address (set by Nix wrapper)
LEPTOS_SITE_ROOTtarget/sitePath to compiled site assets (set by Nix wrapper)

Authentication

VariableDefaultDescription
PLINTH_API_KEYdev_api_key_change_in_productionBearer token for admin API endpoints

Database

These override the [database] section in plinth.toml:

VariableTOML keyDescription
PLINTH_DATABASE_URLdatabase.database_urlPostgres connection URL
DATABASE_URLdatabase.database_urlPostgres connection URL

Observability

These override the [observability] section:

VariableTOML keyDescription
RUST_LOGobservability.log_levelLog level filter (e.g. info,plinth=debug)
OTEL_EXPORTER_OTLP_ENDPOINTobservability.otlp_endpointOTLP endpoint URL
OTEL_EXPORTER_OTLP_HEADERSobservability.otlp_headersOTLP auth headers
OTEL_SERVICE_NAMEobservability.service_nameTelemetry service name

Immich

VariableTOML keyDescription
IMMICH_API_URLimmich.api_urlImmich server URL (enables image proxy)
IMMICH_API_KEYImmich API key (env-only, not in TOML)

Forge tokens

Optional tokens for fetching activity from code forges. Public data works without them but is rate-limited. These tokens are read only from the environment, have no TOML equivalent in [forge], and are never sent to the browser.

VariableDescription
GITHUB_TOKENGitHub personal access token; raises the rate limit for GitHub API requests
CODEBERG_TOKENCodeberg or Forgejo access token

Activity metadata is served from the database immediately. When an entry’s fetched_at is older than forge.refresh_ttl_secs, the server starts a background refresh and continues serving the cached entry. Configure the TTL and failed-refresh backoff in the [forge] table.

Analytics

These override the [analytics] section:

VariableTOML keyDescription
PLAUSIBLE_DOMAINanalytics.plausible_domainSite domain tracked by Plausible
PLAUSIBLE_SCRIPT_URLanalytics.plausible_script_urlURL to self-hosted Plausible script

CLI-only

These are used by plinth-cli, not the server:

VariableDefaultDescription
PLINTH_API_URLhttp://localhost:3000Target server URL for CLI operations

Precedence

  1. Environment variables (highest priority)
  2. plinth.toml values
  3. Compiled defaults (lowest priority)