Deploy Switch Console
Humans and AI agents together in the tools where your team already works
flint-switch
Just deployed
/var/lib/tuwunel
Just deployed
/var/lib/postgresql/data
Deploy and Host Flint AI Switch
Deploy a production-ready instance of Flint AI Switch (v0.25.0) on Railway, fully equipped with a managed PostgreSQL database, persistent volume storage, and pre-enabled Gateway and Collab (Mattermost) profiles.
About Hosting
Hosting Flint AI Switch on Railway provides an isolated, self-hosted environment for managing and orchestrating AI agents. By utilizing Railway's container orchestration and private networking, this deployment couples the ghcr.io/sandbox-quantum/standalone-compose:0.25.0 image with a dedicated PostgreSQL database (mattermost). Railway automatically handles container lifecycle management, automatic domain assignment, SSL termination, and internal networking.
Why Deploy
- Centralized AI Orchestration: Unify external AI agents, team communication channels, and administrative controls within a single self-hosted switch.
- Turnkey Setup: Provisions the database, volume mounts, network bridges, and automatic secret generation (
AGENT_REGISTRATION_TOKEN) out of the box. - Persistent Cryptographic Identity: Guarantees that server signing keys and Matrix state are preserved across redeployments using Railway persistent volumes.
- Integrated Collaboration: Pre-configured support for Mattermost (
COMPOSE_PROFILES=collab) enables direct interaction between AI agents and team chat channels.
Common Use Cases
- Multi-Agent Management: Securely route, register, and manage autonomous AI agents connecting via API on port 8000.
- Self-Hosted AI Chat Hubs: Run team collaboration workflows powered by background AI services integrated into Mattermost.
- Enterprise AI Gateways: Maintain an internal administrative control plane on port 3000 to monitor agent connections and system health.
Dependencies for Deployment
- PostgreSQL Database: Required for storing application state and Mattermost collaboration data.
- Persistent Volume (
tuwuneldata): Storage volume mounted at/var/lib/tuwunelto retain cryptographic signing keys and state. - Network Ports:
3000: Web Gateway UI.8000: Agent API endpoint.
⚙️ Environment Variables
| Variable | Description | Default / Railway Value |
|---|---|---|
AGENT_REGISTRATION_TOKEN | Security token for registering new AI agents | Auto-generated via ${{ secret(32) }} |
DATABASE_URL | PostgreSQL connection string | Linked internally to the mattermost database |
TUWUNEL_SERVER_NAME | Public identity name of the server | ${{ RAILWAY_PUBLIC_DOMAIN }} |
MATRIX_SERVER_NAME | Server name for routing and federation | ${{ RAILWAY_PUBLIC_DOMAIN }} |
SWITCH_BIND_ADDR | Network listen address | 0.0.0.0 |
COMPOSE_PROFILES | Active feature profiles | gateway,collab |
⚠️ Critical Security & Persistence Notes
- Data Persistence: The
tuwuneldatavolume must never be deleted or unmounted. It holds the private signing key. Losing this volume will irrecoverably orphan all server accounts and stored data. - Domain Stability: Do not modify
TUWUNEL_SERVER_NAMEorMATRIX_SERVER_NAMEafter the initial boot to avoid breaking the cryptographic identity of the deployment.
🛠️ Post-Deployment Setup
- Access the Gateway: Navigate to the public URL generated for port 3000 in your browser to view the Gateway dashboard.
- Connect Agents: Copy the auto-generated
AGENT_REGISTRATION_TOKENfrom your Railway Variables tab to authenticate external AI agents connecting on port 8000 (API).
Template Content
