Guide · Open source
How to use chatbot-ui: local setup, Supabase and Ollama
Updated · written with AI from the project's own documentation and checked against our catalogue data
Chatbot UI is an open-source web app that gives you a chat interface for AI models, which you run on your own machine or server. This guide walks through the local setup from the project README, from cloning the repo to starting the app at localhost:3000. By the end you will know what each prerequisite is for and where the setup is still rough.
Quick start
- 1Clone the repo. Run git clone on the Chatbot UI repository and move into its folder.
- 2Install dependencies. Run npm install from the repo root.
- 3Start Supabase. Install Docker and the Supabase CLI, then run supabase start.
- 4Set up environment and SQL. Copy .env.local.example to .env.local, fill in values from supabase status, and update the first migration file.
- 5Run the app. Run npm run chat and open http://localhost:3000.
What you need before you start
Chatbot UI is a clone-and-build project, so you need a few tools on your computer before the app will run. The README lists Node.js (it says to use v18), Docker, and the Supabase CLI.
Docker is needed to run Supabase locally. Chatbot UI stores chats and settings in a Supabase (Postgres) database, so this is not optional for the local setup.
- Node.js, version 18 as stated in the README
- Docker (download from docs.docker.com/get-docker)
- Supabase CLI
Clone the repo and install dependencies
Clone the repository, then open a terminal in its root folder and install the packages.
git clone https://github.com/mckaywrigley/chatbot-ui.git
npm installInstall the Supabase CLI and start Supabase locally
On macOS or Linux, the README installs the Supabase CLI with Homebrew. On Windows it uses Scoop. Then, from the repo root, start Supabase.
Once it is running, the README says you can view the backend GUI at localhost:54323 on the project's editor page.
brew install supabase/tap/supabase
supabase startFill in environment variables and the SQL migration
Copy the example environment file, then get your local values from Supabase. Use the API URL from the status output for NEXT_PUBLIC_SUPABASE_URL and fill in the rest of .env.local.
You also need to edit the first migration file, supabase/migrations/20240108234540_setup.sql. Replace project_url (line 53) and service_role_key (line 54). The README says this prevents storage files from failing to delete properly. If you have not changed project_id in config.toml, the default project_url can stay as it is.
- Set NEXT_PUBLIC_SUPABASE_URL from the API URL in supabase status
- Replace service_role_key on line 54 with the value from supabase status
- Keep the default project_url on line 53 unless you changed project_id in config.toml
cp .env.local.example .env.local
supabase statusOptional: connect Ollama for local models
If you want to run models on your own machine through Ollama, install Ollama first. The README links to the Ollama installation instructions for macOS. Ollama is optional; you can use only hosted models if you skip it.
The README says the default Ollama address is http://localhost:11434, which is set through NEXT_PUBLIC_OLLAMA_URL. That variable is only needed when you use local Ollama models.
Run the app and open it in your browser
From the repo root, start the app. The README says it should then be running at http://localhost:3000. It also says to use a compatible Node version, which it lists as v18.
npm run chatRun a hosted version instead
The README describes a hosted quickstart. You repeat the local steps, create a Supabase project, link it with the Supabase CLI, push the database, then deploy the frontend to Vercel with the Next.js framework preset.
You should keep a separate repository for the hosted instance. The README also notes that the maintainer runs an official hosted version at chatbotui.com if you would rather not host it yourself. The README does not give a video tutorial for the hosted path; it says one is coming soon.
- Create a Supabase project and set Email auth; the README recommends turning off Confirm email for a personal instance
- Run supabase login, supabase link --project-ref <project-id>, and supabase db push
- Deploy on Vercel with the Next.js preset and set the Supabase, OpenAI or Azure OpenAI variables
supabase login
supabase link --project-ref <project-id>
supabase db pushWhat people use it for
- Run a self-hosted chat interface for OpenAI or Azure OpenAI models, with API keys set as environment variables.
- Try local models through Ollama alongside hosted models in one interface.
- Customize an open-source chat front end for a team, since the code is MIT licensed and written in TypeScript.
- Host a private chat app on your own server using the hosted quickstart with Supabase and Vercel.
Frequently asked questions
Is chatbot-ui free to use?
The project is released under the MIT licence, according to its listing. The README also says Supabase has a free tier for hosted instances, but it does not state prices for other services, so check those providers directly.
What do I need to install chatbot-ui?
The README lists Node.js (use v18), Docker, and the Supabase CLI. You clone the repo, run npm install, start Supabase locally, and then run npm run chat.
Does chatbot-ui work with Ollama?
The README says it can connect to local Ollama models. You install Ollama separately and, if it runs at a non-default address, set NEXT_PUBLIC_OLLAMA_URL. The default is http://localhost:11434.
Why does chatbot-ui need Supabase?
The README says earlier versions used browser storage, which had security issues and limited storage. Supabase is Postgres, is open-source, and stores chats and settings for the app.
Where should I ask for help if setup fails?
The README says setup questions belong in the Help section of the Discussions tab. It says issues unrelated to the codebase, such as setup or cloud provider problems, will likely be closed.
How does chatbot-ui compare to Open WebUI or LibreChat?
This guide does not benchmark them. Comparable projects listed for this item are LibreChat, Open WebUI, and big-AGI. Chatbot UI is a good fit if you want a Supabase-backed, TypeScript codebase to customize; compare features and setup effort yourself before choosing.
New agent skills, repos and AI tools — every week
The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.
Our verdict
Chatbot UI suits developers who are comfortable with Docker, Node.js and SQL migrations and want a self-hosted, customizable chat front end for OpenAI, Azure OpenAI or Ollama models. If you want a simple install or a polished mobile experience, the README says those are still in progress, so consider the hosted version or another project.
Install options & downloads