How to Install NextChat Self Hosted ChatGPT UI (2026)

Quick answer

To install NextChat, pull the official Docker image and run it on port 3000 with your API key and a strong CODE access password. Then open http://localhost:3000, enter the access code in Settings, and send your first chat. NextChat is free under the MIT licence. It does not run models itself, so connect a cloud API key or a local OpenAI-compatible endpoint before your first chat.

You want a ChatGPT-style chat screen for your business. You do not want every team member buying a separate subscription, and you do not want a heavy server stack to look after.

NextChat gives you that screen in one light web app. This guide shows how to install NextChat self hosted ChatGPT UI with Docker, set the access password, connect your model providers, point it at a local endpoint, secure it, back it up, update it, and fix the errors that stop most first installs.

Quick Answer

To install NextChat, pull the official Docker image and run it on port 3000 with your API key and a strong CODE access password. Then open http://localhost:3000, enter the access code in Settings, and send your first chat. NextChat is free under the MIT licence. It does not run models itself, so connect a cloud API key or a local OpenAI-compatible endpoint before your first chat.

In this article

  • How we checked this guide
  • What NextChat replaces, and what it does not
  • Docker, Vercel, or local development
  • Requirements before you install NextChat
  • Step 1: install NextChat with Docker
  • Step 2: set the access password and send your first chat
  • Step 3: connect providers and control the model list
  • Step 4: connect a local endpoint for private models
  • First-run security steps you must not skip
  • Make NextChat useful for real work
  • Backup and update routine
  • Common errors and fixes
  • Tips and tricks that save time
  • The real cost maths: NextChat versus ChatGPT Plus
  • When not to self-host NextChat
  • Pros and cons
  • Our verdict
  • FAQ
  • Strategic Pivot: price the whole stack before you switch
  • Sources

How we checked this guide

We checked the install commands, deployment routes, environment variables, and update steps on the official NextChat GitHub repository. We checked the container setup in the official docker-compose.yml file in that repository.

We checked the licence in the official LICENSE file. We checked the configuration options in the official .env.template file. We checked the error fixes in the official FAQ document. The paid comparison uses OpenAI’s official Help Center page. That page lists ChatGPT Plus at $20 a month, billed monthly. It also states that API usage is separate and billed independently.

What NextChat replaces, and what it does not

NextChat replaces the chat window, not the model. One light web app gives you a ChatGPT-style screen for several providers. The official repository lists support for OpenAI, Claude, Gemini, DeepSeek, and other providers through API keys.

The key limit is simple. NextChat is the interface, not the intelligence. The model still runs somewhere. It runs at a cloud provider through an API key, or on your own hardware through a local server. Do not judge NextChat as if it were a model.

That split is the whole buying decision. NextChat controls the screen, prompts, and model choices. The provider controls model quality, speed, and API billing. A local endpoint controls privacy and hardware cost.

NextChat also stores chat data locally in the browser by default. The repository calls this privacy first. It also means each browser holds its own history until you set up sync. Plan for that before your team depends on shared history.

Best for: a small-business owner, freelancer, or team lead who wants a fast, light ChatGPT UI on a server they control, with several providers behind one screen. Skip if: you need user accounts, member permissions, and an admin panel in the free version. Those controls sit in the separate Enterprise Edition.

NextChat is the lightest option in our local-AI series. Our guide to install Ollama on Ubuntu covers a local model runner. Our guide to install Open WebUI with Ollama covers a fuller browser front end. Our guide to install llama.cpp for local LLM on CPU covers the engine layer.

Our guides to install GPT4All for private offline AI chat and install Jan AI desktop for local models cover desktop apps. Our guide to install LocalAI as a self hosted OpenAI alternative covers the local server NextChat can connect to. Our guides to install Text Generation WebUI for local LLMs, install LibreChat self hosted AI chat, and install LobeChat self hosted AI assistant cover heavier workspaces. Choose NextChat when light and fast matters most.

Docker, Vercel, or local development

Docker is the right first install for most readers. The official repository marks Docker as the recommended deployment route. One container serves the app on port 3000. There is no database container to manage.

NextChat official docker-compose file showing port 3000 and environment settings

