Deploy LobeHub
Self-hosted AI chat and agent workspace for any model, with file uploads
Redis
Just deployed
/data
Just deployed
/var/lib/postgresql/data
LobeHub
Just deployed
lobehub-files
Bucket
Just deployed
Deploy and Host LobeHub on Railway
LobeHub (formerly Lobe Chat) is an open-source AI chat and agent workspace. It works with OpenAI, Anthropic, Google, DeepSeek, Ollama and dozens of other model providers. It supports file uploads, knowledge bases, plugins, image generation and multiple users, all through a polished web interface you host yourself.
About Hosting LobeHub
This template runs the server database edition of LobeHub 2.3.2 from the official Docker image, pinned by digest. It includes Postgres with pgvector for users, chats and embeddings, Redis for sessions and caching, and a Railway Bucket for uploaded files. The encryption key and auth secret are generated for you, and a signing key for internal tokens is created on first boot and kept in Postgres. The only thing you enter is the email address (or domain) allowed to sign up, so strangers can't register on your instance. Model API keys are optional: each user can add their own in Settings.
Common Use Cases
- A private ChatGPT-style workspace for you or your team, using your own API keys
- Chatting with uploaded documents and building knowledge bases
- Comparing and switching between many model providers, including local models through Ollama
Dependencies for LobeHub Hosting
- Postgres with the pgvector extension (Railway Postgres)
- Redis
- S3-compatible object storage (Railway Bucket)
Deployment Dependencies
- LobeHub on GitHub
- LobeHub v2.3.2 release
- Self-hosting docs
- Authentication settings
- Start script for this template
Implementation Details
After deploying, open the Railway domain and sign up with the email you set in AUTH_ALLOWED_EMAILS, then add a model provider key under Settings → Provider. To allow more people, add their emails or a whole domain (comma-separated, for example you@example.com,example.org). To give every user a shared key instead, set a provider variable such as OPENAI_API_KEY on the LobeHub service. Full-text search uses plain Postgres matching (FTS_SEARCH_PROVIDER=pg_like), because Railway Postgres doesn't ship ParadeDB's pg_search. The bucket's CORS rule for browser uploads is set automatically at startup.
Why Deploy LobeHub 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 LobeHub 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

