Skip to main content

YAML Configuration

Crewship can be configured via a YAML file passed at startup. Environment variables override YAML values. The config is loaded and validated in internal/config/config.go.
The config file has thirteen top-level sections: server, ipc, container, storage, state, logging, auth, llm_proxy, keeper, license, composio, local_models, and orchestrator. The Complete Reference below shows every field with its default; Section Details explains the load-bearing ones.

Loading Order

Complete Reference

Section Details

Server

The shutdown_timeout controls how long the server waits for in-flight requests to complete during graceful shutdown. The server port must be between 1 and 65535.

Container

Kubernetes provider is on the v0.2 roadmap.
The container_prefix is prepended to container names. For example, with container_prefix: "prod", a container would be named prod-team-engineering instead of crewship-team-engineering. Essential for multi-instance deployments.

Storage

The base_path stores crew workspace files, agent output, and persistent data. The log_path stores agent execution logs. memory_root is the parent of the per-workspace memory tier; leave it empty and that tier (and memory versioning) is off. run_output_path selects a host-private directory for protected execution output on supported local Linux Docker runtimes. Startup derives <data-root>/run-output when unset; explicit YAML run_output_path: "" disables capture. CREWSHIP_RUN_OUTPUT_PATH overrides the path. Never mount it into a crew. run_output_max_bytes and run_output_max_runs bound aggregate retained captures; zero selects the defaults of 1 GiB and 4096 runs. Each active run reserves 64 MiB plus 64 KiB of metadata; verified terminal captures release unused reserved bytes. Fully acknowledged natural terminal sources are collected after seven days. Incomplete or forced output remains available for reconciliation. The five page_* keys configure custom Page applications. They are the file-config form of CREWSHIP_PAGE_PROJECTS_PATH, CREWSHIP_PAGE_BUILD_IMAGE, CREWSHIP_PAGE_STUDIO_ORIGIN, CREWSHIP_PAGE_RUNTIME_ORIGIN and CREWSHIP_PAGE_RUNTIME_DEVELOPMENT_SAME_ORIGIN, and the env var wins when both are set. Validation is the same on both paths: page_projects_path must be absolute and must not sit inside (or contain) base_path; page_build_image needs page_projects_path and an immutable sha256:… ID or repository@sha256:… digest; page_runtime_origin must be a different site from the Studio origin unless page_runtime_development_same_origin is true. See the Environment Reference for what each one guards.

State

BoltDB is the default state store for agent run tracking. A PostgreSQL state provider for high-throughput deployments is on the v0.2 roadmap. The /var/lib/crewship/state.db default holds for a packaged install (the deb/rpm unit pins CREWSHIP_DATA_DIR=/var/lib/crewship). Point CREWSHIP_DATA_DIR anywhere else and the default becomes <dataDir>/state.db — the bbolt file is exclusively locked by one process, so instances that share a data root cannot share it. The IPC socket_path default follows the same rule.

Auth

Never commit the jwt_secret or internal_token to version control. Use environment variables for sensitive values.

LLM Proxy

The LLM proxy manages token usage tracking and provider health monitoring.

Orchestrator

max_concurrent_runs bounds how many agent runs the orchestrator executes at once; the rest wait in its queue. It must be greater than zero (validation refuses 0 or a negative value), and CREWSHIP_MAX_CONCURRENT_RUNS overrides it. The cap is read once when the orchestrator is built, so changing either takes effect on the next restart.

Keeper

For development, start Ollama with models on an external SSD:
Then enable Keeper: KEEPER_OLLAMA_URL=http://localhost:11434 ./dev.sh start

Minimal Configuration

As of PR #446, no env vars are required for first boot. Run crewship start against an empty data directory and the server will:
  • Listen on 0.0.0.0:8080
  • Use Docker as container provider
  • Store data in ~/.crewship (or $CREWSHIP_DATA_DIR)
  • Use BoltDB for state
  • Auto-generate ENCRYPTION_KEY, NEXTAUTH_SECRET, and CREWSHIP_INTERNAL_TOKEN with crypto/rand, persisting them to <dataDir>/secrets.env at mode 0600
  • Auto-derive the NextJS URL from the listen port
Set env vars only when you need to override a default (different port, external secret manager, custom data dir, etc.). See Environment Reference for the full list.

Production Configuration