---
title: "Deploy OmniRoute Docker"
description: "Digest-pinned OmniRoute container with /app/data volume"
category: "AI/ML"
url: https://railway.com/deploy/deploy-omniroute-docker-image
---

# Deploy OmniRoute Docker

Digest-pinned OmniRoute container with /app/data volume

**[Deploy OmniRoute Docker on Railway](https://railway.com/template/deploy-omniroute-docker-image)**

Machine-readable deploy manifest (JSON, validated by TemplateCI): https://railway.com/deploy/deploy-omniroute-docker-image/manifest.json

- **Creator:** onepush
- **Category:** AI/ML

## Template content

### omniroute

- **Image:** diegosouzapw/omniroute:3.8.51@sha256:8bd462c9f60d8eda79329cfbb6ea7ea723505fe7721beb944f3d43835409e218
- **Start command:** `/bin/sh -c "mkdir -p /app/data && chown -R 1000:1000 /app/data && cd /app && if command -v setpriv >/dev/null 2>&1; then exec setpriv --reuid=1000 --regid=1000 --init-groups env HOME=/home/node /app/check-permissions.sh node dev/run-standalone.mjs; else exec /app/check-permissions.sh node dev/run-standalone.mjs; fi"`
- **Health check:** /healthz
- **Public domain:** Yes

## Documentation

# Deploy and Host self hosted OmniRoute Docker (Open-Source AI Gateway) on Railway

This template runs OmniRoute from diegosouzapw/omniroute:3.8.51, pinned by sha256 digest, on port 20128 with a volume at /app/data. It covers the image tags, secrets, heap sizing and safe upgrades for anyone running it as a container.

## About Hosting OmniRoute Docker open-source software on Railway (self hosted OmniRoute Docker template)

OmniRoute keeps everything in your own SQLite file. Provider accounts, combos, API keys and usage live on the /app/data volume, encrypted with the secrets Railway generates per deploy, so nothing leaves the service.

This template runs one container, diegosouzapw/omniroute:3.8.51 pinned by digest, on port 20128. Railway handles the domain, TLS and restarts; you handle the heap size and the backups.

## Why Deploy OmniRoute Docker, the LiteLLM alternative on Railway (Railway Free Trial)

LiteLLM's virtual keys and admin UI want a Postgres alongside. This template gives you a digest-pinned OmniRoute container, one /app/data volume and five generated secrets. No Postgres, no Redis, and backups you control. Try it on the $5 trial.

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 OmniRoute Docker 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.

### Railway vs Other Hosting Providers and VPS for OmniRoute Docker self hosting

Railway gives the pinned container a domain, health check and volume; a VPS makes you wire those up.

| Provider | What You Get with Railway | What You Get with the Other Provider |
| --- | --- | --- |
| DigitalOcean | Pinned 3.8.51, /app/data volume, TLS domain, secrets. | Droplet plus your own Docker run, Caddy and backups. |
| AWS | Same service, /healthz check, one-click rollbacks. | EC2, VPC, load balancer, TLS and IAM setup. |
| Hetzner | Managed domain and restarts; you size the heap. | CX server; you own Docker, proxy, TLS and backups. |

The container is the same either way; the difference is who patches the host.

## Common Use Cases for hosted OmniRoute Docker

- **One gateway for a small team:** a single container on port 20128 gives everyone the same provider accounts and keys, with usage tracked in the SQLite state under /app/data.
- **Reproducible redeploys:** pinning the image at 3.8.51 by sha256 digest means every redeploy pulls the exact same bits, not whatever latest happens to be that week.
- **Coding agent traffic:** agents that lean on /v1/responses need a bigger heap, so raise OMNIROUTE_MEMORY_MB to 8192 and give the service around 10 GB of RAM.
- **Moving off a home server:** the same /app/data volume carries over, so provider accounts and API keys survive the move to Railway.
- **Testing a pre-release:** run the next tag as a second service, point a test key at it, and keep 3.8.51 serving production traffic.

## Dependencies for OmniRoute Docker Docker hosted on Railway

One container, nothing else: no Postgres, no Redis. Railway generates five secrets, including INITIAL_PASSWORD and OMNIROUTE_WS_BRIDGE_SECRET, and fixes PORT, HOSTNAME, DATA_DIR and OMNIROUTE_MEMORY_MB. Match service memory to the heap you set.

### Deployment Dependencies for Managed OmniRoute Docker Service (AI Gateway)

Railway supplies the domain, TLS and volume. Tags: latest is the highest stable release, next is pre-release, and an exact X.Y.Z is what you pin. Give it at least 2 GB for the default 1024 MB heap.

### Implementation Details for OmniRoute Docker (Using OmniRoute official docker image)

Outside Railway it's one run command, and state stays SQLite on /app/data.

```bash
docker run -d --name omniroute --restart unless-stopped -p 20128:20128 \
  -v omniroute-data:/app/data -e OMNIROUTE_MEMORY_MB=1024 \
  diegosouzapw/omniroute:3.8.51
```

REDIS_URL is optional; without it the rate limiter keeps state in memory, fine for a single container.

## How does OmniRoute Docker compare against other AI gateways and routers

All four sit in front of the same provider APIs. The difference is packaging, catalog and who carries the ops load.

### OmniRoute vs LiteLLM (LiteLLM Alternative)

- **Catalog:** OmniRoute ships a 372-provider catalog and an auto model; LiteLLM's YAML is easier to audit line by line.
- **Config style:** OmniRoute is dashboard-first, LiteLLM is file-first, which wins for config-as-code teams.
- **Where LiteLLM wins:** a bigger plugin ecosystem and a longer production track record.
- **Runtime:** this template pins 3.8.51 by digest, so redeploys don't drift onto a new tag.

### OmniRoute vs OpenRouter (OpenRouter Alternative)

- **Hosting:** OpenRouter is managed; OmniRoute runs in your project with keys encrypted in /app/data.
- **Where OpenRouter wins:** it owns upgrades and backups, and its credit model is simpler than BYO accounts.
- **Billing:** you pay providers directly rather than through a marketplace account.

### OmniRoute vs Portkey (Portkey Alternative)

- **Focus:** Portkey leans on observability and guardrails; OmniRoute leans on routing strategies and fallbacks.
- **Where Portkey wins:** hosted governance dashboards built for compliance teams.
- **Migration:** both speak OpenAI-compatible /v1, so the change is mostly base URL and key.

### Railway vs docker run on a VPS (VPS Alternative)

- **Restarts:** Railway gates deploys on /healthz and restarts on crash; docker run relies on --restart.
- **TLS:** you get a public HTTPS domain without nginx or certbot.
- **Where a VPS wins:** often cheaper at 1-2 GB, and you keep root access to the box.
- **Trade-off:** Railway runs about $5-15/mo light use, and memory must match OMNIROUTE_MEMORY_MB.

## How to use OmniRoute Docker (the OSS AI model gateway)?

1. Open your Railway domain, then log in at /dashboard with the INITIAL_PASSWORD from Railway variables.
2. Connect provider accounts and create an API key.
3. Call the gateway with your key:

```bash
curl https://your-domain/v1/chat/completions -H "Authorization: Bearer $OMNIROUTE_KEY" -H "Content-Type: application/json" -d '{"model":"auto","messages":[{"role":"user","content":"hi"}]}'
```

4. Check /healthz for a 200.
5. To upgrade, read the release notes, change the tag and digest in service settings, then redeploy. The /app/data volume keeps state.

## How to self host OmniRoute Docker on other VPS Services (OmniRoute self hosting guide)

Same image, no Railway needed. Any 2 GB Linux box with Docker works.

### Clone the Repository

You don't need the source, but the compose files live in the repo.

```
git clone https://github.com/diegosouzapw/OmniRoute.git
cd OmniRoute
```

### Install Dependencies

Docker Engine plus the compose plugin. On Debian or Ubuntu:

```
curl -fsSL https://get.docker.com | sh
```

### Configure Environment Variables

Write a .env next to the compose file. Generate each secret once and keep it.

```
INITIAL_PASSWORD=change-me
JWT_SECRET=...
API_KEY_SECRET=...
MACHINE_ID_SALT=...
OMNIROUTE_WS_BRIDGE_SECRET=...
OMNIROUTE_MEMORY_MB=1024
```

### Start the OmniRoute Docker Application

The repo's compose profiles also work; the single container is simplest.

```
docker run -d --name omniroute --restart unless-stopped \
  --stop-timeout 40 -p 20128:20128 \
  -v omniroute-data:/app/data \
  --env-file .env diegosouzapw/omniroute:3.8.51
```

Check /healthz, then open port 20128. Railway handles the pinning, secrets, TLS and restarts for you.

## Official Pricing of OmniRoute Docker (OmniRoute pricing)

OmniRoute itself is MIT licensed and free to run from the Docker image. There's no license fee, no seat count and no per-token markup from the project. What you pay for is the model providers behind your own accounts, plus the container's hosting.

## OmniRoute Docker cloud vs self hosted comparison (Pricing, features, costs, and more)

Same container either way: 3.8.51 pinned by digest, SQLite state on /app/data, provider keys you bring. What differs is who watches it and what the RAM costs.

### Monthly cost of self hosting OmniRoute Docker on Railway

Light use at 1 to 2 GB runs about $5 to $15 a month. That money is memory, not licensing: OmniRoute is MIT and you pay providers directly. Raise OMNIROUTE_MEMORY_MB for coding agents and the bill follows the heap. The $5 trial covers the first look.

### System Requirements for Hosting OmniRoute Docker on a VPS

amd64 or arm64, one container on 20128, a persistent volume at /app/data, no Postgres and no Redis. Plan for 2 GB at the default 1024 heap, about 10 GB for one coding agent at 8192, and 12 to 16 GB for two long /v1/responses sessions.

## Frequently Asked Questions (FAQs)

### Which tag should I pin?

Pin an exact X.Y.Z. This template uses 3.8.51 by sha256 digest so redeploys land on the same bytes. latest tracks the highest stable release and next is a pre-release.

### Where is my data stored?

In SQLite on the /app/data volume: provider accounts, routing combos, API keys and usage history. Lose that volume and you lose all of it.

### How much memory does it need?

OMNIROUTE_MEMORY_MB sets the Node heap. Light dashboard work runs at 1024 with a 2 GB container; a coding agent wants about 8192 heap and 10 GB of container RAM.

### Do I need Redis?

No. REDIS_URL is optional; without it the rate limiter keeps state in memory, which is fine for a single container. This template runs no Redis.

### Is the image on GHCR?

No. diegosouzapw/omniroute is published on Docker Hub only, multi-arch for amd64 and arm64.

### How do I upgrade safely?

Read the release notes, back up /app/data, change the tag and digest in service settings, then redeploy. The volume persists across the restart.


## Similar templates

- [Chat Chat](https://railway.com/deploy/-WWW5r) — Chat Chat, your own unified chat and search to AI platform.
- [Möbius v0.1 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.
- [stella](https://railway.com/deploy/stella) — Self-host stella with web, API, Postgres, Redis, and object storage.

Open this page in a browser: https://railway.com/deploy/deploy-omniroute-docker-image
