Skip to main content

Overview

UseZombie components are configured through environment variables. Each role (API, Worker, Executor) requires a different set of variables. On bare-metal deployments, variables are loaded from /opt/zombie/.env via the systemd EnvironmentFile directive. UseZombie uses role-separated database and Redis URLs. The API and worker each get their own connection string with role-appropriate permissions.

API server

Variables required by zombied serve.
VariableRequiredDefaultDescription
DATABASE_URL_APIYesPostgreSQL connection string for the API role.
REDIS_URL_APIYesRedis connection string for the API role.
CLERK_SECRET_KEYYesClerk backend API secret key for JWT verification.
ENCRYPTION_MASTER_KEYYesMaster encryption key for secrets at rest.
PORTNo3000HTTP API listen port.
API_HTTP_THREADSNo1HTTP thread pool size.
API_HTTP_WORKERSNo1HTTP worker count.
API_MAX_CLIENTSNo1024Maximum concurrent client connections.
API_MAX_IN_FLIGHT_REQUESTSNo256Maximum in-flight request limit.
RATE_LIMIT_CAPACITYNo30Token bucket capacity for rate limiting.
RATE_LIMIT_REFILL_PER_SECNo5.0Token bucket refill rate per second.
DEFAULT_MAX_ATTEMPTSNo3Default maximum run retry attempts.
APP_URLNohttps://app.usezombie.comApplication base URL for links.
GIT_CACHE_ROOTNo/tmp/zombie-git-cacheGit bare repo cache directory.

OIDC (optional, alternative to Clerk)

VariableRequiredDefaultDescription
OIDC_PROVIDERNoOIDC provider name (enables OIDC auth path).
OIDC_JWKS_URLNoJWKS endpoint URL for token verification.
OIDC_ISSUERNoExpected token issuer.
OIDC_AUDIENCENoExpected token audience.

Worker

Variables required by zombied worker.
VariableRequiredDefaultDescription
DATABASE_URL_WORKERYesPostgreSQL connection string for the worker role.
REDIS_URL_WORKERYesRedis connection string for work queue claims.
SANDBOX_BACKENDNohostSandbox backend: host (no isolation) or bubblewrap.
WORKER_CONCURRENCYNo1Number of concurrent runs this worker can claim.
RUN_TIMEOUT_MSNo300000Maximum wall-clock time for a single run (5 min default).
EXECUTOR_SOCKET_PATHNo/run/zombie/executor.sockPath to the executor Unix socket.
DRAIN_TIMEOUT_MSNo270000Graceful shutdown timeout when draining active runs.
EXECUTOR_STARTUP_TIMEOUT_MSNo5000How long to wait for executor sidecar to become available.
EXECUTOR_LEASE_TIMEOUT_MSNo30000Executor lease validity period (heartbeat interval).

Executor

Variables required by zombied-executor.
VariableRequiredDefaultDescription
SANDBOX_BACKENDNohostSandbox backend: host or bubblewrap. Must match the worker setting.
EXECUTOR_MEMORY_LIMIT_MBNo512Memory limit per agent execution in megabytes.
EXECUTOR_CPU_LIMIT_PERCENTNo100CPU limit as a percentage of one core.
SANDBOX_KILL_GRACE_MSNo5000Grace period before force-killing a sandbox after timeout.
Network policy (deny-by-default) is applied automatically by the executor’s sandbox layer. There is no environment variable to configure it. The policy is hardcoded in network.zig and denies all egress by default.

Shared variables

These variables are used by multiple roles.
VariableUsed byDescription
SANDBOX_BACKENDWorker, ExecutorMust be set to the same value on both.
LOG_LEVELAllLog verbosity: debug, info, warn, error. Default: info.