---
title: "Deploy Omnigraph"
description: "Graph database for agents: branches, typed schemas, hybrid search"
category: "AI/ML"
url: https://railway.com/deploy/omnigraph
---

# Deploy Omnigraph

Graph database for agents: branches, typed schemas, hybrid search

**[Deploy Omnigraph on Railway](https://railway.com/template/omnigraph)**

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

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

## Template content

### Omnigraph https://github.com/ModernRelay.png

- **Image:** modernrelay/omnigraph-server:v0.16.0
- **Start command:** `/bin/sh -c 'set -e; R=/var/lib/omnigraph/cluster; if [ ! -f /var/lib/omnigraph/.bootstrapped ]; then mkdir -p "$R"; B=$(mktemp -d); echo "{version: 1, metadata: {name: omnigraph}, graphs: {}, policies: {operators: {file: operators.policy.yaml, applies_to: [cluster]}}}" > "$B/cluster.yaml"; echo "{version: 1, groups: {operators: [act-admin]}, rules: [{id: operators-manage-config, allow: {actors: {group: operators}, actions: [config_manage]}}, {id: operators-list-graphs, allow: {actors: {group: operators}, actions: [graph_list]}}]}" > "$B/operators.policy.yaml"; omnigraph cluster apply --target "$R" --config "$B" --as act-admin --json; touch /var/lib/omnigraph/.bootstrapped; fi; export OMNIGRAPH_SERVER_BEARER_TOKENS_JSON="{\"act-admin\":\"$OMNIGRAPH_ADMIN_TOKEN\"}"; exec omnigraph-server --cluster "$R" --bind "[::]:8080"'`
- **Health check:** /healthz
- **Public domain:** Yes

## Documentation

# Deploy and Host Omnigraph on Railway
[Omnigraph](https://github.com/ModernRelay/omnigraph) is a graph database for agents: typed schemas, Git-style branches and merges, and graph traversal, vector and full-text search in one query. This template runs `omnigraph-server` with its cluster on a Railway volume, behind HTTPS and a bearer token, ready for `omnigraph cluster apply` from your machine.
## About Hosting Omnigraph
This template deploys one service from the published `modernrelay/omnigraph-server` image:
- **Omnigraph**: the HTTP server (also `/mcp` for agents) on a public HTTPS domain, with a volume at `/var/lib/omnigraph` that holds the cluster, its graphs and history
On first start the service creates an empty cluster whose only policy lets the actor `act-admin` manage configuration and list graphs. The server then accepts `OMNIGRAPH_ADMIN_TOKEN` as that actor. You add graphs, schemas, stored queries and policies from your own machine with the `omnigraph` CLI, without a restart.
**After deploy:**
1. [Install the CLI](https://github.com/ModernRelay/omnigraph/blob/main/docs/user/install.md) (same release as the image, `v0.16.0`).
2. Copy `OMNIGRAPH_ADMIN_TOKEN` from the service's **Variables** tab and export it as `OG_TOKEN`.
3. Add a server target to `~/.omnigraph/config.yaml`:
```yaml
version: 1
targets: {railway: {kind: server, endpoint: "https://YOUR-RAILWAY-DOMAIN", auth: {provider: token, source: {env: OG_TOKEN}}}}
defaults: {target: railway}
```
4. Write a [cluster bundle](https://github.com/ModernRelay/omnigraph/blob/main/docs/user/clusters/index.md) and run `omnigraph cluster apply --config ./my-cluster`. Keep a cluster policy (`applies_to: [cluster]`) that grants `act-admin` `config_manage` and `graph_list`, or you lock yourself out of later deployments.
Every request without the token, or with a wrong one, gets 401.
## Common Use Cases
- A shared, typed memory that several agents read and update, each on its own branch
- Knowledge graphs with hybrid retrieval (graph, vector, BM25) behind one HTTP API or MCP endpoint
- Declaring graphs, queries and access policy as code and deploying them like Terraform
## Dependencies for Omnigraph Hosting
- The `omnigraph` CLI on your machine to apply cluster bundles and load data
- Optional: an embedding provider key if your schemas use vector search
### Deployment Dependencies
- Omnigraph: https://github.com/ModernRelay/omnigraph (MIT)
- Server and HTTP contract: https://github.com/ModernRelay/omnigraph/blob/main/docs/user/operations/server.md
- Policies and actors: https://github.com/ModernRelay/omnigraph/blob/main/docs/user/operations/policy.md
### Implementation Details
- The start command bootstraps the cluster once (a marker file on the volume records it), then runs `omnigraph-server --cluster /var/lib/omnigraph/cluster`. Restarts reuse the applied state.
- `OMNIGRAPH_ADMIN_TOKEN` is generated at deploy time and mapped to `act-admin` through `OMNIGRAPH_SERVER_BEARER_TOKENS_JSON`. Rotate it by changing the variable and redeploying.
- Storage is the local volume, so run one replica. For S3-compatible storage, see the upstream [deployment guide](https://github.com/ModernRelay/omnigraph/blob/main/docs/user/deployment.md).
- Upgrade by changing the image tag together with your CLI; read the release notes first, since storage formats move forward only.
## Why Deploy Omnigraph 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 Omnigraph 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/omnigraph
