Skip to main content

Configuration Files

Station uses a hierarchical configuration system:

Global Configuration

The main config.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.
After login, your config is automatically updated:
OAuth tokens expire after ~4 hours but are automatically refreshed before expiry. The refresh token is stored securely in your config.
Supported Claude Models:
  • 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 in template.json:

Template Variables

Use {{VARIABLE_NAME}} syntax for dynamic values. Define them in variables.yml:
Or set them as environment variables - Station will prompt for missing values during stn sync.

Agent Configuration

Define agents in .prompt files using dotprompt format:
Provide detailed feedback with line numbers where applicable.
Or via environment:

Telemetry Configuration

Enable OpenTelemetry for distributed tracing:
Or start Jaeger and enable on the fly:

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:
  1. Starts an embedded NATS server on port 4222
  2. Configures workflow engine to use it
  3. 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

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:
Get your registration key from CloudShip Dashboard.

Notify Tool

Enable agent notifications via webhooks (ntfy, Slack, etc.):
Once configured, agents with notify: true in their frontmatter can send notifications:

Environment Variables

Supported Webhook Formats

OpenCode Integration

Enable AI coding capabilities with OpenCode:

Starting OpenCode

When using stn up container mode, OpenCode must be started with --hostname 0.0.0.0 to allow connections from the container. Station automatically rewrites localhost to host.docker.internal in the container config.

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