Speko Docs

Configuration

Every environment variable the gateway reads.

The gateway is configured entirely through environment variables. Every secret-bearing variable also accepts an exclusive _FILE variant (NAME_FILE=/path) — setting both NAME and NAME_FILE is an error, secret files are capped at 64 KiB, and an empty file is an error.

Core

VariableDefaultPurpose
SPEKO_LOCAL_AUTH_TOKENrequiredBearer token for the local API
SPEKO_API_KEYunsetEnables Speko-managed mode
SPEKO_SOCKET_PATH/run/speko/runtime.sockAbsolute Unix socket path
SPEKO_MAX_SESSIONS100Per-process session capacity
SPEKO_LOCAL_MAX_SESSION_DURATION24hProvider-direct session hard deadline
SPEKO_TELEMETRY_DISABLEDfalseOpt out of optional telemetry
SPEKO_RUNTIME_INSTANCE_IDhostnameNon-secret process identity
SPEKO_WORKLOAD_TYPEagent when an ID is setDashboard workload category
SPEKO_WORKLOAD_IDunsetStable workload identity for the dashboard

Control plane (managed mode)

VariableDefaultPurpose
SPEKO_CONTROL_PLANE_URLhttps://gateway.speko.devSpeko control plane
SPEKO_JWKS_URL<control-plane>/.well-known/jwks.jsonPlan signing keys
SPEKO_PLAN_ISSUERcontrol-plane URLRequired plan issuer
SPEKO_PLAN_AUDIENCEspeko-runtimeRequired plan audience
SPEKO_INSTANCE_HEARTBEAT_INTERVAL20sWorker heartbeat interval

Warm plan pool (managed mode)

VariableDefaultPurpose
SPEKO_WARM_PLAN_TARGET4Prefetched plans per route; 0 disables
SPEKO_WARM_ROUTESunsetPre-declared routes: kind:provider[:model[:language]], comma-separated
SPEKO_WARM_TTS_MAX_CHARACTERS100000Character allowance requested for warmed TTS routes

BYOK provider keys

Set any of these to enable that provider for BYOK requests:

SPEKO_ALIBABA_BYOK_API_KEY, SPEKO_ASSEMBLYAI_BYOK_API_KEY, SPEKO_CARTESIA_BYOK_API_KEY, SPEKO_DEEPGRAM_BYOK_API_KEY, SPEKO_ELEVENLABS_BYOK_API_KEY, SPEKO_FISH_BYOK_API_KEY, SPEKO_GLADIA_BYOK_API_KEY, SPEKO_GOOGLE_BYOK_ACCESS_TOKEN, SPEKO_GRADIUM_BYOK_API_KEY, SPEKO_HUME_BYOK_API_KEY, SPEKO_INWORLD_BYOK_API_KEY, SPEKO_MINIMAX_BYOK_API_KEY, SPEKO_MODULATE_BYOK_API_KEY, SPEKO_OPENAI_BYOK_API_KEY, SPEKO_RIME_BYOK_API_KEY, SPEKO_SMALLEST_BYOK_API_KEY, SPEKO_SONIOX_BYOK_API_KEY, SPEKO_XAI_BYOK_API_KEY

Provider-specific configuration:

  • Google STT additionally requires SPEKO_GOOGLE_STT_ENDPOINT set to a project-scoped recognizer URL; the catalog row stays visible but unroutable until it is configured.
  • TTS voice overrides use SPEKO_<PROVIDER>_BYOK_TTS_VOICE when a deployment needs a provider-specific default.

Container hardening

The published image is distroless and runs as UID/GID 65532. The reference docker-compose file runs it with read_only: true, cap_drop: ALL, no-new-privileges, a named volume on /run/speko, and a small noexec tmpfs on /tmp. Because the documented setup shares one container between agent and gateway, the agent process can read the container environment — use separate containers when you need process-level credential isolation.

On this page