tulipfarm docs
Reference

Environment variables

Every variable TulipFarm reads, with defaults and descriptions.

TulipFarm is configured through environment variables. In self-hosted installs the installer writes these to /opt/tulipfarm/.env; in local development they live in .env.local. The tables below cover every variable the app reads.

Required (all deployments)

VariableDefaultDescription
DATABASE_URLPostgreSQL 17 connection string. The single datastore (pgvector + pg-boss). Must allow the vector and citext extensions — the app creates them at boot.
SOUL_PATHAbsolute path to the soul git repository. Must be outside the project repo — a relative or in-repo path is rejected at boot.
ENCRYPTION_KEYBase64-encoded 32-byte key for encrypting application secrets. Startup fails fast if the key is absent or not 32 bytes. Generate with openssl rand -base64 32.
JWT_SECRETRequired, validated as 32-byte base64 at boot. Reserved for request signing — no feature is wired to it yet (API tokens are stored as hashes, not JWTs — see Hashing). Generate with openssl rand -base64 32.
WEBHOOK_SIGNING_SECRETRequired, validated as 32-byte base64 at boot. Reserved for webhook signature verification — not yet wired (the routine webhook uses a per-trigger shared secret instead). Generate with openssl rand -base64 32.

Headless seeding

Set all three together to skip the web setup wizard and seed the first admin account automatically on first boot. Leave all three unset (the default for curl | bash installs) to use the interactive browser wizard instead.

See First-run setup and boot modes for a full explanation of how the instance decides which path to take.

VariableDefaultDescription
ADMIN_EMAILEmail for the first admin account. Must be a valid email format.
ADMIN_PASSWORDPassword for the first admin account.
LLM_API_KEYAPI key for the default LLM provider. Required alongside ADMIN_EMAIL + ADMIN_PASSWORD in production — omitting it in production causes the API to refuse to start.
LLM_PROVIDERanthropicProvider for LLM_API_KEY. Accepts anthropic or openai.
BUSINESS_NAMEWritten to soul.yaml as businessName during headless seeding. Optional.
BUSINESS_DESCRIPTIONWritten to soul.yaml as businessDescription. Only used when BUSINESS_NAME is also set.

OCI / production

Variables used by the Docker Compose stack and the production image. The installer generates and writes these; they are documented here for reference.

VariableDefaultDescription
PUBLIC_URLhttp://localhost:8080The externally reachable URL for this instance. Drives CORS and the cookie Secure flag. Set to an https:// URL once behind TLS.
CORS_ORIGINvalue of PUBLIC_URLAllowed browser origin for the API. Override only if the web UI is served from a different origin than the API.
COMPOSE_PROFILESbundledSet to bundled to start the included postgres container. Set to empty (COMPOSE_PROFILES=) to use an external database (see EXTERNAL_DATASTORE).
EXTERNAL_DATASTOREfalseSet to true when COMPOSE_PROFILES is empty and DATABASE_URL points to a managed Postgres. Suppresses the bundled container.
POSTGRES_PASSWORDPassword for the bundled Postgres container. Installer-generated; not used when EXTERNAL_DATASTORE=true.
PORT8080Port the API listens on inside the container.
NODE_ENVproductionRuntime environment. Affects logging, cookie flags, and headless-seeding validation.

Optional (all deployments)

VariableDefaultDescription
SESSION_TTL_SECONDS604800Session cookie lifetime in seconds (7 days).
VITE_PORT4000Port the web UI dev server listens on (local development only).
SOUL_GIT_REMOTE_URLRemote for the soul repository. When set, the instance clones on first boot and syncs on a schedule. Can also be set from the setup wizard, which syncs immediately.
SOUL_GIT_CREDENTIALCredential for pushing to SOUL_GIT_REMOTE_URL (e.g. a GitHub personal access token).
BOT_GIT_NAMEtulipfarm-botGit commit author name for soul writes. See Soul.
BOT_GIT_EMAILtulipfarmhq@gmail.comGit commit author email for soul writes. See Soul.
ENCRYPTION_KEY_PREVIOUSThe prior ENCRYPTION_KEY during a key rotation. Decryption tries the current key first, then this one. See Secrets.
API_TOKEN_PEPPERBase64 server secret (32 bytes). When set, API tokens are hashed with HMAC-SHA256(token, pepper) instead of plain SHA-256. See Hashing.
HOOKS_DISABLEDSet to true to skip resource hooks.ts execution entirely. Use to boot an instance whose hooks are failing.
KNOWLEDGE_TRGM_FALLBACKonTypo-tolerance pass (pg_trgm) for lexical page search. Opt-out: set to 0 or false to turn it off.
MARKETPLACE_SOURCEtulipfarm/skillsThe owner/repo the Skills marketplace scans by default.

On this page