---
title: "Deploy Ragen"
description: "Self-hosted RAG chat with cited answers, Ragen Brain, MCP and admin panel."
category: "AI/ML"
url: https://railway.com/deploy/ragen
---

# Deploy Ragen

Self-hosted RAG chat with cited answers, Ragen Brain, MCP and admin panel.

**[Deploy Ragen on Railway](https://railway.com/template/ragen)**

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

- **Creator:** Web Amigos
- **Category:** AI/ML
- **Total deploys:** 1

## Template content

### worker https://raw.githubusercontent.com/webamigos/RagenAI/main/apps/web/public/icon.png

- **Image:** ghcr.io/webamigos/ragen-worker:2.52.1

### vault https://raw.githubusercontent.com/webamigos/RagenAI/main/apps/web/public/icon.png

- **Image:** ghcr.io/webamigos/ragen-token-vault:latest
- **Health check:** /health

### admin https://raw.githubusercontent.com/webamigos/RagenAI/main/apps/web/public/icon.png

- **Image:** ghcr.io/webamigos/ragen-admin:2.52.1
- **Public domain:** Yes

### web https://raw.githubusercontent.com/webamigos/RagenAI/main/apps/web/public/icon.png

- **Image:** ghcr.io/webamigos/ragen-web:2.52.1
- **Health check:** /api/healthcheck
- **Public domain:** Yes

### mcp https://raw.githubusercontent.com/webamigos/RagenAI/main/apps/web/public/icon.png

- **Image:** ghcr.io/webamigos/ragen-mcp:2.52.1
- **Health check:** /health
- **Public domain:** Yes

### docling https://docling-project.github.io/docling/assets/logo.png

- **Source:** https://github.com/webamigos/RagenAI

### Postgres https://devicons.railway.app/i/postgresql.svg

- **Image:** ghcr.io/railwayapp-templates/postgres-ssl:18

### Redis https://cdn.sanity.io/images/sy1jschh/production/0ce0bfdcfbdbf69662b1116671f97c2dd788b655-157x157.svg

- **Image:** redis:8.2
- **Start command:** `/bin/sh -c "rm -rf $RAILWAY_VOLUME_MOUNT_PATH/lost+found/ && exec docker-entrypoint.sh redis-server --requirepass $REDIS_PASSWORD --save 60 1 --dir $RAILWAY_VOLUME_MOUNT_PATH"`

### Postgres-TokenVault https://devicons.railway.app/i/postgresql.svg

- **Image:** ghcr.io/railwayapp-templates/postgres-ssl:18

### api https://raw.githubusercontent.com/webamigos/RagenAI/main/apps/web/public/icon.png

- **Image:** ghcr.io/webamigos/ragen-api:2.52.1

### qdrant https://baserow-backend-production20240528124524339000000001.s3.amazonaws.com/user_files/Vec9NwWHVhPfcIA13JVAB9rhAgwzvzit_157f6775a84e1fae8b4c803a487bdbcfc529c18533a28f5cb894faf6560b0576.png

- **Image:** qdrant/qdrant
- **Health check:** /readyz

### migrate https://raw.githubusercontent.com/webamigos/RagenAI/main/apps/web/public/icon.png

- **Image:** ghcr.io/webamigos/ragen-migrate:2.52.1

## Buckets

- **roomy-tray**

## Documentation

# Deploy and Host Ragen on Railway

Ragen is a self-hosted AI assistant that answers from your own documents, with citations to the passages it used. Upload PDFs, Word files and spreadsheets to a knowledge base and ask questions in chat. Ragen Brain turns those documents into reviewed knowledge pages, and an MCP server brings your assistants into Claude Desktop and Cursor.

## About Hosting Ragen

The template deploys the whole stack into one project, and the only value you enter is an OpenRouter API key. Chat runs on Claude Sonnet 5.5, Claude Haiku 5.5 rephrases questions and summarises documents, and OpenAI text-embedding-3-small embeds them, all through that one key. Every secret is generated for you. After the first deploy, open the `web` service's domain and create your account: the first account becomes the platform administrator, and the template ships no demo credentials. Back up `ENCRYPTION_MASTER_KEY` from the `web` variables: chat messages are encrypted under it and cannot be recovered without it.

## Common Use Cases

- An internal assistant that answers questions about company policies, procedures and contracts, citing the exact source passage
- A reviewed company knowledge base built from existing documents with Ragen Brain
- Your documents available in Claude Desktop, Cursor and other MCP clients through Ragen's MCP server

## Dependencies for Ragen Hosting

- An OpenRouter API key (openrouter.ai/keys), used for chat, summaries and embeddings
- Nothing else: Postgres, Redis, Qdrant, Docling and a storage bucket are part of the template

### Implementation Details

| Service | Role |
|---|---|
| `web` | The app: chat, knowledge base, Brain, settings (public domain) |
| `api` | Public REST API, used by the MCP server and API keys |
| `worker` | Background jobs: document parsing, embeddings, Brain extraction |
| `docling` | Document parser for PDF, DOCX, XLSX and more (built from the Ragen repository) |
| `mcp` | MCP server for Claude Desktop, Cursor and other clients (public domain) |
| `admin` | Platform administration panel (public domain) |
| `vault` | Token vault for connector credentials, with its own Postgres |
| `migrate` | Applies database migrations on each deploy, then exits |
| Postgres, Redis, Qdrant, bucket | Data, job queue, vector search, uploaded files |

Left out on purpose, so check before you rely on it:

- **PII masking** is off: there is no Presidio service, so personal data is not masked before it reaches the model.
- **Content moderation** needs `OPENAI_MODERATION_KEY`. Without it, that guardrail logs that it is not configured and lets messages through.
- **Mail** is not configured: verification links and invitations go to the log until you set `RESEND_API_KEY` or the `SMTP_*` variables on `web`.
- **Encryption** uses a key in an environment variable (`ENCRYPTION_PROVIDER=local`). For production, consider a KMS.

Documentation: https://docs.ragen.ai/deploy-on-railway

## Why Deploy Ragen 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 Ragen 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.
- [stella](https://railway.com/deploy/stella) — Self-host stella with web, API, Postgres, Redis, and object storage.
- [Hermes Agent | OpenClaw Alternative with Dashboard](https://railway.com/deploy/hermes-agent-or-openclaw-alternative-wit) — Self-Hosted Hermes AI Agent for Telegram, Discord & Slack

Open this page in a browser: https://railway.com/deploy/ragen
