Fabric is configured via CLI flags, environment variables, or a TOML config file. Environment variables take precedence over config file values; CLI flags take precedence over both.
Resolution order (lowest to highest):
Built-in defaults
fabric.toml config file
Environment variables / .env file
CLI flags
Flag Env Var TOML Path Default Description --hostHOSTserver.host127.0.0.1HTTP bind address --portPORTserver.port3001HTTP port --grpc-portGRPC_PORTserver.grpc_port3002gRPC port --database-urlDATABASE_URLdatabase.url— Postgres connection string (required ) — DATABASE_DIRECT_URLdatabase.direct_url— Direct Postgres URL (bypasses pooler). Used for LISTEN/NOTIFY and migrations. Falls back to DATABASE_URL. — DATABASE_MIGRATION_URLdatabase.migration_url— Separate connection string for migrations (overrides DATABASE_DIRECT_URL) — DATABASE_POOL_MAXdatabase.pool_max15Maximum connections in the pool — DATABASE_POOL_MINdatabase.pool_min2Minimum idle connections in the pool — RUST_LOG— infoLog level filter (tracing)
Flag Env Var TOML Path Default Description --fabric-envFABRIC_ENVruntime.envdevelopmentSet to production to disable dev-header auth — FABRIC_MODEruntime.modeserverserver or request-only (stateless/serverless)— FABRIC_DEV_MODEruntime.dev_mode— 1 or true to force dev-header auth— FABRIC_API_KEYruntime.api_key— Admin API key for CLI subcommands — FABRIC_WORKFLOW_DIRSruntime.workflow_dirs— CSV of extra workflow YAML directories — FABRIC_CONFIG— — Explicit path to config file
Flag Env Var TOML Path Default Description — OAUTH_SIGNING_SECRETauth.oauth_signing_secret— Secret for signing native OAuth tokens — JWT_SECRETauth.jwt_secret— JWT HS256 secret for token validation
Env Var Description GOOGLE_CLIENT_IDGoogle OAuth client ID GOOGLE_CLIENT_SECRETGoogle OAuth client secret GITHUB_CLIENT_IDGitHub OAuth client ID GITHUB_CLIENT_SECRETGitHub OAuth client secret
Env Var Description PUBLIC_BASE_URLPublic API base URL (used in email links) AUTH_SITE_URLFrontend URL for auth redirects AUTH_CALLBACK_REDIRECT_URLOAuth callback redirect URL
Flag Env Var TOML Path Default Description --openai-api-keyOPENAI_API_KEYproviders.openai_api_key— OpenAI (text, image, embedding, streaming) — OPENAI_BASE_URL— https://api.openai.com/v1Custom OpenAI-compatible endpoint --anthropic-api-keyANTHROPIC_API_KEYproviders.anthropic_api_key— Anthropic Claude (text) — GOOGLE_API_KEYproviders.google_api_key— Google Gemini (text, image, audio) — FAL_API_KEYproviders.fal_api_key— FAL (image, video generation) — ELEVENLABS_API_KEY— — ElevenLabs text-to-speech — REPLICATE_API_TOKEN— — Replicate model API — PEXELS_API_KEY— — Pexels stock footage (b-roll) — FABRIC_LOCAL_ONLYproviders.local_onlyfalseDisable all remote providers — FABRIC_ROUTING_STRATEGYproviders.routing_strategycheapest_qualifiedDefault routing strategy (local_first, fastest, best_quality, balanced)
Flag Env Var TOML Path Default Description --ollama-enabledOLLAMA_ENABLEDproviders.ollama_enabledfalseEnable Ollama LLM provider --ollama-urlOLLAMA_URLproviders.ollama_urlhttp://localhost:11434Ollama server URL — WHISPER_URLproviders.whisper_url— Whisper transcription server URL — WHISPER_MODELproviders.whisper_model— Whisper model selection override — PIPER_URLproviders.piper_url— Piper TTS server URL — CHATTERBOX_URLproviders.chatterbox_url— Chatterbox voice cloning server URL --comfyui-enabledCOMFYUI_ENABLEDproviders.comfyui_enabledfalseEnable ComfyUI image generation --comfyui-urlCOMFYUI_URLproviders.comfyui_urlhttp://localhost:8188ComfyUI server URL --onnx-model-dirONNX_MODEL_DIRproviders.onnx_model_dir— ONNX model directory --candle-enabledCANDLE_ENABLEDproviders.candle_enabledtrueEnable Candle ML inference — LLAMA_CPP_MODELproviders.llama_cpp_model— Path to GGUF model file (requires llama-cpp feature)
Configured via fabric.toml only (not env vars):
[[providers.custom_openai_endpoints]]
name = " localai " # Provider ID for routing
url = " http://localhost:8080/v1 "
api_key = " no-key " # Use "no-key" if server doesn't require auth
model = " mistral-7b " # Default model to advertise
tier = " basic " # "basic", "balanced", or "premium"
Env Var TOML Path Default Description RESEND_API_KEYemail.resend_api_key— Resend API key for transactional email FABRIC_EMAIL_FROMemail.from_addressnoreply@fabric.localDefault sender email address FABRIC_INVITE_TOKEN_KEY— auto-generated 64-char hex (32-byte BLAKE3 key) for invitation tokens FABRIC_INVITE_REDIRECT_URL— — URL to redirect to after invitation accept
Env Var TOML Path Default Description ASSET_STORE_URLassets.store_url— file:///path, s3://bucket, gs://bucket, memory://ASSET_TTL_HOURSassets.generated_asset_ttl_hours72Auto-expire workflow assets (0 = never) ASSET_REAPER_INTERVAL_SECSassets.reaper_poll_interval_secs300Cleanup poll interval in seconds
For S3/GCS backends, also set:
Env Var Description AWS_ACCESS_KEY_IDS3/GCS access key AWS_SECRET_ACCESS_KEYS3/GCS secret key AWS_REGIONAWS region or local for Supabase Storage AWS_ENDPOINTCustom S3 endpoint (for Supabase Storage, MinIO) AWS_ALLOW_HTTPtrue for non-TLS endpoints (local dev)
Env Var TOML Path Default Description CORS_ALLOWED_ORIGINScors.allowed_origins— CSV of allowed origins
Env Var Default Description RATE_LIMIT_MAX_REQUESTS200Max requests per window RATE_LIMIT_WINDOW_SECS60Window in seconds RATE_LIMIT_BACKENDmemorymemory or redis
Env Var TOML Path Default Description FABRIC_WORKERSworkers.count1Number of worker threads FABRIC_WORKER_ID_PREFIXworkers.id_prefixfabric-workerWorker ID prefix FABRIC_WORKER_POLL_INTERVALworkers.poll_interval2.0Poll interval in seconds FABRIC_WORKER_TAGSworkers.tags— CSV of worker capability tags
Env Var TOML Path Default Description CRON_POLL_INTERVAL_SECScron.poll_interval_secs30Cron job poll interval in seconds
Flag Env Var Default Description --worker-idWORKER_IDrandom UUID Unique worker identity --concurrencyWORKER_CONCURRENCY4Max steps to claim per poll cycle --poll-intervalWORKER_POLL_INTERVAL500Poll interval in milliseconds --lease-secondsWORKER_LEASE_SECONDS30Lease TTL before auto-expiry --max-retriesWORKER_MAX_RETRIES3Max retry attempts per step --database-urlDATABASE_URL— Postgres connection string — RUST_LOGinfoLog level filter
Profile Services defaultPostgres aiPostgres + Ollama + Whisper + ComfyUI fullEverything
Command Description just infra-upFull stack (Postgres + Ollama + Whisper + ComfyUI) just infra-up-dbPostgres only just infra-up-aiPostgres + AI services just infra-downStop everything just infra-resetFresh start (delete volumes) just infra-psqlOpen psql shell just infra-migrateRe-apply migrations just infra-smoke-testVerify migrations on clean DB just ollama-pull <model>Pull an Ollama model just ollama-listList available Ollama models
Command Description just devStart control plane + executor just runStart control plane only just fmtFormat all code just clippyLint with -D warnings just testRun all tests just docBuild documentation just ciAll of the above
DATABASE_URL = postgres://fabric:fabric@localhost:5432/fabric
OAUTH_SIGNING_SECRET = your-32-char-secret-here-generate-one
OLLAMA_URL = http://localhost:11434
WHISPER_URL = http://localhost:8080
FABRIC_ROUTING_STRATEGY = local_first
# === Remote AI (add keys as needed) ===
# ANTHROPIC_API_KEY=sk-ant-...
ASSET_STORE_URL = file:///tmp/fabric/assets
# === CORS (for frontend dev) ===
# CORS_ALLOWED_ORIGINS=http://localhost:3000,http://localhost:5173