The Vercel route deploys NextChat with one click. The repository presents it as a free deploy in under one minute. Check the current Vercel terms and limits before you rely on that route for a business rollout. Vercel also changes how updates work, as the update section explains.

Local development runs the code directly with Node.js and Yarn. Choose that route only when you plan to change NextChat code. It is a contributor route, not a team rollout route.

RouteBest forWhat you manageMain trade-off
DockerFirst install, home server, or VPSDocker, environment variables, and updatesYou own the server and its security
Vercel one-clickFastest first test with no serverVercel project, environment variables, and fork updatesPlatform limits and update quirks
Local developmentContributors changing the codeNode.js, Yarn, and .env.localNot a production rollout route

Best for: Docker fits a first business test and a small team rollout on a machine you control. Skip if: you want the vendor to run everything, or you need member permissions from day one. Start with the route your team can maintain.

Requirements before you install NextChat

Check the runtime versions first. The official requirements are NodeJS 18 or higher and Docker 20 or higher. The Docker route needs Docker only. The local development route needs Node.js and Yarn.

Check the port before you start. NextChat serves on port 3000 inside the container. Your chosen host port must be free. The official examples map host port 3000 to container port 3000.

Prepare one model route before your first chat. NextChat needs a provider API key or a local OpenAI-compatible endpoint. A cloud key is the fastest first test. A local endpoint is the private route, and it needs hardware sized for the model. NextChat itself does not need a GPU.

Prepare a strong access password. NextChat uses a shared access code, not user accounts, in the free version. Treat that code like a server password. A short code invites brute-force guessing, as the FAQ warns.

Decide where chats will live. By default, chat data stays in each user’s browser. Decide now whether that is acceptable, or whether you will configure chat sync. Changing that decision after the team builds history is harder.

Step 1: install NextChat with Docker

Install NextChat official GitHub repository showing Docker deployment and MIT licence

Pull the official image first:

docker pull yidadaa/chatgpt-next-web

Run the container with your API key and access password:

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

Replace your-api-key with your real provider key. Replace your-password with a long, random access code. Never paste a real key or code into a public issue, chat, or screenshot.

Open http://localhost:3000 in your browser. You should see the NextChat screen. If the page does not load, check that the container is running and port 3000 is free.

Prefer Compose when you want the settings in a file. The official docker-compose.yml defines two services. The chatgpt-next-web service uses the no-proxy profile. The chatgpt-next-web-proxy service uses the proxy profile and adds PROXY_URL.

Start the no-proxy profile with Compose:

docker compose --profile no-proxy up -d

Set OPENAI_API_KEY, CODE, and any other variables in your environment or .env file first. The Compose file reads values such as CODE, BASE_URL, and OPENAI_ORG_ID from the environment. Keep that file private.

Use the proxy profile only when your server must reach providers through a proxy. Set PROXY_URL to your proxy address, then start the proxy profile. Do not add a proxy you do not control.

Check logs when the first load fails with docker logs chatgpt-next-web. Fix the named cause, then load the page again.

Step 2: set the access password and send your first chat

NextChat has no first admin account to create. The CODE environment variable is the access control. The official guide calls it limited access control. Understand that limit before you share the address.

Set CODE before anyone else can reach the server. The value can hold several passwords, separated by commas. Use one long code for the team, or separate codes you can rotate when someone leaves.

Open Settings on first use. Enter the access code there. The FAQ says users must enter the access password in Settings to use the app. Without it, NextChat prompts that access is unauthorized.

Restart or redeploy after you change CODE. The official guide says changes take effect after redeployment. Test the new code in a private browser window. Confirm the old code no longer works.

Send a small first chat. Ask for a one-sentence summary of a paragraph you paste in. Confirm the answer streams back and the conversation saves. Refresh the page and confirm the history is still there.

Test in a second browser with the same code. Each browser keeps its own local history by default.

Step 3: connect providers and control the model list

Start with one provider. OPENAI_API_KEY is the required variable in the official template. You can join several OpenAI keys with commas. Keep keys in environment variables, never in the browser of a shared machine.

NextChat official environment template showing provider API keys and access code

