Deploy FastGPT
AI knowledge base and workflow platform, full stack with pgvector and S3
Code Sandbox
Just deployed
Just deployed
/data/db
Just deployed
AI Proxy
Just deployed
Just deployed
/data
FastGPT Plugin
Just deployed
Redis
Just deployed
/data
Postgres
Just deployed
/var/lib/postgresql/data
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'sCHANGELOG.mdbefore 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 tofalseon 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_DOMAINon 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.
Template Content
Code Sandbox
aalfath/fastgpt-railway-templateAI Proxy
aalfath/fastgpt-railway-templateFastGPT Plugin
aalfath/fastgpt-railway-templateRedis
redis:8.2Postgres
aalfath/fastgpt-railway-template
