XCloak / docs

Configuration

Backend configuration lives in xcloak-platform/backend/.env. Per-tenant settings (OIDC SSO, LDAP, threat feed credentials, API keys, custom roles) are configured from the dashboard instead, and stored in the database.

Database

VariableDefaultDescription
DB_HOSTlocalhostPostgreSQL host
DB_PORT5432PostgreSQL port
DB_USERxcloakMigration pool user (DDL permissions)
DB_PASSWORDMigration pool password
DB_NAMEngfwDatabase name
DB_SSLMODEdisableSet to require or verify-full in production
APP_DB_USERxcloak_appApp pool user (DML-only, RLS load-bearing)
APP_DB_PASSWORDchange_me_in_productionApp pool password — must be changed. Backend emits a warning on startup if this is still the default.

Security — required

VariableRequiredDescription
JWT_SECRETYesHMAC-SHA256 secret for access and refresh token signing. Backend refuses to start if shorter than 32 characters.
METRICS_TOKENYesBearer token for /metrics Prometheus endpoint.
CORS_ALLOWED_ORIGINSYesComma-separated list of allowed origins (frontend URL).
APP_BASE_URLYes (prod)Public URL for password-reset/invite email links.

TLS

TLS_CERT_FILEPath to TLS certificate
TLS_KEY_FILEPath to TLS private key

AI (choose one provider)

LLM_PROVIDERollama or anthropic
OLLAMA_URLOllama base URL (if provider=ollama)
OLLAMA_MODELModel name, e.g. qwen2.5:3b
ANTHROPIC_API_KEYAnthropic API key (if provider=anthropic)
ANTHROPIC_MODELModel ID (default: claude-sonnet-4-6)

Redis

REDIS_ADDRDefault localhost:6379 — used for rate limiting and sessions
REDIS_PASSWORDRedis password (empty by default)

Kafka

KAFKA_ENABLEDDefault false — set true to enable the event bus
KAFKA_BROKERSComma-separated broker list, e.g. localhost:9092
KAFKA_REQUIRE_ALL_ACKSSet true for min.insync.replicas=2 clusters

Elasticsearch

ELASTICSEARCH_URLES/OpenSearch URL, e.g. http://elasticsearch:9200
ELASTICSEARCH_USERNAMEOptional basic auth username
ELASTICSEARCH_PASSWORDOptional basic auth password

MinIO — immutable audit log export

MINIO_ENDPOINTMinIO endpoint, e.g. minio:9000
MINIO_ACCESS_KEYAccess key
MINIO_SECRET_KEYSecret key
MINIO_AUDIT_BUCKETBucket for WORM audit exports
MINIO_USE_SSLtrue / false
AUDIT_EXPORT_RETENTION_DAYSDays to retain exports (default: 365)

Agent release signing

AGENT_RELEASE_SIGNING_KEYbase64url-encoded ed25519 seed (32 bytes)
AGENT_RELEASE_REQUIRE_SIGNATUREtrue to reject unsigned release uploads
# Generate a signing key
openssl rand 32 | base64 | tr '+/' '-_' | tr -d '='

Logging

VariableDefaultDescription
LOG_FORMATtextSet json for structured production logs
LOG_LEVELinfodebug / info / warn / error

Email (optional)

SMTP_HOST / SMTP_PORTe.g. smtp.gmail.com / 587
SMTP_USER / SMTP_PASSWORDSMTP credentials (use an app password for Gmail)
SMTP_FROMFrom address for outbound alert emails

Agent-side variables

XCLOAK_SERVERBackend URL (required on first run)
LOG_FORMATtext or json
LOG_LEVELinfo by default
XCLOAK_DISABLE_SELF_UPDATESet to 1 to skip update checks