Add other providers only when you need them. The template includes keys for Google Gemini, Anthropic Claude, DeepSeek, Azure OpenAI, Alibaba, ByteDance, Baidu, ChatGLM, iFlytek, SiliconFlow, 302.AI, xAI, Moonshot, Tencent, and Stability. Each provider bills by its own rules.

Use BASE_URL when you need a different OpenAI-compatible address. The default is https://api.openai.com. A proxy or local endpoint replaces that address. Point it only at endpoints you trust with your prompts.

Control the model list with CUSTOM_MODELS. Use + to add a model and - to hide one. Use name=displayName to rename how a model appears. Use -all to disable all default models and +all to enable them.

Set DEFAULT_MODEL to the model your team should land on. A sensible default prevents expensive mistakes. Pair it with DISABLE_GPT4=1 when you want to block GPT-4 use through the server key.

Decide whether users may bring their own keys. Set HIDE_USER_API_KEY=1 to block user-entered keys. Set ENABLE_BALANCE_QUERY=1 only when balance visibility helps cost control. Set DISABLE_FAST_LINK=1 on shared installs so shared links cannot change settings.

Test each provider with the same small task. Compare answer quality, speed, and cost on real work. Keep the provider that earns its place. Remove keys for providers nobody uses.

Step 4: connect a local endpoint for private models

NextChat is fully compatible with self-deployed models. The official repository recommends RWKV-Runner or LocalAI for that route. Install the local server first, then connect NextChat to it.

Our guide to install LocalAI as a self hosted OpenAI alternative covers the server setup. Pull one model that fits your hardware before you configure NextChat. A model that barely fits will feel broken in chat.

Point NextChat at the local endpoint. Set BASE_URL to your local OpenAI-compatible address, or configure the custom endpoint in Settings. Add the local model name with CUSTOM_MODELS when it does not appear by default.

Send the same short summary test you used for the cloud provider. Compare speed and quality on the same task. Check that long answers stream without stalling. Local speed depends on your hardware, not on NextChat.

Remember the privacy limit. A local model keeps inference on your hardware. It does not make every workflow private by itself. Plugins, web search, and sync services can still transmit data. Check each addition before you send sensitive business documents through it.

Use local and cloud models for different jobs. Put routine drafts, summaries, and internal notes on the local model when quality passes your test. Keep hard reasoning or customer-facing work on the stronger hosted model when the local answer is not good enough.

First-run security steps you must not skip

Set CODE before the server is reachable by anyone else. The FAQ warns plainly: without a code, anyone can access your project. On a public address, that means strangers can spend your API balance.

Use a long access code. The FAQ links fast token consumption to short passwords and brute-force attempts. Search your Docker logs for got access code when usage looks wrong. Rotate the code at once when guessing appears.

Keep API keys server-side. Put keys in environment variables on the server. Set HIDE_USER_API_KEY=1 when users should not enter their own keys. Never share screenshots that show keys, codes, or .env values.

Put HTTPS in front of a public install. Serve NextChat through a reverse proxy with a valid certificate. Keep port 3000 closed to the public internet when the proxy handles traffic. Test the public address from outside your network.

Configure the proxy for streaming. The FAQ gives nginx settings that disable caching and buffering for streaming output. Without them, answers may arrive in one late block instead of streaming. Apply the settings, reload the proxy, and test again.

Treat MCP as a security decision. The repository says MCP needs ENABLE_MCP=true before build. It also says MCP requires CODE, and every MCP server action verifies that access code. Enable MCP only when you understand the tools it can call.

Restrict the model list on shared installs. Hide models your team should not use. Block expensive models with DISABLE_GPT4=1 when cost control matters. A shared key with an open model list is a shared wallet.

Watch usage from day one. Check provider usage after the first team test. Set provider-side limits where the provider offers them. A usage spike is a security signal, not only a billing surprise.

Make NextChat useful for real work

Create prompt templates for repeated jobs. NextChat supports prompt templates, called masks, that you can create, share, and debug. Build one mask for product descriptions, one for support replies, and one for meeting summaries.

Test each mask on real work before the team depends on it. Use a real product, a real customer question, and a real internal note. Score the answers for accuracy, tone, and editing time. A mask that creates correction work does not earn its place.

