Skip to content

AXGZ21/tinyclaw-railway-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TinyClaw Railway Template

A Railway deployment template for TinyClaw - a multi-agent, multi-team, multi-channel AI assistant framework with web-based configuration via TinyOffice.

Deploy to Railway

Deploy on Railway

Environment Variables

Set the following variables in your Railway project:

AI Provider (Required)

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.

Channels

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

TinyOffice Web Portal

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

Optional Settings

Variable Default Description
HEARTBEAT_INTERVAL 30 Heartbeat interval (seconds)
WORKSPACE_NAME default Workspace directory name

TinyOffice Portal Configuration

Yes! All AI providers can be configured through TinyOffice:

  1. Deploy the template with at least one API key
  2. Access TinyOffice at your Railway service URL
  3. Go to Settings -> Models
  4. 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

OAuth Login Support

Both Claude Code and Codex CLI support OAuth authentication:

Claude Code (Anthropic)

  • 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

Codex CLI (OpenAI)

  • 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 Setup

WhatsApp requires QR code authentication. After deploying:

  1. Go to your Railway service logs
  2. You'll see a QR code terminal output
  3. Scan the QR code with WhatsApp on your phone
  4. The session will be saved persistently

Architecture

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).

Supported Models

Anthropic Claude

  • claude-sonnet-4-20250514 (default, fast)
  • claude-opus-4-20250514 (smartest)

OpenAI Codex

  • gpt-5.2
  • gpt-5.3-codex (default)

OpenCode

  • CLI wrapper - configure providers via TinyOffice

Ports

Port Service
3000 TinyOffice Web Portal
3777 TinyClaw Backend API

Quick Start

  1. Click "Deploy to Railway" button
  2. Add required environment variables:
    • At least one: ANTHROPIC_API_KEY or OPENAI_API_KEY
    • DISCORD_TOKEN / TELEGRAM_TOKEN (as needed)
  3. Deploy and wait for startup
  4. For WhatsApp: Check logs for QR code and scan with your phone
  5. 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

About

TinyClaw Railway deployment template - multi-agent AI assistant with TinyOffice

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors