Deploy Octopus LLM API Gateway
Self-hosted LLM API gateway: one endpoint for OpenAI, Claude, Gemini & more
Octopus
Just deployed
/app/data
Deploy and Host Octopus LLM API Gateway on Railway
Octopus is a lightweight, self-hosted LLM API aggregation gateway. Plug in multiple provider channels (OpenAI, Anthropic, Gemini, DeepSeek, OpenRouter, any OpenAI-compatible endpoint) and expose a single, unified API with automatic failover, protocol conversion and cost analytics — all managed from a clean web dashboard.
About Hosting Octopus
This template runs the official bestrui/octopus image as a single service with a persistent volume mounted at /app/data (SQLite database + auto-generated config.json). A public HTTPS domain is generated automatically and a healthcheck guards zero-downtime redeploys. No external database is required.
After deploy:
- Open the generated domain.
- Log in with the default credentials
admin/adminand change the password immediately in Settings. - Add your provider channels (API keys), create groups, and generate API keys for your clients.
- Point any OpenAI- or Anthropic-compatible client at
https://YOUR-RAILWAY-DOMAIN/v1.
Common Use Cases
- One endpoint for all your LLM providers, with automatic failover when an upstream fails
- Use Claude Code / Codex / Cursor / agents against any model via OpenAI ⇄ Anthropic ⇄ Responses API conversion
- Track token usage and cost per key, channel and model
- Share controlled API access with teammates without sharing raw provider keys
Dependencies for Octopus Hosting
- Docker image
bestrui/octopus(Go single binary with embedded web UI) - Persistent volume for
/app/data
Deployment Dependencies
- Source: https://github.com/bestruirui/octopus
- Configuration reference (env vars
OCTOPUS_*): https://github.com/bestruirui/octopus#-environment-variables
Implementation Details
Optional environment variables you can add to the service:
| Variable | Purpose |
|---|---|
OCTOPUS_DATABASE_TYPE | sqlite (default), mysql or postgres |
OCTOPUS_DATABASE_PATH | Connection string, e.g. ${{Postgres.DATABASE_URL}}?sslmode=disable |
OCTOPUS_LOG_LEVEL | info (default), debug, warn |
Why Deploy Octopus 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 Octopus 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.
Template Content
Octopus
bestrui/octopus:latest