Use the built-in history compression well. NextChat compresses chat history automatically to support long conversations and save tokens. Start a fresh chat when the topic changes. Long mixed chats waste tokens and blur answers.

Share answers as images for quick team updates. Check each image for customer details before it leaves the team.

Add plugins one at a time, such as network search or calculator tools. Test each on a low-risk task and check what data it can reach. Keep a short team note: which model and mask fit each job, and what data must never enter the chat.

Backup and update routine

Back up three things: your configuration, your access codes, and your chat history plan. NextChat has no server database to dump. The configuration lives in your environment variables and Compose file. Chat history lives in each browser by default.

Copy your .env values and docker-compose.yml to a private backup folder. Store the backup outside the server. Keep API keys and codes encrypted or in a password manager. A leaked backup is a leaked wallet.

Decide how chat history survives a cleared browser. Local browser storage disappears when browser data is cleared. Configure chat sync when history matters. The repository documents chat record synchronizing, and the template includes WHITE_WEBDAV_ENDPOINTS for allowed WebDAV sync endpoints.

Set WHITE_WEBDAV_ENDPOINTS to complete endpoint addresses only. Each entry must be a full endpoint, such as an https:// WebDAV address. Test sync with a throwaway chat. Confirm it appears in a second browser before the team relies on it.

Update Docker installs by pulling the new image. Back up your configuration first. Then pull, recreate the container with the same environment variables, and run the first-chat test again.

docker pull yidadaa/chatgpt-next-web

Update Vercel installs through your fork. The repository warns that one-click deploys create a new project instead of a fork, so update detection fails. Fork the project, deploy from the fork, then enable Workflows and the Upstream Sync Action. Automatic updates then run hourly.

Sync the fork manually when the automatic sync fails. The repository points to GitHub’s fork-sync documentation for that case. Redeploy after syncing, then test the access code and one chat.

Expect the Docker version to lag the newest code. The FAQ says Docker matches the latest release, and releases trail the newest commit by one to two days. A Docker update prompt can be normal. Update on your schedule, after a backup.

Keep a short update log. Write the date, the image or fork state, and whether the first chat test passed. Note any environment variable you changed. Future troubleshooting starts from that log.

Common errors and fixes

The deployed page is not accessible

Check the basics in order. The FAQ lists five checks: the service is started, the port is mapped correctly, the firewall port is open, the route to the server works, and the domain resolves correctly. Fix the first failing check, then test again.

Confirm the container is running with docker ps. Confirm the port mapping shows 3000. Test http://localhost:3000 on the server before you debug DNS or HTTPS.

NextChat says access is unauthorized

Enter the access code in Settings. The FAQ says this prompt appears when CODE is set and the user has not entered it. Check for extra spaces when you paste the code.

Confirm the running container carries the code you expect. Environment changes need a container recreate or redeploy. Test in a private browser window after every code change.

Every chat says an error occurred

Work through the FAQ checks in order. Update to the latest version and try again. Confirm the environment variable name is uppercase with underscores, such as OPENAI_API_KEY. Confirm the key itself is available and valid.

Read the runtime logs before you guess. Use the Docker logs for a Docker install, or the Vercel runtime log for a Vercel install. Attach the relevant log lines when you ask for help. Remove keys and codes from logs first.

The reply says the quota is exceeded

Check the provider account balance. The FAQ ties this prompt to an API key problem, usually insufficient balance. Top up or replace the key through the provider, then test again.

Check usage for abuse at the same time. A quota error after light team use can mean a leaked key or a guessed access code. Review provider usage and Docker logs before you simply add funds.

Answers do not stream

Check your reverse proxy. The FAQ says nginx needs caching and buffering disabled for streaming output. Add the documented settings: proxy_cache off, proxy_buffering off, and chunked_transfer_encoding on.

Reload the proxy and send a long-answer test. The text should appear progressively. If it still arrives in one block, test the app directly on port 3000 to isolate the proxy.

Replies look garbled

Check the temperature setting. The FAQ says a temperature above 1 can garble replies. Set it back within 1 in the model settings. Test with the same prompt after the change.

Start a fresh chat when garbling persists. A damaged long history can follow the conversation. A clean chat separates a settings problem from a history problem.

Tokens burn too fast

