Quick Start
Dockerfile Architecture
The official Dockerfile uses a multi-stage build for minimal image size:- Base image:
debian:bookworm-slim(~74 MB) - Build dependencies:
pkg-config,libssl-dev - Runtime dependencies:
ca-certificates(for HTTPS API calls) - Binary location:
/usr/local/bin/openfang - Agent templates:
/opt/openfang/agents - Default data volume:
/data
docker-compose.yml
The provideddocker-compose.yml configures a production-ready deployment:
Configuration Options
| Field | Description | Default |
|---|---|---|
ports | Expose API server | 4200:4200 |
volumes | Persistent data (SQLite, config, logs) | openfang-data:/data |
environment | API keys and secrets | Read from .env file |
restart | Restart policy | unless-stopped |
Port Configuration
Port 4200 is the default HTTP/WebSocket API server port.- API endpoint:
http://localhost:4200/api/* - Web dashboard:
http://localhost:4200/ - WebSocket:
ws://localhost:4200/ws
Volume Mounting
The/data volume persists:
- SQLite databases: Agent memory, conversation history
- Config file:
config.toml - Logs: Structured tracing output
- Skill cache: Downloaded MCP servers and WASM modules
Bind Mount Alternative
For direct filesystem access:./openfang-data/ directory in your current working directory.
Inspect Volume Data
Environment Variables
All OpenFang configuration can be overridden via environment variables:LLM Provider Keys
| Variable | Provider |
|---|---|
ANTHROPIC_API_KEY | Anthropic (Claude) |
OPENAI_API_KEY | OpenAI (GPT-4) |
GROQ_API_KEY | Groq (Llama) |
GEMINI_API_KEY | Google Gemini |
DEEPSEEK_API_KEY | DeepSeek |
OPENROUTER_API_KEY | OpenRouter |
Channel Adapters
| Variable | Channel |
|---|---|
TELEGRAM_BOT_TOKEN | Telegram |
DISCORD_BOT_TOKEN | Discord |
SLACK_BOT_TOKEN | Slack |
SLACK_APP_TOKEN | Slack (Socket Mode) |
System Configuration
| Variable | Description | Default |
|---|---|---|
OPENFANG_HOME | Home directory | /data |
OPENFANG_API_LISTEN | API bind address | 127.0.0.1:4200 |
RUST_LOG | Log level | openfang=info |
Health Checks
Add a health check to ensure the API server is responsive:/api/health endpoint returns:
Running from Pre-Built Image
The GHCR image is not yet public. Track issue #12 for updates.
Image Tags
| Tag | Description |
|---|---|
latest | Latest stable release |
0.1.0 | Specific version |
main | Latest commit on main branch (unstable) |
Verifying the Build
Multi-Architecture Support
The official images support:linux/amd64(x86_64)linux/arm64(Apple Silicon, ARM servers)
Logs and Debugging
View live logs
Increase log verbosity
Access logs from volume
Resource Limits
Set memory and CPU limits for production:Next Steps
Production Checklist
Prepare for production deployment
Configuration
Complete configuration reference
