Self-hosted alternatives to ChatGPT

Last updated · 17 options

Quick answer: Ollama has the most stars on its repository of the 17 options here (★ 184k), followed by Open-WebUI (★ 156k). Stars show popularity, not fit, so check formats, platforms and licence for your own work.

OpenAI's AI chat assistant. Here are 17 self-hosted options, most-starred first.

Ollama

Generative Artificial Intelligence (GenAI)

Get up and running with Llama 3.3, DeepSeek-R1, Phi-4, Gemma 3, and other large language models.

Stars
★ 184k
Licence
MIT
Updated
  • Docker

Alternative to ChatGPT

Open-WebUI

Generative Artificial Intelligence (GenAI)

User-friendly AI Interface, supports Ollama, OpenAI API.

Stars
★ 156k
Licence
BSD-3-Clause
Updated
  • Docker

Alternative to ChatGPT

llama.cpp

Generative Artificial Intelligence (GenAI)

Fast C/C++ engine that runs open AI models on ordinary CPUs and GPUs, with a built-in chat page and OpenAI-style API

Stars
★ 132k
Licence
MIT
Updated
  • Docker

Alternative to ChatGPT, OpenAI API

RAGFlow

Generative Artificial Intelligence (GenAI)

Document-understanding RAG engine for chatting with large collections of files, with cited answers

Stars
★ 92.5k
Licence
Apache-2.0
Updated
  • Docker

Alternative to ChatGPT

NextChat

Generative Artificial Intelligence (GenAI)

Lightweight, fast chat interface for OpenAI, Claude, Gemini and local models

Stars
★ 88.9k
Licence
MIT
Updated
  • Docker

Alternative to ChatGPT

LobeHub

Generative Artificial Intelligence (GenAI)

Modern design AI chat framework supporting multiple AI providers, one click install MCP Marketplace and Artifacts / Thinking.

Stars
★ 83.3k
Licence
Proprietary
Updated
  • Docker

Alternative to ChatGPT

PrivateGPT

Generative Artificial Intelligence (GenAI)

Ask questions about your own documents with everything running privately

Stars
★ 57.6k
Licence
Apache-2.0
Updated
  • Docker

Alternative to ChatGPT

text-generation-webui

Generative Artificial Intelligence (GenAI)

Browser interface for running local language models with many back-ends and fine-grained controls

Stars
★ 47.7k
Licence
AGPL-3.0
Updated

Alternative to ChatGPT

LibreChat

Generative Artificial Intelligence (GenAI)

Enhanced ChatGPT-compatible AI chat interface supporting multiple AI providers, with multi-user auth, message search, and plugin support.

Stars
★ 46k
Licence
MIT
Updated
  • Docker

Alternative to ChatGPT

Jan

Generative Artificial Intelligence (GenAI)

Open-source desktop ChatGPT alternative that runs models fully offline

Stars
★ 45k
Licence
Apache-2.0
Updated

Alternative to ChatGPT

Khoj

Generative Artificial Intelligence (GenAI)

Self-hostable AI second brain that answers from your notes, documents and the web

Stars
★ 37.7k
Licence
AGPL-3.0
Updated
  • Docker

Alternative to ChatGPT, Perplexity

Onyx

Generative Artificial Intelligence (GenAI)

Team AI assistant and search across your company's apps and documents

Stars
★ 32.6k
Licence
MIT
Updated
  • Docker

Alternative to ChatGPT

llamafile

Generative Artificial Intelligence (GenAI)

Mozilla project that packs an AI model and its runner into a single file you can run anywhere

Stars
★ 26.4k
Licence
Apache-2.0
Updated

Alternative to ChatGPT

K

Kotaemon

Generative Artificial Intelligence (GenAI)

Clean web app for chatting with your documents, with in-document citations

Stars
★ 25.8k
Licence
Apache-2.0
Updated
  • Docker

Alternative to ChatGPT

KoboldCpp

Generative Artificial Intelligence (GenAI)

Single-file local AI runner with a built-in story-writing and chat interface

Stars
★ 12k
Licence
AGPL-3.0
Updated
  • Docker

Alternative to ChatGPT

Hugging Face Chat UI

Generative Artificial Intelligence (GenAI)

The open-source code behind HuggingChat, for running your own chat site on any OpenAI-compatible model

Stars
★ 11k
Licence
Apache-2.0
Updated
  • Docker

Alternative to ChatGPT

big-AGI

Generative Artificial Intelligence (GenAI)

Advanced AI chat workspace that can ask several models at once and merge their answers

Stars
★ 7.2k
Licence
MIT
Updated
  • Docker

Alternative to ChatGPT

FAQ

Is there a self-hosted alternative to ChatGPT?

Yes. SelfHostAlts lists 17 options: Ollama, Open-WebUI, llama.cpp, RAGFlow, NextChat, LobeHub, PrivateGPT, text-generation-webui, LibreChat, Jan, Khoj, Onyx, llamafile, Kotaemon, KoboldCpp, Hugging Face Chat UI and big-AGI.

Which ChatGPT alternatives are open source?

Ollama (MIT), Open-WebUI (BSD-3-Clause), llama.cpp (MIT), RAGFlow (Apache-2.0), NextChat (MIT), PrivateGPT (Apache-2.0), text-generation-webui (AGPL-3.0), LibreChat (MIT), Jan (Apache-2.0), Khoj (AGPL-3.0), Onyx (MIT), llamafile (Apache-2.0), Kotaemon (Apache-2.0), KoboldCpp (AGPL-3.0), Hugging Face Chat UI (Apache-2.0) and big-AGI (MIT). The others are free or freemium but not open source.

Which ChatGPT alternatives can run with Docker?

Ollama, Open-WebUI, llama.cpp, RAGFlow, NextChat, LobeHub, PrivateGPT, LibreChat, Khoj, Onyx, Kotaemon, KoboldCpp, Hugging Face Chat UI and big-AGI. The others listed here aren't listed for Docker.

Related categories: Generative Artificial Intelligence (GenAI)

Self-hosted apps are rarely drop-in replacements. Check the import options, mobile apps and requirements before you move your data, and keep backups.

SelfHostAlts Weekly

Every week: the best new self-hosted alternatives to the SaaS tools you pay for, with what you need to run them. Free. More about it →