selfhost.directory

The index of self-hostable projects — ranked, categorized and served with live updates.
Own your data and stop giving it to big tech.

ChatGPT Next Web logo

Self-host ChatGPT Next Web

v2.16.1

Lightweight multi-provider AI chat web & desktop client

ReleaseOpen SourceMIT
docker run -d -p 3000:3000 -e OPENAI_API_KEY=sk-xxxx -e CODE=your-password yidadaa/chatgpt-next-web
Updatedlast year
LanguageTypescript
Setup difficultyEasy
MobileNative app
ThemeDark mode
Stars
88 968
Port
3000 (Web UI served by the container (Docker mapping 3000:3000))
Docker
yidadaa/chatgpt-next-web
Main chat screen of NextChatSettings screen with model and API configurationAdditional settings view of the app

What is ChatGPT Next Web?

NextChat is a cross-platform chat client for large language models: one interface can talk to OpenAI, Azure OpenAI, Anthropic Claude, Google Gemini, DeepSeek and many other providers using your own API keys, alongside a hosted pay-as-you-go service at nextchat.club. It streams responses, renders Markdown with LaTeX and Mermaid, offers prompt templates plus a shared prompt library, plugins such as network search and a calculator, an Artifacts window for generated content, realtime chat, and MCP support when enabled by environment variable. Conversations stay in the browser locally, with optional record sync through WebDAV endpoints or UpStash, and history is condensed automatically so long chats save tokens. Self-hosting is a single Docker command on port 3000, a Vercel one-click deploy, or a setup shell script; native clients include a compact (~5 MB) desktop build for Linux, Windows and macOS and an iOS app. Public deployments can be gated with an access password supplied via the CODE variable. The code is MIT-licensed; building from source needs Node.js 18 or newer. A separate enterprise edition advertises brand customization, admin-managed AI resources, permissions, security auditing and private deployment.

Should you self-host ChatGPT Next Web?

ChatGPT Next Web scores 84/100 on selfhost.directory (how scoring works) and ranks #2 of 68 in AI Chat. It has 88 968 GitHub stars, +129 in the last 30 days.

There was no stable release in the past 12 months, so check the repository's recent activity before you rely on it.

Setup is easy: most people get it running in one sitting. An official Docker image is available. It is MIT-licensed and written mostly in Typescript.

Its closest alternative on selfhost.directory is LibreChat (85/100, 47 147 stars). It scores higher overall, so compare the two before you pick. See ChatGPT Next Web vs LibreChat side by side.

Features

  • Artifacts
  • Chat history compression
  • Chat log sync
  • Local Data Storage
  • Markdown Rendering
  • MCP (Model Context Protocol) Support
  • Multilingual interface
  • Multi-provider LLM chat
  • Plugins
  • Prompt templates
  • Realtime chat
  • Share conversations
  • Streaming Responses
  • Vision model support

ChatGPT Next Web README

How to install ChatGPT Next Web

Install ChatGPT Next Web with Docker

Environment variables
OPENAI_API_KEY, CODE, PROXY_URL, ENABLE_MCP
docker pull yidadaa/chatgpt-next-web

docker run -d -p 3000:3000 \
   -e OPENAI_API_KEY=sk-xxxx \
   -e CODE=your-password \
   yidadaa/chatgpt-next-web

Recommended deployment; can also run behind a proxy (PROXY_URL) or with MCP enabled (ENABLE_MCP=true).

How to configure ChatGPT Next Web

  • OPENAI_API_KEYYour openai api key. (required)
  • CODEAccess password, separated by comma. (optional)
  • BASE_URLOverride openai api request base url. (optional) Default: https://api.openai.com Examples: http://your-openai-proxy.com
  • OPENAI_ORG_IDSpecify OpenAI organization ID.(optional) Default: Empty
  • AZURE_URLAzure OpenAI endpoint url, e.g. https://{resource}.openai.azure.com. (optional)

ChatGPT Next Web releases & version history

@ Every self-hosted release, weekly

One Monday email with the week's stable releases across the directory.

FAQ

What is Cloudflare?

Cloudflare is a network provider offering CDN, domain management, static page hosting and edge computing; commonly used to hide a server IP or deploy websites for free.

Can I deploy it on a server in China?

Yes, but you need a proxy for GitHub/OpenAI, an ICP filing for domain resolution in China, and should expect that proxy access to such applications may be blocked.

What is a proxy and how to use it?

Some regions cannot reach the OpenAI API directly, so either set a forward proxy (HTTP_PROXY in Docker) or point BASE_URL at an OpenAI-compatible reverse proxy such as a Cloudflare-based one.

It prompts "You exceeded your current quota, ..." when using?

That means the API key is problematic or its balance is insufficient.

It prompts "Now it's unauthorized, please enter the access password on the settings page" when using?

The deployment has an access password configured via CODE; open the settings page and enter the access code to use it.

Why does ChatGPT's reply get garbled

A temperature above 1 in Settings → model settings can garble replies; lower it back to 1 or less.

Why does it always prompt "An error occurred, please try again later"

Update to the newest version, verify the API key is set with the correct uppercase env-var name and is valid; if it persists, open an issue with the Vercel or Docker runtime log.

You may encounter an "Error: Loading CSS chunk xxx failed..."

Next.js code chunking has limited compatibility with older browsers; you can disable chunking (e.g. DISABLE_CHUNK=1 on Vercel or during yarn build), at the cost of longer first-load time, though pre-built Docker images cannot toggle it.

I've deployed, but it's not accessible

Work through the basics: is the service running, is the port mapped correctly, is the firewall open, is the network route to the server fine, and does the domain resolve?

Why doesn't the version I deployed have streaming response

Usually the reverse proxy buffers output — with nginx, disable proxy cache/buffering and enable chunked transfer encoding per the snippet; on Netlify the issue is still unresolved.

What is the environment variable CODE? Is it necessary to set it?

CODE is an optional access password (comma-separated list works). Without it anyone can reach your deployment; with it users must enter the password in the settings page.

How to modify Vercel environment variables

Open the Vercel console, select the project, go to Settings → Environment Variables and change the values there.

How to deploy on Vercel

Fork the project on GitHub, connect the fork to a Vercel account, create a new project selecting it, fill in the required environment variables and deploy; add a CNAME to cname.vercel-dns.com for direct access from China.

Why does the Docker deployment version always prompt for updates

The Docker image mirrors the latest release, and releases land every one to two days, so the running container is always slightly behind the newest commit — that is expected.

How to get help quickly?

Ask a model like ChatGPT or an online community, and include background plus a detailed description — well-formed questions get useful answers faster.

More in AI Chat

Rate this project

Click to rate — no account needed.

0 comments

Posting as guest
Loading comments…