Check provider usage records first. The FAQ warns that hourly consumption of tens of thousands of tokens signals a leaked key. Delete and regenerate the key at once. Never check balances on random websites.

Search Docker logs for got access code attempts. Repeated attempts mean someone is guessing your access code. Replace a short code with a long one, recreate the container, and review usage again.

The page fails with a CSS chunk error

This error affects older browsers. On Vercel, add DISABLE_CHUNK=1 and redeploy. For self-built installs, build with DISABLE_CHUNK=1 yarn build. Docker users cannot disable chunking in the packaged build, so update the browser instead.

Docker always prompts for updates

Treat this as expected first. Docker matches the latest release, one to two days behind the newest commit. On Vercel, a constant prompt usually means a one-click project, not a fork. Re-deploy from a fork to fix detection.

Tips and tricks that save time

Start on localhost, even when the final goal is a team domain. Add HTTPS, sync, and plugins only after the access code, one provider, and one chat pass. Each move then changes one layer at a time.

Connect one provider first. Send one short test and confirm the history saves. Add a second provider only after that path works. A second provider added during a failure gives you two unknowns instead of one.

Use CUSTOM_MODELS to keep the list honest. Hide models your keys cannot use. Rename models to names your team understands. A short, accurate model list prevents failed chats and surprise bills.

Set a cheap default model. Put routine work on the default. Move hard work to a stronger model deliberately. Review the split monthly against provider usage.

Name masks by the job, such as “Support reply draft”. Rotate access codes when people leave; rotation is your off switch in the free version. After every update, rerun the short summary test and check one saved conversation. A container that starts is not yet a workspace that works.

The real cost maths: NextChat versus ChatGPT Plus

The NextChat software is free under the MIT licence. ChatGPT Plus costs $20 a month, billed monthly, on OpenAI’s official Help Center page. That is $240 a year for one person. OpenAI does not offer annual billing for Plus.

OpenAI official Help Center page showing ChatGPT Plus costs $20 per month

Use a realistic solo scenario first. You already own a machine that can run Docker. You connect NextChat to a local endpoint, and your own test shows the local model handles routine drafts, summaries, and internal notes well enough to replace one ChatGPT Plus subscription.

ChoiceSoftware cost per yearWhat the number leaves out
NextChat with a local endpoint on a machine you already own$0Electricity, hardware limits, update time, and model quality
One ChatGPT Plus subscription$240Hosted model access and OpenAI’s service operation
Software saving$240Only real if the local workflow replaces the paid work

The maths is plain. One seat at $20 a month costs $240 a year. NextChat software costs $0 in licence fees in that scenario. The solo software saving is $240 a year, before electricity, hardware wear, and your time.

The team maths is larger, and the condition is stricter. Five ChatGPT Plus seats cost $100 a month, which is $1,200 a year. NextChat software still costs $0 in licence fees. The $1,200 saving is real only when your workflow replaces the work those five subscriptions were doing. Test the team workflow before you cancel anything.

The saving shrinks when cloud APIs enter the picture. OpenAI states that API usage is separate from ChatGPT Plus and billed independently. If your team still needs hosted frontier models through an API, NextChat becomes the screen and the API becomes the bill. That can still be the right choice. It is not a $240 or $1,200 saving until your usage proves it.

Hosting cost decides many cases. The repository presents Vercel one-click as a free deploy route; check current platform terms first. If you rent a server, subtract your actual quote from the saving.

The licence needs plain words. NextChat uses the MIT licence. It permits use, copying, modification, merging, publishing, distribution, sublicensing, and selling, free of charge. Keep the copyright and permission notice in copies. The software comes as is, without warranty. The separate Enterprise Edition adds permissions, admin controls, knowledge integration, and security auditing by arrangement with the vendor. This guide is not legal advice.

When not to self-host NextChat

Do not self-host NextChat when nobody will maintain it. Updates, access-code rotation, provider keys, and usage checks need an owner. A hosted subscription is the better buy when the honest answer is “no one will look after the server.”

Do not choose the free version when you need real user accounts. The free version uses shared access codes, not member permissions. Teams that need per-user control, audit trails, or an internal knowledge base should evaluate the Enterprise Edition or a heavier workspace instead.

