OPENGOV_DATABASE_URL | str | 'postgresql+asyncpg://opengov:<password>@localhost:5432/opengov' | Coolify-tier secret | |
OPENGOV_DATABASE_URL_SYNC | str | 'postgresql://opengov:<password>@localhost:5432/opengov' | Coolify-tier secret | |
OPENGOV_OIDC_ISSUER | str | "" | Non-secret config | |
OPENGOV_OIDC_CLIENT_ID | str | 'opengov' | Non-secret config | |
OPENGOV_OIDC_JWKS_URL | str | "" | Non-secret config | |
OPENGOV_OIDC_AUDIENCE | str | "" | Non-secret config | |
OPENGOV_APPLICANT_OIDC_ISSUER | str | "" | Non-secret config | |
OPENGOV_APPLICANT_OIDC_AUDIENCE | str | 'opengov-applicant-api' | Non-secret config | |
OPENGOV_APPLICANT_OIDC_JWKS_URL | str | "" | Non-secret config | |
OPENGOV_APPLICANT_REALM_ENABLED | bool | false | Non-secret config | |
OPENGOV_APPLICANT_REGISTRATION_ENABLED | bool | false | Non-secret config | |
OPENGOV_AUTH_DISABLED | bool | false | Non-secret config | OPENGOV_AUTH_DISABLED — dev only, requires no OIDC issuer |
OPENGOV_MAX_UPLOAD_BYTES | int | 52428800 | Non-secret config | |
OPENGOV_MAX_CORRECTION_DEPTH | int | 3 | Non-secret config | |
OPENGOV_SMARTRULES_AUTHORING_WRITER_MODE | Literal['legacy', 'atomic', 'enforced'] | 'legacy' | Non-secret config | |
OPENGOV_SMARTRULES_RULE_CANVAS_ENABLED | bool | false | Non-secret config | |
OPENGOV_SMARTRULES_PROCEDURE_WRITER_ENFORCED | bool | false | Non-secret config | |
OPENGOV_SMARTRULES_PROCEDURE_CANVAS_ENABLED | bool | false | Non-secret config | |
OPENGOV_ENCRYPTION_KEY | str | "" | KEK-tier (out-of-band only) | Fernet key for encrypting secrets (OPENGOV_ENCRYPTION_KEY) |
OPENGOV_RESULT_SIGNING_KEY | str | None | None | KEK-tier (out-of-band only) | OPENGOV_RESULT_SIGNING_KEY |
OPENGOV_ANON_HASH_SALT | str | 'opengov-default-salt' | KEK-tier (out-of-band only) | OPENGOV_ANON_HASH_SALT |
OPENGOV_TRUSTED_PROXIES | str | "" | Non-secret config | OPENGOV_TRUSTED_PROXIES — comma-separated CIDRs |
OPENGOV_CORS_ORIGINS | str | 'http://localhost:3000,http://localhost:3001,http://localhost:3002,http://localhost:3003' | Non-secret config | |
OPENGOV_KC_ADMIN_CLIENT_ID | str | 'opengov-rights-admin' | Non-secret config | Rights administration (spec 2026-07-28-user-rights-admin, R1): the dedicated Keycloak service-account client the rights API uses to read people/roles and write role mappings. |
OPENGOV_KC_ADMIN_CLIENT_SECRET | str | None | None | Coolify-tier secret | |
OPENGOV_INTEGRATION_DISPATCH_BATCH_SIZE | int | 20 | Non-secret config | Phase 2B: integration-event dispatcher (Task 15). |
OPENGOV_INTEGRATION_BACKLOG_DEPTH_THRESHOLD | int | 100 | Non-secret config | |
OPENGOV_INTEGRATION_BACKLOG_OLDEST_MINUTES_THRESHOLD | int | 30 | Non-secret config | |
OPENGOV_PUBLIC_URL | str | 'http://localhost:8000' | Non-secret config | Phase 2C: webhook URL construction (spec §10.6) Public-facing base URL of this OpenGov instance — used to build the callback_url injected into outbound async-mode payloads, e.g. |
OPENGOV_COUNTRY_CODE | str | 'local' | Non-secret config | Per-country deployment identifier surfaced as a Prometheus label on admin-override metrics. |
OPENGOV_DEPLOYMENT_CODE | str | "" | Non-secret config | Phase 2D: deployments registry (spec §11 foundation). |
OPENGOV_API_DOCS_ENABLED | bool | false | Non-secret config | Interactive API docs (/docs = Swagger UI, /redoc = ReDoc) are developer tooling: they load third-party JS/CSS bundles and an inline script, which the Content-Security-Policy rollout (spec 2026-07-29-content-security-policy §5.3) forbids on the API host. |
OPENGOV_MCP_ENABLED | bool | true | Non-secret config | OPENGOV_MCP_ENABLED |
OPENGOV_MCP_WRITES_ENABLED | bool | true | Non-secret config | OPENGOV_MCP_WRITES_ENABLED |
OPENGOV_MCP_PUBLIC_URL | str | None | None | Non-secret config | OPENGOV_MCP_PUBLIC_URL |
OPENGOV_ALLOWED_EMBED_ORIGINS | str | "" | Non-secret config | OPENGOV_ALLOWED_EMBED_ORIGINS |
OPENGOV_HSTS_ENABLED | bool | true | Non-secret config | Transport security (spec 2026-07-29-content-security-policy §5.4, owner decision H4). |
OPENGOV_HSTS_MAX_AGE | int | 31536000 | Non-secret config | One year; an operator may lower it (OPENGOV_HSTS_MAX_AGE). |
OPENGOV_SMARTLINK_ENABLE_BROWSER_COMPATIBLE | bool | false | Non-secret config | Transport profile: gate the in-process browser_compatible (curl_cffi) fetch strategy. |
OPENGOV_SMARTLINK_ENABLE_MESH | bool | false | Non-secret config | Mesh transport: gate the mesh fetch strategy (verification routed through the deployment’s co-located OpenGov Mesh sidecar; spec 2026-08-29-smartlink-mesh-transport). |
OPENGOV_SMARTLINK_MESH_SIDECAR_URL | str | 'http://127.0.0.1:9080' | Non-secret config | |
OPENGOV_SMARTLINK_MESH_SIDECAR_SOCKET | str | "" | Non-secret config | The Unix socket of the sidecar’s dispatch API (mesh ADR-0002). |
OPENGOV_SMARTLINK_STRICT_TRANSFORMS | bool | true | Non-secret config | Strict transforms (#705): a broken request transform (field mapping) on ANY operation fails the request closed instead of silently sending the caller’s raw payload to the external system. |
OPENGOV_FEATURE_VAULT | bool | false | Non-secret config | Vault MVP-1: applicant vault surface feature flag. |
OPENGOV_FEATURE_AI | bool | false | Non-secret config | AI substrate: tables and service layer are always present; the HTTP routers mount only when this flag is True. |
OPENGOV_FEATURE_MESH_HOLDER | bool | false | Non-secret config | Mesh holder surface: the loopback-only receiver a co-located OpenGov Mesh sidecar forwards verified member queries to (docs/specs/2026-08-30-mesh-holder.md; the holder enforces per-operation consent evidence itself). |
OPENGOV_MESH_SUBJECT_KEYS | str | "" | KEK-tier (out-of-band only) | The mesh holder’s subject keys K_h (mesh Part VII §42.2, finding F1): a JSON map of key id to a base64url 32-byte key, for example {":1": “<43 base64url characters>”}. |
OPENGOV_MESH_SUBJECT_RATE | float | 20.0 | Non-secret config | The allowance of K_h use (mesh Part VII §42.2: its use MUST be rate-limited). |
OPENGOV_MESH_SUBJECT_BURST | int | 50 | Non-secret config | |
OPENGOV_MESH_HOLDER_SOCKET | str | "" | Non-secret config | The Unix socket the mesh holder serves on (mesh ADR-0002), for example /run/mesh-app/app.sock. |
OPENGOV_AI_GROQ_API_KEY | str | None | None | KEK-tier (out-of-band only) | AI substrate: optional dev/compose seed keys consumed once at startup by seed_providers_from_env (platform/ai/service.py). |
OPENGOV_AI_OPENROUTER_API_KEY | str | None | None | KEK-tier (out-of-band only) | |
OPENGOV_AI_ALLOWED_INTERNAL_HOSTS | str | "" | Non-secret config | OPENGOV_AI_ALLOWED_INTERNAL_HOSTS |
OPENGOV_DECISION_MODEL_ADDRESS | str | None | None | Non-secret config | The decision model of the applicant document check. |
OPENGOV_DECISION_MODEL_NAME | str | None | None | Non-secret config | |
OPENGOV_DOCUMENT_CHECK_LIST | str | "" | Non-secret config | OPENGOV_DOCUMENT_CHECK_LIST: the procedures and languages that show notes. |
OPENGOV_DEFAULT_CURRENCY | str | None | None | Non-secret config | G3 Phase A (procedure-fees spec §2.4): deployment default currency for procedure fees (ISO 4217, e.g. |
OPENGOV_FEATURE_CONDITIONAL_FEES | bool | false | Non-secret config | G3 Phase A (procedure-fees spec §2-C1): per-deployment visibility of the conditional-fee authoring UI in the Editor. |
OPENGOV_VAULT_RETENTION_POLICY_URL | str | None | None | Non-secret config | RGPD Art. |
OPENGOV_VAULT_ACTIVE_KEK_VERSION | int | 1 | Non-secret config | Vault KEK envelope versioning (E6 errata + H_KEK_STARTUP wiring). |
OPENGOV_VAULT_KEK_V1 | str | None | None | KEK-tier (out-of-band only) | |
OPENGOV_VAULT_KEK_V2 | str | None | None | KEK-tier (out-of-band only) | A key change adds the new key beside the old one, and a .env file that holds an undeclared OPENGOV_ name is refused at import. |
OPENGOV_VAULT_KEK_V3 | str | None | None | KEK-tier (out-of-band only) | |
OPENGOV_VAULT_KEK_V4 | str | None | None | KEK-tier (out-of-band only) | |
OPENGOV_WM_BLIND_INDEX_KEY | str | None | None | KEK-tier (out-of-band only) | World-model blind-index signing key (Q1, S1): the deployment-scoped HMAC key behind every _blind_index column on a private natural key (opengov.worldmodel.envelope). |
OPENGOV_VAULT_DRAFT_TTL_DAYS | int | 90 | Non-secret config | D19: days a vault draft survives without a save before the purge job removes it. |
OPENGOV_CERTIFICATE_UNDO_WINDOW_DAYS | int | None | 90 | Non-secret config | D66 R4.2: country-level default undo window (days) within which an issued certificate or permit can be revoked or batch-recalled outside the fraud exception. |
OPENGOV_NOTIFICATION_DELIVERIES_RETENTION_MONTHS | int | 24 | Non-secret config | Notification retention periods (docs/compliance/notification-retention-policy.md). |
OPENGOV_NOTIFICATION_TEST_LOG_RETENTION_DAYS | int | 30 | Non-secret config | |
OPENGOV_NOTIFICATION_HEALTH_SNAPSHOT_RETENTION_DAYS | int | 90 | Non-secret config | |
OPENGOV_VAULT_DRAFT_CHANGES | Literal['on', 'off'] | 'on' | Non-secret config | The operator’s switch for draft changes (spec 2026-10-12-vault-draft-changes §8). |
OPENGOV_EAPPROVAL_STALE_DRAFT_TTL_DAYS | int | 180 | Non-secret config | G-2026-W30-072 / claims.yaml note drafts.applicant_listing_excludes_drafts: days a status=‘draft’ eapproval_applications row survives with no activity before the purge job removes it. |
OPENGOV_PAYMENTS_CLASSIFY_TIMEOUT_MS | int | 50 | Non-secret config | G3 Phase B — payments module (spec 2026-07-08-payments-module.md). |
OPENGOV_PAYMENTS_ORPHAN_EVENT_RETENTION_DAYS | int | 30 | Non-secret config | payments_orphan_event_retention_days: daily sweep horizon for payment_events with no resolved intent (spec §3.3 — the raw payload already persists under the endpoint’s own retention; orphans are secondary evidence). |
OPENGOV_PAYMENTS_RECONCILE_MAX_ATTEMPTS | int | 8 | Non-secret config | payments_reconcile_max_attempts: signed status-query budget before an intent is marked exhausted + needs_attention(retry_exhausted) (spec §2.6). |
OPENGOV_PAYMENTS_RECONCILE_BASE_DELAY_SECONDS | int | 60 | Non-secret config | payments_reconcile_base_delay_seconds: first-attempt backoff base; the schedule is base * factor**attempt * jitter (spec §2.6 — ~24 h over 8). |
OPENGOV_PAYMENTS_RECONCILE_BACKOFF_FACTOR | float | 3.0 | Non-secret config | payments_reconcile_backoff_factor: exponential growth per attempt (spec §2.6). |
OPENGOV_PAYMENTS_STALE_INTENT_SWEEP_HOURS | int | 6 | Non-secret config | payments_stale_intent_sweep_hours: age after which an unpaid/partially_paid intent (checkout initiated or events seen) is re-reconciled — the lost-delivery safety net (spec §2.6). |
OPENGOV_PORTAL_PUBLIC_URL | str | None | None | Non-secret config | G3 Phase C — portal checkout (spec §2-Q6, §3, amendment A10). |
OPENGOV_PAYMENTS_CHECKOUT_RATE_PER_MIN | int | 10 | Non-secret config | Per-user checkout rate limit (the two applicant POSTs; AI-module TokenBucket pattern). |
OPENGOV_QUALIFICATIONS_EVALUATE_RATE_PER_MIN | int | 30 | Non-secret config | D58: the public qualifications evaluate call (published/routes.py) — a refusing bucket per (procedure, version, caller), through the same resolve_caller the lookup route uses. |
OPENGOV_RATE_LIMIT_MODE | Literal['observe', 'enforce', 'off'] | 'observe' | Non-secret config | Request-path allowance (spec 2026-08-10-request-rate-limiting). |
OPENGOV_RATE_LIMIT_AUTHENTICATED_PER_MIN | int | 600 | Non-secret config | |
OPENGOV_RATE_LIMIT_PUBLIC_READ_PER_MIN | int | 120 | Non-secret config | |
OPENGOV_RATE_LIMIT_MAX_TRACKED_CALLERS | int | 10000 | Non-secret config | Hard ceiling on how many callers are tracked at once. |
OPENGOV_RATE_LIMIT_OBSERVATION_INTERVAL_S | int | 300 | Non-secret config | How often the counter says out loud what it has seen. |
OPENGOV_WORLDMODEL_DIR | str | None | None | Non-secret config | Slice 4 (Registers & Datasets): world-model directory backing the public dataset API (worldmodel.routes). |
OPENGOV_WORLDMODEL_SEED_PROFILE | Literal['d26', 'starter'] | 'd26' | Non-secret config | |
OPENGOV_DB_POOL_SIZE | int | 10 | Non-secret config | OPENGOV_DB_POOL_SIZE — steady SQLAlchemy pool per process |
OPENGOV_DB_MAX_OVERFLOW | int | 20 | Non-secret config | OPENGOV_DB_MAX_OVERFLOW — burst headroom above db_pool_size |
OPENGOV_METRICS_ENABLED | bool | false | Non-secret config | OPENGOV_METRICS_ENABLED |
OPENGOV_METRICS_PORT | int | 9100 | Non-secret config | OPENGOV_METRICS_PORT |
OPENGOV_METRICS_BIND | str | '0.0.0.0' | Non-secret config | |
OPENGOV_VIRUS_SCAN | Literal['enforce', 'off'] | 'enforce' | Non-secret config | OPENGOV_VIRUS_SCAN |
OPENGOV_VIRUS_SCAN_OFF_UNTIL | datetime | None | None | Non-secret config | OPENGOV_VIRUS_SCAN_OFF_UNTIL |
OPENGOV_CLAMD_HOST | str | 'clamav' | Non-secret config | OPENGOV_CLAMD_HOST |
OPENGOV_CLAMD_PORT | int | 3310 | Non-secret config | OPENGOV_CLAMD_PORT |
OPENGOV_CLAMD_TIMEOUT_S | float | 30.0 | Non-secret config | OPENGOV_CLAMD_TIMEOUT_S |
OPENGOV_CLAMD_SOCKET | str | None | None | Non-secret config | OPENGOV_CLAMD_SOCKET |
OPENGOV_VIRUS_SCAN_SPOOL_DIR | str | '/var/spool/opengov-scan' | Non-secret config | OPENGOV_VIRUS_SCAN_SPOOL_DIR |
OPENGOV_VIRUS_SCAN_SPOOL_DIR_SCANNER | str | None | None | Non-secret config | OPENGOV_VIRUS_SCAN_SPOOL_DIR_SCANNER |
OPENGOV_VIRUS_SCAN_MAX_CONCURRENT | int | 4 | Non-secret config | OPENGOV_VIRUS_SCAN_MAX_CONCURRENT |
OPENGOV_LIVE_DEPLOYMENT | bool | false | Non-secret config | OPENGOV_LIVE_DEPLOYMENT |
OPENGOV_OTEL_ENABLED | bool | false | Non-secret config | OPENGOV_OTEL_ENABLED |
OPENGOV_OTEL_EXPORTER_OTLP_ENDPOINT | str | "" | Non-secret config | OPENGOV_OTEL_EXPORTER_OTLP_ENDPOINT |
OPENGOV_OTEL_TRACES_SAMPLER_RATIO | float | 0.1 | Non-secret config | OPENGOV_OTEL_TRACES_SAMPLER_RATIO |
OPENGOV_OTEL_TRUST_UPSTREAM_TRACEPARENT | bool | false | Non-secret config | OPENGOV_OTEL_TRUST_UPSTREAM_TRACEPARENT |
OPENGOV_OTEL_PROPAGATE_HOSTS | str | "" | Non-secret config | OPENGOV_OTEL_PROPAGATE_HOSTS |