---
title: "Deploy MultiVibe AI Gateway"
description: "OpenAI-compatible gateway pooling many AI provider accounts behind one key"
category: "AI/ML"
url: https://railway.com/deploy/multivibe-ai-gateway
---

# Deploy MultiVibe AI Gateway

OpenAI-compatible gateway pooling many AI provider accounts behind one key

**[Deploy MultiVibe AI Gateway on Railway](https://railway.com/template/multivibe-ai-gateway)**

Machine-readable deploy manifest (JSON, validated by TemplateCI): https://railway.com/deploy/multivibe-ai-gateway/manifest.json

- **Creator:** My Projects
- **Category:** AI/ML

## Template content

### multivibe https://raw.githubusercontent.com/thibautrey/multivibe/main/assets/brand/favicon/favicon-512x512.png

- **Source:** thibautrey/multivibe
- **Start command:** `/bin/sh -c "if [ ! -f /app/modules/security/multivibe.module.json ]; then mkdir -p /app/modules/security && node -e 'fetch(process.argv[1]).then(r=>{if(!r.ok)throw new Error(String(r.status));return r.arrayBuffer()}).then(b=>process.stdout.write(Buffer.from(b)))' https://codeload.github.com/thibautrey/multivibe-security-module/tar.gz/refs/heads/main | tar xz --strip-components=1 -C /app/modules/security && echo 'security module fetched' || echo 'security module download failed' >&2; fi; exec /usr/local/bin/start-multivibe.sh"`
- **Health check:** /health
- **Public domain:** Yes

## Documentation

# Deploy and Host MultiVibe AI Gateway on Railway
[MultiVibe](https://github.com/thibautrey/multivibe) is a self-hosted, OpenAI-compatible AI gateway. Connect many provider accounts (OpenAI-compatible APIs, Mistral, Z.ai, xAI, OpenRouter, NVIDIA NIM, Ollama and more), then point any client at one `/v1` endpoint with one API key. It routes, falls back between accounts, supports model aliases, and ships a web dashboard for accounts, models, traces and usage.

## About Hosting MultiVibe
This template builds MultiVibe **Core** from source (the repository's root `Dockerfile`: a Node control plane plus the Rust v1 edge) and runs it as a single service:
- the Rust edge serves the dashboard and the OpenAI-compatible API on the public domain (port 1455); the control plane stays on loopback
- a persistent volume at `/data` keeps accounts, OAuth state, aliases, jobs and traces across redeploys
- `ADMIN_TOKEN` and `PROXY_API_KEY` are generated for every deployment
- trace bodies and headers are not stored by default (`TRACE_INCLUDE_BODY=false`, `TRACE_INCLUDE_HEADERS=false`)
- the bundled Security module (reversible pseudonymization of secrets before prompts leave MultiVibe) is fetched at startup, because Railway does not check out git submodules

The first build takes a few minutes.

**After deploy:**
1. Open the service domain and sign in to the dashboard with the `ADMIN_TOKEN` value from the service's Variables.
2. Add your provider accounts under Accounts.
3. Optionally enable the Security module under Modules.
4. Point clients at `https://YOUR-RAILWAY-DOMAIN/v1` with `PROXY_API_KEY` as the Bearer key. Requests without the key get 401.

Only connect provider accounts you are entitled to use this way, and check each provider's terms: some consumer subscriptions do not allow use through a third-party gateway.

## Common Use Cases
- One OpenAI-compatible endpoint and key for many providers and accounts
- Automatic fallback between accounts and providers when one is rate-limited
- Model aliases with ordered fallback chains for agents and coding tools
- Central usage, trace and cost visibility for a small team

## Dependencies for MultiVibe Hosting
- Source: https://github.com/thibautrey/multivibe (built from `main`)
- Security module: https://github.com/thibautrey/multivibe-security-module
- At least one AI provider account or API key

### Deployment Dependencies
- Repository: https://github.com/thibautrey/multivibe
- Docker Compose reference: https://github.com/thibautrey/multivibe/blob/main/docker-compose.yml

### Implementation Details
The official `multivibe-host` container image is not used: on Linux its launcher starts only the Node control plane, without the Rust edge or the internal job token the control plane now requires, so it exits at startup. The root `Dockerfile` runs `start-multivibe.sh`, which starts both processes and generates the shared internal token itself.

## Why Deploy MultiVibe on Railway?
Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.

By deploying MultiVibe on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.

## Similar templates

- [Chat Chat](https://railway.com/deploy/-WWW5r) — Chat Chat, your own unified chat and search to AI platform.
- [Weaviate](https://railway.com/deploy/weaviate-1) — Vector database with hybrid search and an API key-protected API
- [Möbius Personal AI OS](https://railway.com/deploy/mobius-v01-personal-ai-os) — Self-hosted AI agent that builds and runs apps for you, with memory.

Open this page in a browser: https://railway.com/deploy/multivibe-ai-gateway
