---
title: "Deploy FastGPT"
description: "AI knowledge base and workflow platform, full stack with pgvector and S3"
category: "AI/ML"
url: https://railway.com/deploy/fastgpt
---

# Deploy FastGPT

AI knowledge base and workflow platform, full stack with pgvector and S3

**[Deploy FastGPT on Railway](https://railway.com/template/fastgpt)**

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

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

## Template content

### Code Sandbox https://raw.githubusercontent.com/labring/FastGPT/v4.17.4/document/public/favicon/android-chrome-512x512.png

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

### MongoDB

- **Source:** https://github.com/aalfath/fastgpt-railway-template

### FastGPT https://raw.githubusercontent.com/labring/FastGPT/v4.17.4/document/public/favicon/android-chrome-512x512.png

- **Source:** https://github.com/aalfath/fastgpt-railway-template
- **Health check:** /api/common/system/getInitData
- **Public domain:** Yes

### AI Proxy

- **Source:** https://github.com/aalfath/fastgpt-railway-template
- **Health check:** /api/status

### RustFS

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

### FastGPT Plugin https://raw.githubusercontent.com/labring/FastGPT/v4.17.4/document/public/favicon/android-chrome-512x512.png

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

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

- **Source:** https://github.com/aalfath/fastgpt-railway-template

## Documentation

# Deploy and Host FastGPT on Railway

FastGPT is an open source platform for building AI knowledge bases and agent workflows. You import documents, web pages or APIs into datasets, then build chat apps and visual workflows on top of them with retrieval, HTTP, MCP and code nodes. It works with OpenAI, Anthropic, DeepSeek, Ollama and other OpenAI-compatible providers.

## About Hosting FastGPT

FastGPT needs several services: the app, a plugin service, a code sandbox, AI Proxy for model channels, MongoDB as a replica set, Postgres with pgvector, Redis and S3-compatible storage. This template deploys all of them from one GitHub repo, with image versions pinned by digest, data on volumes and every secret generated. There are no prompts. FastGPT normally creates its `root` admin with the password `123456`. This template replaces it with a generated password before the app goes public. After deploy, open the FastGPT service's Variables tab and copy `ROOT_PASSWORD`. Then open the public URL, log in as `root` and set your own password. Finally, add a model channel with your provider API key, and enable a chat model and an embedding model.

## Common Use Cases

* Company or product knowledge base chat with cited answers
* Customer support bots on a website, API or messaging channel
* Visual AI workflows that mix retrieval, HTTP calls, MCP tools and JavaScript or Python code

## Dependencies for FastGPT Hosting

* **FastGPT** (public): web app and API, FastGPT `v4.17.4`
* **FastGPT Plugin**: system tools and the model provider catalog
* **Code Sandbox**: runs JavaScript and Python code nodes in isolation
* **AI Proxy**: stores model channels and provider API keys
* **MongoDB 7.0**: apps, datasets, chats and users, as a single-node replica set (volume)
* **Postgres 17 + pgvector**: vector search, plus AI Proxy's database (volume)
* **Redis**: queues, locks and caches (volume)
* **RustFS**: S3-compatible storage for uploaded files and images (volume, private)

### Deployment Dependencies

* FastGPT: https://github.com/labring/FastGPT (release v4.17.4)
* Self-hosting docs: https://doc.fastgpt.io/self-host/deploy/docker
* FastGPT Plugin: https://github.com/labring/fastgpt-plugin
* AI Proxy: https://github.com/labring/aiproxy
* RustFS: https://github.com/rustfs/rustfs
* Template repo: https://github.com/aalfath/fastgpt-railway-template

### Implementation Details

* All services except Redis build from `aalfath/fastgpt-railway-template`, one folder per service. When the template's repo gets a version bump, Railway shows you an "update available" notice; read the repo's `CHANGELOG.md` before you apply it.
* Uploads and downloads go through FastGPT itself, so RustFS needs no public domain.
* Workflow HTTP nodes can't call private addresses (`CHECK_INTERNAL_IP=true`). Set it to `false` on the FastGPT service if you need to reach other Railway services.
* Forgot the root password? Run `node /app/scripts/reset-root-password.cjs 'NEW-PASSWORD'` in the FastGPT service shell.
* If you add a custom domain, set `FE_DOMAIN` on FastGPT to it.
* Not included: FastGPT's Agent Sandbox (it needs the host Docker socket, which Railway doesn't provide) and the alternative vector stores (Milvus, OceanBase). Everything else works without them.

## Why Deploy FastGPT 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 FastGPT 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/fastgpt
