Configuration Files
Station uses a hierarchical configuration system:Global Configuration
The mainconfig.yaml file controls Station’s behavior:
Environment Variables
All settings can be overridden via environment variables:Environment variables take precedence over config file values.
AI Provider Authentication
Station supports multiple AI providers with different authentication methods.OpenAI / Gemini (API Key)
Anthropic (API Key)
Anthropic OAuth (Claude Max/Pro)
Claude Max and Pro subscribers can use OAuth instead of an API key. This uses your existing subscription—no separate API billing.OAuth tokens expire after ~4 hours but are automatically refreshed before expiry. The refresh token is stored securely in your config.
claude-opus-4-5-20251101(Claude 4.5 Opus)claude-sonnet-4-20250514(Claude 4 Sonnet)claude-sonnet-4-5-20250929(Claude 4.5 Sonnet)claude-haiku-4-5-20251001(Claude 4.5 Haiku)claude-3-5-sonnet-20241022(Claude 3.5 Sonnet)claude-3-5-haiku-20241022(Claude 3.5 Haiku)claude-3-opus-20240229(Claude 3 Opus)
MCP Server Configuration
Configure MCP servers intemplate.json:
Template Variables
Use{{VARIABLE_NAME}} syntax for dynamic values. Define them in variables.yml:
stn sync.
Agent Configuration
Define agents in.prompt files using dotprompt format:
Telemetry Configuration
Enable OpenTelemetry for distributed tracing:Workflow and Embedded NATS
Station includes an embedded NATS server for workflow orchestration and OpenCode communication. This eliminates the need for a separate NATS installation in most deployments.How Embedded NATS Works
When you start Station with workflows enabled (stn serve), it automatically:
- Starts an embedded NATS server on port 4222
- Configures workflow engine to use it
- Allows OpenCode containers to connect via
host.docker.internal:4222
Environment Variables
Auto-Detection Logic
Station automatically determines whether to use embedded NATS:Configuration Examples
- Embedded (Default)
- Custom Embedded Port
- External NATS
- Force Behavior
No configuration needed—embedded NATS starts automatically:
Docker Compose with Embedded NATS
When running Station on the host and OpenCode in a container:The
extra_hosts configuration is only needed on Linux. macOS and Windows Docker Desktop include host.docker.internal automatically.Verifying NATS Connectivity
CloudShip Integration
To connect to CloudShip platform:Notify Tool
Enable agent notifications via webhooks (ntfy, Slack, etc.):notify: true in their frontmatter can send notifications:
Environment Variables
Supported Webhook Formats
OpenCode Integration
Enable AI coding capabilities with OpenCode:Starting OpenCode
Environment Variables
OpenCode Backend
Full OpenCode integration guide with coding tools and workflows
Config Commands
Manage configuration via CLI:Next Steps
Commands
Learn all Station CLI commands
Running Station
Start the Station server

