DOCS · REFERENCE

Configuration

Every environment variable specd reads, what it defaults to, and which ones fail closed.

On this page

Configuration lives in a repo-root .env. The API, the migration runner and Next.js each load it themselves — nothing needs sourcing into your shell.

Core

VariableNotes
DATABASE_URLPostgres with the vector extension. docker-compose maps host 5433 to avoid clashing with a local Postgres on 5432.
PORTAPI port. Default 4000.
API_PUBLIC_URLHow the outside world reaches the API — used for webhook URLs and the App registration flow.
WEB_ORIGINOrigin of the web app, for CORS and links.
JWT_SECRETSession signing. Change it in any non-local environment.
VAULT_MASTER_KEY32-byte master key for the credential vault (envelope encryption). Generate with openssl rand -base64 32.

AI

VariableNotes
ANTHROPIC_API_KEYOptional. Without it the platform still runs; agent runs fail with a clear, honest error.
SPECD_DEFAULT_MODELPlatform default. Allowlist: claude-opus-5 · claude-sonnet-5 · claude-haiku-4-5.
SPECD_AI_MODESet to subscription_runner to drive the locally signed-in Claude Code CLI instead of an API key.
SPECD_USD_TO_EUREUR per USD, used to meter run cost from the model's USD rates.

Knowledge index

VariableNotes
SPECD_EMBEDDING_PROVIDERhash (default — deterministic, offline, lexical), voyage, or openai for any OpenAI-compatible /v1/embeddings endpoint.
VOYAGE_API_KEYRequired by voyage. The API refuses to start without it rather than falling back to hash behind your back.
SPECD_EMBEDDING_BASE_URLFor openai — e.g. http://localhost:11434/v1 for Ollama.
SPECD_EMBEDDING_MODELMust produce 1024-dimension vectors. mxbai-embed-large fits; nomic-embed-text is 768 and is refused.
SPECD_EMBEDDING_API_KEYFor endpoints that need one.

VCS

VariableNotes
SPECD_LOCAL_REPO_ROOTRoot the local-git adapter may touch. Repos registered via specd connect must live under it.
GITHUB_APP_ID · GITHUB_APP_SLUG · GITHUB_APP_PRIVATE_KEYFrom the App GitHub generated. Real newlines or \n escapes both work.
GITHUB_WEBHOOK_SECRETRequired for webhooks. Empty rejects every delivery — it never means "skip the signature check".
GITLAB_WEBHOOK_SECRETSame rule, same reason.
GITHUB_API_BASE · GITHUB_BASE · GITHUB_CLONE_BASEGitHub Enterprise Server only.
SPECD_BUILD_ROOTScratch root for hosted build clones. Each run gets its own directory and deletes it afterwards. Defaults to the system temp dir.

Workers and retention

VariableDefaultNotes
SPECD_INDEX_WORKER_ENABLEDtrueThe in-process index worker.
SPECD_INDEX_POLL_MS60000A backstop for a dropped LISTEN connection — not how work normally starts.
SPECD_INDEX_LEASE_SECONDS900How long a claimed index run is held.
SPECD_WEBHOOK_RETENTION_DAYS30Delivery rows are the audit trail for "why did specd do that last week".
SPECD_WEBHOOK_PRUNE_INTERVAL_MS86400000Pruned daily and at startup.
SPECD_RUNNER_LEASE_SECONDS180Lease for spec/onboard jobs.
SPECD_RUNNER_LEASE_BUILD_SECONDS900Builds legitimately take longer to look alive.
SPECD_RUNNER_MAX_RECLAIMS3Then failed as repeatedly abandoned, rather than bouncing forever.
SPECD_RUNNER_POLL_MS5000Runner daemon poll interval.