Do not choose NextChat when you want a model included. NextChat is the screen, not the model. If you want an offline desktop app with models inside one installer, start with GPT4All or Jan instead.

Do not expose NextChat to the internet as a casual experiment. Public access needs a long access code, HTTPS, model restrictions, usage monitoring, and updates. Without a code, anyone can reach the app and spend your API balance.

Do not ignore browser-local history or model quality. Browser chats vanish when browser data clears, so configure sync first. Test real tasks before moving customer, legal, medical, or financial work to a local model. A private wrong answer is still wrong.

Pros and cons

Pros: Free under the MIT licence, including commercial use; one light Docker container with no database to manage; several providers behind one ChatGPT-style screen; chat data stored locally in the browser by default; prompt masks, artifacts, plugins, and streaming responses; official Docker, Compose, and Vercel routes with documented environment controls.

Cons: NextChat does not run models, so a provider key or local endpoint is required; the free version uses shared access codes, not user accounts or permissions; browser-local history needs sync setup for team use; cloud API usage bills separately from subscriptions; public deployment needs HTTPS, a long code, and usage monitoring; model quality depends on the provider or local model you connect.

Our verdict

Install NextChat if you want a light, fast ChatGPT UI on a server you control, and you accept shared access codes instead of user accounts. Start with Docker on localhost, one long code, and one provider. Add a local endpoint after the first chat works. Move the team over only when your own tasks prove the workflow saves money or time.

FAQ

Is NextChat free for business use?

Yes. NextChat uses the MIT licence, which permits commercial use, modification, distribution, and selling, free of charge. Keep the copyright and permission notice in copies. Provider API usage and server costs still bill separately. The Enterprise Edition is a separate vendor arrangement.

Does NextChat need a GPU?

No. NextChat does not run AI models itself, so it does not need a GPU. The official requirements are NodeJS 18 or higher and Docker 20 or higher. If you connect a local model through a local endpoint, size the hardware for that model instead.

How do I install NextChat with Docker?

Pull the official image with docker pull yidadaa/chatgpt-next-web. Run it with docker run -d -p 3000:3000, your API key, and a strong CODE access password. Open http://localhost:3000, enter the code in Settings, and send your first chat.

Why does NextChat say access is unauthorized?

The server has an access password set through the CODE environment variable. Enter that code in Settings on first use. If you changed the code, recreate the container or redeploy, then test again in a private browser window.

Is NextChat safe to expose on the internet?

Not without work. Set a long CODE access password, serve the app over HTTPS, restrict the model list, hide user API keys, and monitor provider usage. Without a code, anyone can access the app and spend your API balance.

Strategic Pivot: price the whole stack before you switch

NextChat can remove duplicate chat subscriptions from a team workflow. It does not price the rest of your AI stack, and the rest is where small businesses quietly overspend. Before you cancel or renew any plan, put the tools, seats, and monthly prices you actually use into our AI Cost Calculator and look at the yearly total.

Then decide with the number in front of you. Move steady chat work to NextChat when your own test proves the workflow works. Keep the hosted plan that earns its cost. Cancel the line that survives only because nobody added it up.

Sources

Price note — updated 1 December 2026: Prices in this post were checked on 1 December 2026. When you are reading this, the price may be lower or higher — always check the official pricing page before you buy.

Pros

  • Free under the MIT licence, including commercial use
  • one light Docker container with no database to manage
  • several providers behind one ChatGPT-style screen
  • chat data stored locally in the browser by default
  • prompt masks, artifacts, plugins, and streaming responses
  • official Docker, Compose, and Vercel routes with documented environment controls

Cons

  • NextChat does not run models, so a provider key or local endpoint is required
  • the free version uses shared access codes, not user accounts or permissions
  • browser-local history needs sync setup for team use
  • cloud API usage bills separately from subscriptions
  • public deployment needs HTTPS, a long code, and usage monitoring
  • model quality depends on the provider or local model you connect
Our verdict

Install NextChat if you want a light, fast ChatGPT UI on a server you control, and you accept shared access codes instead of user accounts. Start with Docker on localhost, one long code, and one provider. Add a local endpoint after the first chat works.

Leave a Comment