Deploy Lobe Chat | Multi-Provider AI Chat, Pinned and Access-Protected
Lobe Chat on Railway: pinned release, access code set, no key prompts
LobeChat
Just deployed
Deploy and Host Lobe Chat on Railway
Lobe Chat is a chat interface that speaks to many model providers at once - OpenAI, Anthropic, Google, Ollama, OpenRouter and others - with conversation branching, plugins and a visual settings screen instead of a config file.
About Hosting Lobe Chat
This template runs the official image pinned to a release, with an access code generated for you, and it asks for nothing before you deploy.
Each of those is a fix. The template most people copy builds from the GitHub repository rather than using the published image, which is why it fails as often as it succeeds. It also declares ACCESS_CODE and several provider API keys with empty values, and Railway treats an empty value as a required field - so before you can press Deploy you are asked to paste API keys you may not have yet.
Here the access code is generated at deploy time, so the instance is not open to anyone who finds the URL, and model providers are configured inside the app afterwards.
Common Use Cases
- One chat interface in front of several providers, so you can compare answers without switching tools
- A shared assistant for a small team, behind a single access code
- A front end for a local or self-hosted model through an OpenAI-compatible endpoint
Dependencies for Lobe Chat Hosting
- An API key for at least one provider, added in the app under Settings
- Nothing else. This is the client-side edition: conversations live in the browser, so there is no database and no volume to pay for.
Deployment Dependencies
- Documentation: https://lobehub.com/docs
- Source: https://github.com/lobehub/lobe-chat
Implementation Details
| Variable | Why |
|---|---|
| PORT | The image listens on 3210; this is what Railway routes the public domain to |
| ACCESS_CODE | Generated. Anyone opening the URL has to enter it before they can chat |
| APP_URL | The public address, used for share links and callbacks |
Find the generated access code in the service Variables after deploying, and share it with whoever should have access. Change it there whenever you want to cut someone off.
Worth knowing before you choose this: conversations are stored in the browser, not on the server. That keeps the deployment cheap and stateless, but your history does not follow you between devices, and clearing site data clears it. If you need server-side history and accounts, LobeHub also publishes a database edition, which needs Postgres and object storage.
Why Deploy Lobe Chat on Railway?
One service, one domain, no build step to fail. Pinned to a release, so a redeploy gives you back the same version rather than whatever landed upstream this week.
Template Content
LobeChat
lobehub/lobe-chat:1.143.3