Deploy Chatbot UI
An open-source ChatGPT UI alternative.
chatbot-ui
Just deployed
Deploy and Host Chatbot UI on Railway
Chatbot UI is an open-source AI chat interface built with Next.js, TypeScript, and Tailwind CSS. It supports multiple AI model providers — including OpenAI, Anthropic, Google, and Ollama — and offers a polished chat experience with folders, prompt templates, conversation history, and more.
About Hosting Chatbot UI
Chatbot UI v2.0 is a Next.js application that requires a Supabase project as its backend for authentication, conversation storage, and user settings. You must create a Supabase project and obtain its credentials before deploying — Railway provides the hosting for the Next.js frontend, while Supabase handles the database and auth layer. Once the three required Supabase environment variables are set, Railway builds and deploys the app automatically from the GitHub source.
Common Use Cases
- Private AI chat interface — host a personal or team ChatGPT-style UI with persistent conversation history, prompt templates, and multi-model support, without relying on commercial frontends
- Multi-provider access — switch between OpenAI, Anthropic Claude, Google Gemini, and local Ollama models from a single interface, with API keys configured server-side
- Internal team tool — deploy a shared instance for a team with server-side API keys, so members can chat without managing their own credentials
Dependencies for Chatbot UI Hosting
- Chatbot UI GitHub repository — Next.js source, deployed directly from GitHub
- Supabase — required external backend for auth and data storage; a free-tier project is sufficient
Deployment Dependencies
- Chatbot UI GitHub repository
- Supabase — create a project
- Supabase API settings
- OpenAI API keys
- alphasec guide: Open-Source ChatGPT UI Alternative with Chatbot UI
Implementation Details
Before deploying, create a Supabase project and retrieve the following from your project's Settings → API page:
| Supabase Value | Environment Variable |
|---|---|
| Project URL | NEXT_PUBLIC_SUPABASE_URL |
| Anon public key | NEXT_PUBLIC_SUPABASE_ANON_KEY |
| Service role key | SUPABASE_SERVICE_ROLE_KEY |
These three variables are required at deploy time and are prompted during Railway template setup.
# Required — Supabase backend
NEXT_PUBLIC_SUPABASE_URL=https://.supabase.co
NEXT_PUBLIC_SUPABASE_ANON_KEY=
SUPABASE_SERVICE_ROLE_KEY=
# Optional — set server-side API keys to pre-fill them for all users
OPENAI_API_KEY=sk-xxxxxxxx
ANTHROPIC_API_KEY=sk-ant-xxxxxxxx
GOOGLE_GEMINI_API_KEY=xxxxxxxx
# Optional — for local Ollama model access
NEXT_PUBLIC_OLLAMA_URL=http://localhost:11434
If API keys are set as environment variables, users cannot override them from the UI settings — useful for shared team instances. If left unset, users can enter their own keys in the app.
Why Deploy Chatbot UI 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 Chatbot UI 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
chatbot-ui
mckaywrigley/chatbot-uiNEXT_PUBLIC_SUPABASE_URL
SUPABASE_SERVICE_ROLE_KEY
NEXT_PUBLIC_SUPABASE_ANON_KEY
