Environment Variable Reference
Complete reference for all environment variables used in Easy AppServer deployment.
Required Secrets
These must be set with strong values (32+ characters) in production:
| Variable | Length | Description |
|---|---|---|
POSTGRES_PASSWORD | 16+ | Database password |
KRATOS_SECRETS_COOKIE | 32 | Kratos session cookie encryption |
KRATOS_SECRETS_CIPHER | 32 | Kratos data encryption |
KRATOS_WEBHOOK_SECRET | 32+ | Webhook signature verification |
HYDRA_SYSTEM_SECRET | 32+ | Hydra system encryption |
HYDRA_PAIRWISE_SALT | 32+ | OIDC pairwise subject salt |
APPSERVER_SETTINGS_ENCRYPTION_KEY | 32 | App settings AES-256 encryption |
APPSERVER_DB_PASSWORD | 16+ | AppServer database password |
Generate secrets:
# 32-character key
openssl rand -hex 16 | cut -c1-32
# Random password
openssl rand -base64 24
Configuration Files
There are two environment files:
docker/.env- Infrastructure servicesweb/v2/packages/shell/.env- Shell frontend
Some variables must match between them (noted below).
General Settings
| Variable | Default | Description |
|---|---|---|
LOG_LEVEL | info | Global log level: debug, info, warn, error |
NODE_ENV | development | Node.js environment: development, production |
DEPLOYMENT_ENVIRONMENT | development | Deployment label for telemetry |
AppServer Configuration
Server Ports
| Variable | Default | Description |
|---|---|---|
APPSERVER_HTTP_PORT | 8080 | HTTP/GraphQL server port |
APPSERVER_GRPC_PORT | 9091 | gRPC server port |
APPSERVER_ENV | development | Environment mode: development, production |
APPSERVER_CONFIG_FILE | - | Optional YAML config file path |
Security (gRPC TLS/mTLS)
| Variable | Dev Default | Prod Default | Description |
|---|---|---|---|
APPSERVER_GRPC_TLS_ENABLED | false | true | Enable TLS for gRPC |
APPSERVER_GRPC_TLS_CERT_FILE | - | - | Server TLS certificate path |
APPSERVER_GRPC_TLS_KEY_FILE | - | - | Server TLS private key path |
APPSERVER_GRPC_MTLS_ENABLED | false | false | Enable mutual TLS |
APPSERVER_GRPC_MTLS_CA_FILE | - | - | CA certificate for client verification |
Developer Tools
| Variable | Dev Default | Prod Default | Description |
|---|---|---|---|
APPSERVER_GRPC_REFLECTION_ENABLED | true | false | gRPC reflection for tools |
APPSERVER_GRAPHQL_PLAYGROUND_ENABLED | true | false | GraphQL Playground at /graphql |
APPSERVER_AUTH_ALLOW_BOOTSTRAP_REGISTRATION | true | false | Allow app registration without DB entry |
Disable all in production!
Database Configuration
| Variable | Default | Description |
|---|---|---|
APPSERVER_DB_HOST | postgres | PostgreSQL host |
APPSERVER_DB_PORT | 5432 | PostgreSQL port |
APPSERVER_DB_NAME | partner | Database name (contains appserver schema) |
APPSERVER_DB_USER | partner | Database user |
APPSERVER_DB_PASSWORD | - | Database password (REQUIRED) |
APPSERVER_DB_SSLMODE | disable | SSL mode: disable, require, verify-full |
Note: The AppServer tables are stored in the
appserverschema within thepartnerdatabase. Thepartnerdatabase contains multiple schemas for different services.
Cache Configuration
| Variable | Default | Description |
|---|---|---|
APPSERVER_REDIS_URL | redis://redis:6379 | Redis connection URL |
APPSERVER_CACHE_TTL | 300 | Local cache TTL in seconds |
Event Bus Configuration
| Variable | Default | Description |
|---|---|---|
APPSERVER_EVENTBUS_ENABLED | true | Enable RabbitMQ event bus |
APPSERVER_RABBITMQ_URL | amqp://guest:guest@rabbitmq:5672/ | RabbitMQ connection URL |
APPSERVER_RABBITMQ_MAX_RETRIES | 5 | Max connection retry attempts |
APPSERVER_RABBITMQ_PREFETCH_COUNT | 10 | Prefetch count for consumers |
Telemetry Configuration
| Variable | Default | Description |
|---|---|---|
APPSERVER_LOG_LEVEL | debug | AppServer log level |
APPSERVER_METRICS_ENABLED | true | Enable Prometheus metrics |
APPSERVER_TRACING_ENABLED | false | Enable distributed tracing |
Authentication & Authorization
| Variable | Default | Description |
|---|---|---|
APPSERVER_SESSION_COOKIE_NAME | ory_kratos_session | Kratos session cookie name |
APPSERVER_KRATOS_TIMEOUT | 5s | Timeout for Kratos API calls |
APPSERVER_OPENFGA_TIMEOUT | 5s | Timeout for OpenFGA API calls |
APPSERVER_SIGNATURE_REPLAY_WINDOW | 5m | App signature replay protection |
APPSERVER_CLOCK_SKEW_TOLERANCE | 30s | Clock skew tolerance |
External Service URLs
| Variable | Default | Description |
|---|---|---|
APPSERVER_KRATOS_PUBLIC_URL | http://kratos:4433 | Kratos public API URL |
APPSERVER_KRATOS_ADMIN_URL | http://kratos:4434 | Kratos admin API URL |
APPSERVER_HYDRA_PUBLIC_URL | http://hydra:4444 | Hydra public API URL |
APPSERVER_HYDRA_ADMIN_URL | http://hydra:4445 | Hydra admin API URL |
APPSERVER_OPENFGA_API_URL | http://openfga:8089 | OpenFGA API URL (via nginx proxy) |
APPSERVER_OPENFGA_STORE_ID | - | OpenFGA store ID (REQUIRED) |
APPSERVER_OPENFGA_MODEL_ID | - | OpenFGA model ID (REQUIRED) |
Settings Encryption
| Variable | Default | Description |
|---|---|---|
APPSERVER_SETTINGS_ENCRYPTION_KEY | - | REQUIRED: Exactly 32 characters |
APPSERVER_SETTINGS_CACHE_TTL | 60 | Settings cache TTL in seconds |
UI Asset Serving
| Variable | Default | Description |
|---|---|---|
APPSERVER_UI_COMPRESSION_MIN_SIZE | 1024 | Min size for compression (bytes) |
APPSERVER_UI_COMPRESSION_LEVEL | 6 | Compression level (1-9) |
APPSERVER_UI_CACHE_TTL | 300 | Asset cache TTL in seconds |
APPSERVER_UI_MAX_CACHE_SIZE | 104857600 | Max cache size (100MB) |
Docker Orchestration (Optional)
| Variable | Default | Description |
|---|---|---|
APPSERVER_DOCKER_ENABLED | false | Enable Docker orchestration |
APPSERVER_DOCKER_SOCKET_PATH | /var/run/docker.sock | Docker socket path |
APPSERVER_DOCKER_REGISTRY_URL | registry.eacore6.de | Container registry URL |
APPSERVER_DOCKER_REGISTRY_USERNAME | - | Registry authentication username |
APPSERVER_DOCKER_REGISTRY_PASSWORD | - | Registry authentication password |
APPSERVER_DOCKER_NETWORK_NAME | appserver-network | Docker network name |
APPSERVER_DOCKER_NETWORK_SUBNET | 172.20.0.0/16 | Docker network subnet |
APPSERVER_DOCKER_DEFAULT_IMAGE_STAGE | latest | Image tag: latest, pre-release, testing |
APPSERVER_DOCKER_DEFAULT_CPU_SHARES | 1024 | Default CPU shares per container |
APPSERVER_DOCKER_DEFAULT_MEMORY_MB | 512 | Default memory limit per container (MB) |
APPSERVER_DOCKER_PULL_TIMEOUT | 10m | Image pull timeout |
APPSERVER_DOCKER_START_TIMEOUT | 2m | Container start timeout |
APPSERVER_DOCKER_STOP_TIMEOUT | 10s | Container stop timeout |
APPSERVER_DOCKER_HEALTH_CHECK_INTERVAL | 30s | Health check interval |
APPSERVER_DOCKER_HEALTH_CHECK_TIMEOUT | 5s | Health check timeout |
APPSERVER_DOCKER_HEALTH_CHECK_RETRIES | 3 | Health check retry count |
APPSERVER_DOCKER_MAX_RESTARTS | 3 | Max container restarts before giving up |
APPSERVER_DOCKER_RECONCILE_TIMEOUT | 2m | Startup reconciliation timeout |
Infrastructure Services
PostgreSQL
| Variable | Default | Description |
|---|---|---|
POSTGRES_USER | partner | PostgreSQL superuser |
POSTGRES_PASSWORD | - | PostgreSQL password (REQUIRED) |
POSTGRES_DB | partner | Default database |
POSTGRES_PORT | 5432 | PostgreSQL port |
Redis
| Variable | Default | Description |
|---|---|---|
REDIS_PORT | 6379 | Redis port |
RabbitMQ
| Variable | Default | Description |
|---|---|---|
RABBITMQ_PORT | 5672 | AMQP port |
RABBITMQ_MANAGEMENT_PORT | 15672 | Management UI port |
RABBITMQ_USER | guest | RabbitMQ user |
RABBITMQ_PASSWORD | guest | RabbitMQ password |
Auth Services
Kratos (Identity)
| Variable | Default | Description |
|---|---|---|
KRATOS_PUBLIC_PORT | 4433 | Public API port |
KRATOS_ADMIN_PORT | 4434 | Admin API port |
KRATOS_SECRETS_COOKIE | - | REQUIRED: 32 characters |
KRATOS_SECRETS_CIPHER | - | REQUIRED: 32 characters |
KRATOS_WEBHOOK_SECRET | - | REQUIRED: 32+ characters |
Note: KRATOS_WEBHOOK_SECRET must match in both docker/.env and shell/.env.
Hydra (OAuth2/OIDC)
| Variable | Default | Description |
|---|---|---|
HYDRA_PUBLIC_PORT | 4444 | Public API port |
HYDRA_ADMIN_PORT | 4445 | Admin API port |
HYDRA_ISSUER_URL | http://localhost:4444 | OAuth2 issuer URL |
HYDRA_CONSENT_URL | http://localhost:3000/consent | Consent UI URL |
HYDRA_LOGIN_URL | http://localhost:3000/login | Login UI URL |
HYDRA_LOGOUT_URL | http://localhost:3000/logout | Logout UI URL |
HYDRA_SYSTEM_SECRET | - | REQUIRED: System secret |
HYDRA_PAIRWISE_SALT | - | REQUIRED: Pairwise salt |
OpenFGA (Authorization)
| Variable | Default | Description |
|---|---|---|
OPENFGA_PORT | 8090 | HTTP API port |
OPENFGA_GRPC_PORT | 8091 | gRPC port |
OPENFGA_PLAYGROUND_ENABLED | true | Enable playground UI |
OPENFGA_PLAYGROUND_PORT | 8092 | Playground port |
OPENFGA_STORE_ID | - | Store ID (from setup script or manual API call) |
OPENFGA_MODEL_ID | - | Model ID (from setup script or manual API call) |
Setup Script: docker/scripts/setup-openfga-roles.sh (Docker-exclusive)
For non-Docker deployments, see Manual Setup.
Note: Store ID and Model ID must match in both docker/.env and AppServer config.
Shell Frontend
These go in web/v2/packages/shell/.env:
| Variable | Default | Description |
|---|---|---|
KRATOS_PUBLIC_URL | http://localhost:4433 | Kratos public URL |
KRATOS_ADMIN_URL | http://localhost:4434 | Kratos admin URL |
KRATOS_WEBHOOK_SECRET | - | REQUIRED: Must match docker/.env |
HYDRA_PUBLIC_URL | http://localhost:4444 | Hydra public URL |
HYDRA_ADMIN_URL | http://localhost:4445 | Hydra admin URL |
OPENFGA_API_URL | http://localhost:8090 | OpenFGA URL |
OPENFGA_STORE_ID | - | REQUIRED: Must match docker/.env |
DATABASE_URL | - | PostgreSQL connection string |
C5_BASE_URL | - | REQUIRED: Legacy backend URL |
C5_SESSION_COOKIE_NAME | legacy_session | Legacy session cookie |
TELEMETRY_ENABLED | true | Enable telemetry |
TELEMETRY_SERVICE_NAME | core6-shell | Service name for traces |
OTEL_EXPORTER_OTLP_ENDPOINT | http://otel-collector:4318 | OTLP endpoint |
LOG_LEVEL | info | Log level |
Observability Stack
OpenTelemetry Collector
| Variable | Default | Description |
|---|---|---|
OTEL_GRPC_PORT | 4317 | OTLP gRPC receiver |
OTEL_HTTP_PORT | 4318 | OTLP HTTP receiver |
OTEL_METRICS_PORT | 8888 | Collector metrics |
OTEL_PROM_EXPORTER_PORT | 8889 | Prometheus exporter |
OTEL_LOG_LEVEL | info | Collector log level |
OpenTelemetry SDK (Applications)
| Variable | Default | Description |
|---|---|---|
OTEL_EXPORTER_OTLP_ENDPOINT | http://otel-collector:4317 | Collector endpoint |
OTEL_EXPORTER_OTLP_PROTOCOL | grpc | Protocol: grpc, http |
OTEL_SERVICE_NAME | appserver | Service name |
OTEL_RESOURCE_ATTRIBUTES | - | Resource attributes |
Prometheus
| Variable | Default | Description |
|---|---|---|
PROMETHEUS_PORT | 9090 | Server port |
PROMETHEUS_RETENTION | 15d | Retention period |
PROMETHEUS_RETENTION_SIZE | 10GB | Max storage size |
Loki
| Variable | Default | Description |
|---|---|---|
LOKI_PORT | 3100 | API port |
Tempo
| Variable | Default | Description |
|---|---|---|
TEMPO_PORT | 3200 | API port |
Grafana
| Variable | Default | Description |
|---|---|---|
GRAFANA_PORT | 3000 | Web UI port |
GRAFANA_ADMIN_USER | admin | Admin username |
GRAFANA_ADMIN_PASSWORD | admin | Admin password (CHANGE!) |
GRAFANA_ROOT_URL | http://localhost:3000 | Root URL |
GRAFANA_LOG_LEVEL | info | Log level |
Documentation
| Variable | Default | Description |
|---|---|---|
DOCS_PORT | 3030 | Documentation port |
DOCS_TARGET | development | Build target |
DOCUSAURUS_URL | https://localhost | Base URL |
DOCUSAURUS_BASE_URL | / | Base path |
Environment Profiles
Development
# docker/.env
APPSERVER_ENV=development
APPSERVER_LOG_LEVEL=debug
APPSERVER_GRPC_TLS_ENABLED=false
APPSERVER_GRPC_REFLECTION_ENABLED=true
APPSERVER_GRAPHQL_PLAYGROUND_ENABLED=true
APPSERVER_AUTH_ALLOW_BOOTSTRAP_REGISTRATION=true
APPSERVER_DB_SSLMODE=disable
# URLs (local)
APPSERVER_KRATOS_PUBLIC_URL=http://localhost:4433
APPSERVER_OPENFGA_API_URL=http://localhost:8089
Production
# docker/.env
APPSERVER_ENV=production
APPSERVER_LOG_LEVEL=warn
APPSERVER_GRPC_TLS_ENABLED=true
APPSERVER_GRPC_REFLECTION_ENABLED=false
APPSERVER_GRAPHQL_PLAYGROUND_ENABLED=false
APPSERVER_AUTH_ALLOW_BOOTSTRAP_REGISTRATION=false
APPSERVER_DB_SSLMODE=verify-full
APPSERVER_TRACING_ENABLED=true
# URLs (internal network)
APPSERVER_KRATOS_PUBLIC_URL=http://kratos:4433
APPSERVER_OPENFGA_API_URL=http://openfga:8089
Security Checklist
Secrets to Change
-
POSTGRES_PASSWORD- Strong database password -
KRATOS_SECRETS_COOKIE- Exactly 32 characters -
KRATOS_SECRETS_CIPHER- Exactly 32 characters -
KRATOS_WEBHOOK_SECRET- At least 32 characters -
HYDRA_SYSTEM_SECRET- Strong secret -
HYDRA_PAIRWISE_SALT- Strong salt -
APPSERVER_SETTINGS_ENCRYPTION_KEY- Exactly 32 characters -
RABBITMQ_USERandRABBITMQ_PASSWORD- Change from defaults -
GRAFANA_ADMIN_PASSWORD- Change from default
Settings to Verify
-
APPSERVER_GRPC_TLS_ENABLED=true -
APPSERVER_DB_SSLMODE=verify-full -
APPSERVER_GRPC_REFLECTION_ENABLED=false -
APPSERVER_GRAPHQL_PLAYGROUND_ENABLED=false -
APPSERVER_AUTH_ALLOW_BOOTSTRAP_REGISTRATION=false
Variables That Must Match
| Variable | docker/.env | shell/.env |
|---|---|---|
KRATOS_WEBHOOK_SECRET | Yes | Yes |
OPENFGA_STORE_ID | Yes | Yes |
POSTGRES_PASSWORD | Yes | In DATABASE_URL |
Related Topics
- Docker Infrastructure - Service configuration
- AppServer Guide - Backend configuration
- Shell Guide - Frontend configuration
- Production Deployment - Production setup