---
title: "Deploy Utopia"
description: "Open-source enterprise world model: dated facts, review queue, MCP"
category: "AI/ML"
url: https://railway.com/deploy/deploy-utopia-enterprise-world-model
---

# Deploy Utopia

Open-source enterprise world model: dated facts, review queue, MCP

**[Deploy Utopia on Railway](https://railway.com/template/deploy-utopia-enterprise-world-model)**

Machine-readable deploy manifest (JSON, validated by TemplateCI): https://railway.com/deploy/deploy-utopia-enterprise-world-model/manifest.json

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

## Template content

### Utopia https://github.com/deeplethe.png

- **Image:** ghcr.io/onepush-dev/utopia:0.1.0-rc9
- **Health check:** /api/v1/health
- **Public domain:** Yes

### Postgres

- **Image:** pgvector/pgvector:0.8.7-pg16

## Documentation

# Deploy and Host self hosted Utopia (Enterprise World Model) on Railway

Utopia is an open-source knowledge base that records when facts were true and when the system learned them, so "who held this role last March" gets a dated, sourced answer.

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

This template runs the open-source Utopia server from the deeplethe/utopia project, released under Apache-2.0, as one app service beside a pgvector Postgres 16 database.

Railway handles provisioning, volumes, a public domain with TLS, restarts and the Postgres connection wiring.

## Why Deploy Utopia, the open-source enterprise world model on Railway (Railway Free Trial)

Utopia is Apache-2.0 and free to self-host, so you keep your documents on infrastructure you control.

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 Utopia 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 Utopia self hosting

Utopia needs an app and a pgvector Postgres 16 database, so compare what you manage yourself.

| Provider | What You Get with Railway | What You Get with the Other Provider |
| --- | --- | --- |
| DigitalOcean | Both services, volumes and a public domain wired from the template, with no server to patch. | A droplet you size and secure, with Docker and the database connection set up by hand. |
| AWS | One template provisioning both services on private networking, with no IAM or VPC setup. | Full VPC and instance control, but you assemble the Postgres and compose stack yourself. |
| Hetzner | Managed deploys with health checks and restart policies from the template defaults. | Low-cost bare servers where you install Docker, back up secret.key and handle OS updates. |

Choose based on how much infrastructure work your team wants to own.

## Common Use Cases for hosted Utopia

- **Tracking contract terms across amendments:** Load a master agreement and its amendments, then ask which payment terms applied on a given date. Each fact keeps its date and source sentence, and a later amendment closes the earlier term.
- **Answering who held which role when:** Load minutes, announcements, or filings, then ask who led a project in a given quarter and what the base believed at the time. Corrections link back to what they replaced.
- **Giving agents a governed knowledge base over MCP:** Point Claude Desktop, Cursor, or your own agent at the MCP endpoint with a token scoped to one base. Agents get typed, dated answers with evidence, and anything they want to record goes to a person first.
- **Search and chat with inline citations:** Upload documents and ask questions in plain language. Answers cite the passages they rest on, so reviewers can check the source.
- **Working a review queue for doubtful merges and facts:** When extraction is unsure whether two entities match or a fact should be accepted, it goes to the Review queue instead of being applied silently. Your team resolves those cases before they reach the knowledge base.

## Dependencies for Utopia Docker hosted on Railway

Utopia runs as two services in one Railway project: the Utopia application and a pgvector Postgres 16 database.

### Deployment Dependencies for Managed Utopia Service (Utopia app service plus pgvector Postgres 16)

The Utopia service listens on port 8080 and exposes a health check at /api/v1/health.

| Variable | Service | Value |
| --- | --- | --- |
| UTOPIA_DATABASE_URL | Utopia | ${{Postgres.DATABASE_URL}} |
| POSTGRES_PASSWORD | Postgres | Generated secret, 32 alphanumeric characters |
| PGDATA | Postgres | ${{RAILWAY_VOLUME_MOUNT_PATH}}/pgdata |
| PGHOST | Postgres | ${{RAILWAY_PRIVATE_DOMAIN}} |
| PGPASSWORD | Postgres | ${{POSTGRES_PASSWORD}} |
| DATABASE_URL | Postgres | postgresql://postgres:${{POSTGRES_PASSWORD}}@${{RAILWAY_PRIVATE_DOMAIN}}:5432/postgres |

### Implementation Details for Utopia (Using the onepush-dev image built on the upstream 0.1.0-rc9 image)

The application image is ghcr.io/onepush-dev/utopia:0.1.0-rc9, built on the upstream Rust server and web UI image.

## How does Utopia compare against other tools

### Utopia vs a plain vector database (Vector Database Alternative)

- **Storage model:** A plain vector database stores embeddings and returns nearest neighbours. Utopia stores dated facts extracted from documents, so each answer shows when it held and where it came from.
- **Change over time:** Vector stores usually hold the latest state of an index. Utopia closes an earlier term when an amendment arrives, so you can ask what applied on a past date.
- **Where a vector database wins:** For fast similarity search without any need for dates or provenance, a dedicated vector database is simpler to run.

### Utopia vs Neo4j (Neo4j Alternative)

- **Purpose:** Neo4j is a graph database for relationships you model yourself. Utopia builds a bitemporal knowledge graph from documents.
- **Ingestion:** With Neo4j you write the schema and loading code. Utopia extracts facts from uploads, and doubtful merges go to a review queue.
- **Where Neo4j wins:** For mature, large-scale graph workloads with a well-known query language, Neo4j is the more established choice.

### Utopia vs RAGFlow (RAGFlow Alternative)

- **Approach:** RAGFlow is an open-source RAG engine for retrieving passages and generating answers. Utopia is a governed, time-aware knowledge base with cited search and chat.
- **Temporal answers:** Utopia separates when something was true from when the base learned it, which standard retrieval does not model.
- **Where RAGFlow wins:** If you only need document question answering without dated facts or governance, RAGFlow covers that directly.

### Utopia with Docker Compose vs Utopia on Railway (Docker Compose Alternative)

- **Setup:** Compose on your own host means you manage the server, network and volumes. The Railway template provisions the Utopia service and pgvector Postgres 16 with volumes wired up.
- **Secrets:** On both paths the first registered account becomes admin, and the sealing key lives on the data volume, so back that volume up.
- **Control:** Compose on hardware you choose gives full control over network placement and data location, while Railway trades some of that for a faster start.

## How to use Utopia on Railway?

1. Wait for both services to turn green. The Postgres service comes up first, then Utopia runs its migrations. Expect roughly a minute and a half from deploy to healthy.
2. Open the public domain for the Utopia service and register right away. The first account you create becomes the system administrator, so register before anyone else can reach the page.
3. Go to Administration, then Models, and configure a chat model and an embedding model. Any OpenAI-compatible endpoint will work. Set these before you upload anything, because document extraction depends on a working model.
4. Upload your first documents. Utopia extracts dated facts from them, and doubtful merges or facts land in the Review queue for a person to check.
5. If you do not want strangers registering on your domain, open Administration and turn off open registration. This is a database setting and it is on by default.

Check that the service is up with a request to the health endpoint:

```
curl https://your-domain/api/v1/health
```

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

### Clone the Repository

Clone the upstream project and move into the folder on a machine you control, such as a small Linux VPS with Docker installed.

```bash
git clone https://github.com/deeplethe/utopia.git
cd utopia
```

### Install Dependencies

Utopia runs from Docker, so you need Docker Engine with the Compose plugin. Confirm both are present before continuing.

```bash
docker --version
docker compose version
```

### Configure Environment Variables

Copy the example environment file and set the values you need, such as the database password and the public port.

```bash
cp .env.example .env
nano .env
```

Set a strong Postgres password. Back up the data volume afterward, since the sealing key lives there.

### Start the Utopia Application

Start the app profile with the upstream command.

```bash
docker compose --profile app up -d
```

Open port 1516 in a browser and register.

## Official Pricing of Utopia (Utopia pricing)

Utopia is open-source software released under the Apache-2.0 license, so there is no license fee to self-host it.

## Utopia hosted vs self hosted comparison (Pricing, features, costs, and more)

Utopia is Apache-2.0 open-source, and the official site is utopia.bi.

### Monthly cost of self hosting Utopia on Railway

Railway bills on usage, so the monthly figure depends on the memory and CPU used by the Utopia and Postgres services, the size of both volumes, and any other services in the project.

### System Requirements for Hosting Utopia on a VPS

Use a Linux host with enough memory for the Rust server and Postgres to run together, plus disk for both data volumes, since the document store and sealed secret key live there.

## Frequently Asked Questions (FAQs)

### Who becomes the admin of my Utopia instance?

The first account you register becomes the system administrator, so register immediately after the deploy finishes.

### Do I need an AI model before I upload documents?

Yes.

### Why are the logs in Chinese?

The upstream server writes its logs in Chinese, while the web interface is in English.

### What must I back up?

Back up both volumes: the Utopia data volume and the Postgres volume.

### Is this a release candidate?

Yes.

### Can agents connect over MCP?

Yes.


## 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 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.

Open this page in a browser: https://railway.com/deploy/deploy-utopia-enterprise-world-model
