A Railway deployment template for TinyClaw - a multi-agent, multi-team, multi-channel AI assistant framework with web-based configuration via TinyOffice.
Set the following variables in your Railway project:
Option 1: Anthropic (Claude) - Default
| Variable | Default | Description |
|---|---|---|
AI_PROVIDER |
anthropic |
AI provider |
ANTHROPIC_API_KEY |
- | Your Anthropic API key |
AI_MODEL |
claude-sonnet-4-20250514 |
Claude model (sonnet, opus) |
Authentication: Supports OAuth login via:
- Claude for Teams/Enterprise (SSO)
- Microsoft Foundry (Entra ID)
- Or use API key via Anthropic Console
Option 2: OpenAI (Codex)
| Variable | Default | Description |
|---|---|---|
AI_PROVIDER |
openai |
AI provider |
OPENAI_API_KEY |
- | Your OpenAI API key |
AI_MODEL |
gpt-5.3-codex |
Codex model (gpt-5.2, gpt-5.3-codex) |
Authentication: Supports OAuth login via:
- Sign in with ChatGPT (Plus, Pro, Team, Edu, Enterprise)
- Or use API key
Option 3: OpenCode (CLI)
| Variable | Default | Description |
|---|---|---|
AI_PROVIDER |
opencode |
Use OpenCode CLI |
| API keys configured via TinyOffice |
OpenCode is a CLI that wraps multiple AI providers. After selecting OpenCode in TinyOffice, you configure which providers to use and their API keys directly in the OpenCode settings.
| Variable | Default | Description |
|---|---|---|
CHANNELS |
discord,telegram,whatsapp |
Comma-separated list |
Bot Tokens:
| Variable | Required | Description |
|---|---|---|
DISCORD_TOKEN |
If Discord enabled | Your Discord bot token |
TELEGRAM_TOKEN |
If Telegram enabled | Your Telegram bot token |
| Variable | Default | Description |
|---|---|---|
TINYOFFICE_ENABLED |
true |
Enable TinyOffice portal |
TINYOFFICE_PORT |
3000 |
Port for web portal |
NEXT_PUBLIC_API_URL |
http://localhost:3777 |
Backend API URL |
| Variable | Default | Description |
|---|---|---|
HEARTBEAT_INTERVAL |
30 |
Heartbeat interval (seconds) |
WORKSPACE_NAME |
default |
Workspace directory name |
Yes! All AI providers can be configured through TinyOffice:
- Deploy the template with at least one API key
- Access TinyOffice at your Railway service URL
- Go to Settings -> Models
- Select your provider:
- Anthropic: Claude Sonnet or Opus (requires API key in env)
- OpenAI: GPT-5.2 or GPT-5.3-Codex (requires API key in env)
- OpenCode: CLI that supports multiple providers
- After selecting OpenCode, configure the underlying provider API keys in TinyOffice
TinyOffice also allows you to:
- Create and manage agents
- Organize agents into teams
- Configure Discord/Telegram/WhatsApp channels
- Monitor queue status and logs in real-time
Both Claude Code and Codex CLI support OAuth authentication:
- SSO Login: Claude for Teams/Enterprise - Sign in with your organization's SSO
- Microsoft Entra ID: If deploying via Microsoft Foundry
- ChatGPT Account: Sign in with ChatGPT Plus, Pro, Team, Edu, or Enterprise
- ChatGPT OAuth: Sign in with your ChatGPT account (Plus, Pro, Team, Edu, Enterprise)
For production deployments, you can use:
- API keys (simpler setup)
- OAuth/SSO (better for teams, centralized management)
WhatsApp requires QR code authentication. After deploying:
- Go to your Railway service logs
- You'll see a QR code terminal output
- Scan the QR code with WhatsApp on your phone
- The session will be saved persistently
This template runs:
- Message queue processor (always)
- Discord client (if CHANNELS includes discord)
- Telegram client (if CHANNELS includes telegram)
- WhatsApp client (if CHANNELS includes whatsapp)
- TinyOffice portal (if TINYOFFICE_ENABLED=true)
All data is persisted in the Railway persistent filesystem (/.tinyclaw).
claude-sonnet-4-20250514(default, fast)claude-opus-4-20250514(smartest)
gpt-5.2gpt-5.3-codex(default)
- CLI wrapper - configure providers via TinyOffice
| Port | Service |
|---|---|
| 3000 | TinyOffice Web Portal |
| 3777 | TinyClaw Backend API |
- Click "Deploy to Railway" button
- Add required environment variables:
- At least one:
ANTHROPIC_API_KEYorOPENAI_API_KEY DISCORD_TOKEN/TELEGRAM_TOKEN(as needed)
- At least one:
- Deploy and wait for startup
- For WhatsApp: Check logs for QR code and scan with your phone
- Access TinyOffice at your Railway URL to:
- Configure AI providers and models
- If using OpenCode: set up provider API keys in OpenCode settings
- Create agents and teams
- Manage channels