Platform configuration
Configure the Apikee platform with environment variables for databases, storage, authentication, email, and AI integrations.
The platform reads configuration from two places. Values saved in the admin settings UI win over environment variables, so an operator can change SMTP or swap AI providers without a redeploy. Environment variables are the fallback, and the right place for values you want baked into a deployment.
APIKEE_SECRET is the only variable that is genuinely required.
Core
| Variable | Default | Notes |
|---|---|---|
APIKEE_SECRET | — | Required. 32-byte hex (openssl rand -hex 32). Signs every key. |
APP_URL | — | Public HTTPS address. OAuth callbacks and emailed links are built from it. |
APP_NAME | Apikee | Shown in the UI and in emails. |
PORT | 4321 | Host port published by Compose. |
NODE_ENV | production | |
LOG_LEVEL | info | |
APIKEE_IMAGE | ghcr.io/apikee-dev/platform:latest | Image used by Compose. |
Data stores
| Variable | Notes |
|---|---|
DATABASE_URL | PostgreSQL. Projects, clients, keys, endpoints. |
MONGO_URL | MongoDB. Request logs. |
POSTGRES_PASSWORD / MONGO_PASSWORD | Used by the bundled Compose services. |
MINIO_ENDPOINT | Defaults to http://localhost:9000. |
MINIO_ACCESS_KEY / MINIO_SECRET_KEY | Object storage for generated OpenAPI documents. |
Pool tuning
Optional. Defaults shown.
| Variable | Default | Notes |
|---|---|---|
DATABASE_POOL_MAX | 10 | Connections per instance. Keep instances × pool under max_connections. |
DATABASE_STATEMENT_TIMEOUT_MS | 30000 | Aborts a query so one slow statement cannot pin a connection. |
DATABASE_CONNECT_TIMEOUT_MS | 10000 | |
DATABASE_IDLE_TIMEOUT_MS | 30000 | |
DATABASE_IDLE_TX_TIMEOUT_MS | 60000 |
First run and access
| Variable | Notes |
|---|---|
ADMIN_EMAIL / ADMIN_PASSWORD | Seeds the first admin account. |
SETUP_COMPLETE | Set once the setup wizard has run. |
ALLOW_SIGNUPS | false by default — an open instance is rarely what you want. |
Needed for invitations, one-time codes and notifications. See Authentication.
| Variable | Default |
|---|---|
SMTP_HOST | — |
SMTP_PORT | 587 |
SMTP_USER / SMTP_PASS | — |
SMTP_FROM | — |
Sign-in providers
| Variable | Notes |
|---|---|
GITHUB_CLIENT_ID / GITHUB_CLIENT_SECRET | GitHub OAuth. |
GOOGLE_CLIENT_ID / GOOGLE_CLIENT_SECRET | Google OAuth. |
OIDC_ISSUER, OIDC_CLIENT_ID, OIDC_CLIENT_SECRET | Generic OIDC / SSO. |
OIDC_SCOPES | Default openid email profile. |
OIDC_BUTTON_LABEL | Text on the sign-in button. |
Callback URLs are {APP_URL}/api/auth/callback/{provider}.
AI assistant
Optional and free. Full detail in AI assistant.
| Variable | Notes |
|---|---|
AI_ENABLED | true to turn the assistant on. |
AI_PROVIDER | Preset id, e.g. ollama, openai, custom. |
AI_BASE_URL | OpenAI-compatible API root, usually ending /v1. |
AI_MODEL | Model id as your endpoint names it. |
AI_API_KEY | Omit for local runtimes. |
AI_REDACTION | strict, standard (default) or off. |
AI_MAX_TOKENS / AI_TEMPERATURE / AI_TIMEOUT_MS | Defaults 1024 / 0.2 / 60000. |
AI_ALLOW_METADATA_ENDPOINT | Escape hatch for the link-local guard. Leave unset. |
Licensing
| Variable | Notes |
|---|---|
APIKEE_PREMIUM | Optional licence key. Sets plan limits and seat counts. |
A licence affects resource limits and support, not features. The AI assistant, the developer portal, OpenAPI generation and the REST API are all open source and available on every instance.
SDK variables
Read by the SDKs in your services, not by the platform.
| Variable | Notes |
|---|---|
APIKEE_SECRET | Signing secret. Must match the issuing service. |
APIKEE_BASE_URL | Your instance's API root, e.g. https://apikee.example.com/api/v1. |
APIKEE_SERVER_KEY | Key the SDK authenticates to the platform with. |
APIKEE_PROJECT_ENV | Which environment to report into, e.g. payments-api-production. |
.NET reads its secret as Apikee__Secret through standard configuration binding;
the other three variables are shared across all SDKs.

