Open-Source ChatGPT UI Alternative with Chatbot UI

It started with an innocuous tweet. Almost lost in the deluge of amazing projects launched daily since ChatGPT was unleashed upon the world. Not satisfied with the fairly basic and often unreliable ChatGPT interface, Mckay Wrigley announced Chatbot UI - an open-source UI alternative built using Next.js, TypeScript, and Tailwind CSS. Chatbot UI could be deployed locally, or hosted on cloud and web app hosting platforms like AWS, Google Cloud, Railway, Vercel, and more.

Chatbot UI launch tweet

Since the launch, Chatbot UI has seen several enhancements:

  • Ability to create folders, prompt templates, and customise system prompt
  • Ability to name conversations, highlight code syntax, and support Markdown
  • Ability to import/export chats, stop message generation, and search chats
  • Google Search integration and more, coming soon...

Deploy Chatbot UI using One-Click Starter on Railway

Railway is a modern app hosting platform that makes it easy to deploy production-ready apps quickly. Railway offers persistent database services for PostgreSQL, MySQL, MongoDB, and Redis, as well as application services with a GitHub repository as the deployment source. For the latter, Railway can automatically determine the application runtime and deploy the service. Since we are just testing the waters, Railway's free tier should be sufficient to host the service.

Sign up for an account with Railway using GitHub, and click Authorize Railway App when redirected. Review and agree to Railway's Terms of Service and Fair Use Policy if prompted. Launch the Chatbot UI one-click starter template (or click the button below) to deploy Chatbot UI instantly on Railway.

You can change the default repository name and set it private, if you'd like. Also, provide the OPENAI_API_KEY now, or configure it from the Chatbot UI after deployment, and click Deploy; the deployment will kick off immediately. If you don't have an OpenAI API key, you can get it here.

💡
Chatbot UI no longer supports a local configuration store, and now requires a Supabase backend instead. Create an account with Supabase and obtain the following project details first.

Create an account with Supabase, create a project, and retrieve the project URL and API keys from the Settings page.

Supabase project settings

These details are necessary to populate the following environment variables during the deployment on Railway:

  • NEXT_PUBLIC_SUPABASE_URL
  • NEXT_PUBLIC_SUPABASE_ANON_KEY
  • SUPABASE_SERVICE_ROLE_KEY
Deploy Chatbot UI using one-click starter on Railway

Once the deployment completes, a Chatbot UI instance will be available at a default xxx.up.railway.app domain - launch this URL to access the app. If you are interested in setting up a custom domain, I covered it at length in a previous post - see the final section here.

Chatbot UI deployed on Railway

If you didn't provide the OPENAI_API_KEY during deployment, do so now to start chatting using gpt-3.5-turbo, which is the default model used for conversations. If you need to change this, add a DEFAULT_MODEL environment variable under Variables for the deployed project; Railway will re-deploy Chatbot UI using the chosen model instead. Finally, head over to the GitHub repository if you want guidance to deploy Chatbot UI using Docker, or to customise the interface.