---
title: "Deploy DeerFlow"
description: "ByteDance's deep-research SuperAgent: web UI, Postgres, admin pre-made"
category: "AI/ML"
url: https://railway.com/deploy/deerflow-1
---

# Deploy DeerFlow

ByteDance's deep-research SuperAgent: web UI, Postgres, admin pre-made

**[Deploy DeerFlow on Railway](https://railway.com/template/deerflow-1)**

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

- **Creator:** Agaz Self-Host
- **Category:** AI/ML

## Template content

### Gateway https://cdn.jsdelivr.net/gh/bytedance/deer-flow@v2.2.0/frontend/public/images/deer.svg

- **Source:** https://github.com/aalfath/deerflow-railway-template
- **Health check:** /health/ready

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

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

### DeerFlow https://cdn.jsdelivr.net/gh/bytedance/deer-flow@v2.2.0/frontend/public/images/deer.svg

- **Source:** https://github.com/aalfath/deerflow-railway-template
- **Health check:** /healthz
- **Public domain:** Yes

### Frontend https://cdn.jsdelivr.net/gh/bytedance/deer-flow@v2.2.0/frontend/public/images/deer.svg

- **Source:** https://github.com/aalfath/deerflow-railway-template
- **Health check:** /login

## Documentation

# Deploy and Host DeerFlow on Railway

DeerFlow is ByteDance's open-source SuperAgent harness. It researches, codes and creates: a lead agent plans the work, calls sub-agents, searches and reads the web, writes files and reports, and remembers what it learned about you. You use it in a chat-style web UI, with threads, uploads, skills, custom agents and MCP tools.

## About Hosting DeerFlow

This template runs DeerFlow v2.2.0 from ByteDance's official images: a Gateway (the FastAPI API and LangGraph agent runtime), the Next.js web UI, an nginx front service on the public domain, and Railway Postgres. The only prompt is `LLM_API_KEY`, a key for OpenAI or any OpenAI-compatible provider. On first boot the Gateway creates the admin account (`admin@example.com`, with a generated `ADMIN_PASSWORD`), and self-registration is off, so nobody else can spend your key. Threads, users and run history live in Postgres. Uploads, outputs, agent memory and custom agents live on the Gateway's volume.

## Common Use Cases

* Deep research: ask a question and get a sourced report built from web searches and page reads
* Writing and analysis: drafts, summaries, slide outlines and data analysis from uploaded files
* A private, self-hosted agent workspace for a small team, using your own model provider

## Dependencies for DeerFlow Hosting

* An API key for OpenAI or any OpenAI-compatible provider (OpenRouter, DeepSeek, Groq, a LiteLLM proxy and others)
* Railway Postgres (included)

### Deployment Dependencies

* DeerFlow: https://github.com/bytedance/deer-flow
* Template source: https://github.com/aalfath/deerflow-railway-template
* OpenAI API keys: https://platform.openai.com/api-keys

### Implementation Details

| Service | What it does |
|---|---|
| `DeerFlow` | nginx on the public domain: sends `/api/*` to the Gateway and everything else to the web UI. Health check `/healthz` |
| `Gateway` | DeerFlow API and agent runtime (`deer-flow-backend:v2.2.0`). Volume at `/data`. Health check `/health/ready` |
| `Frontend` | DeerFlow web UI (`deer-flow-frontend:v2.2.0`). Private only |
| `Postgres` | Users, threads, checkpoints and run history |

**After deploy:** open the `DeerFlow` service's URL and sign in as `admin@example.com`. The password is the `ADMIN_PASSWORD` variable on the `Gateway` service. Change the password in Settings. Self-registration is off. To let teammates create their own accounts, set `ALLOW_REGISTRATION=true` on the `Gateway` service for a while, then turn it off again.

**Model:** `LLM_MODEL` defaults to `gpt-5-mini` and `LLM_BASE_URL` to `https://api.openai.com/v1`. To use another provider, set both on the `Gateway` service, for example `https://openrouter.ai/api/v1` and `openai/gpt-5-mini`. Admins can also add more models in Settings. Web search uses DuckDuckGo with no key. Add `TAVILY_API_KEY` on the Gateway to use Tavily instead.

**What's off:** code execution sandboxes need Docker-in-Docker or Kubernetes, which Railway doesn't offer, so the agent's `bash` tool stays disabled (upstream's default). File tools, web search, skills, memory and MCP servers work.

**Size:** every service runs within 0.5 GB of RAM. The Gateway uses about 300 MB when idle. Long research runs with many sub-agents work better with 1 GB on the Gateway.

**Updates:** the services build from the template repo, which pins upstream's release images by digest. When a new DeerFlow release is tested, the repo is updated, and Railway shows you an update notice that you can apply when you choose.

## Why Deploy DeerFlow 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 DeerFlow 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/deerflow-1
