Skip to content
AIRepoHub

NextChat

by ChatGPTNextWeb

Chat app for talking to many AI models like GPT, Claude and Gemini on web, desktop and mobile.

Local LLMsTypeScriptMIT license
Stars
88,983
stars
Forks
58k
forks
Last push
1 month ago
Activity
Active
NextChat: quick start
# Run it with Docker$ docker run -d -p 3000:3000 -e OPENAI_API_KEY=sk-xxxx -e CODE=your-password yidadaa/chatgpt-next-web

Commands from the project's README. Run them after installing (see below).

Overview

Understand NextChat in 60 seconds

What it does
NextChat is a light, fast chat app for AI models such as GPT, Claude, Gemini and DeepSeek. You deploy your own copy on Vercel, Docker or a desktop app, add your API key, and get a ChatGPT-style interface.
The problem it solves
Using several AI models usually means several paid chat apps. NextChat gives you one self-hosted interface that talks to the providers you have keys for, with chats stored locally in your browser.
Why choose it
Choose it for a quick, free, self-hosted chat UI with one-click Vercel deploys and many providers. You pay the AI providers for usage through your own keys.
Who should use it
  • People with API keys who want their own chat interface
  • Teams sharing one private chat app behind a password
  • Users of self-hosted models via LocalAI or similar
  • Anyone wanting a small desktop chat client
Setup difficulty

You'll need:

  • An API key for at least one provider (OpenAI, Anthropic, Google and others)
  • Node.js 18+ for local development
  • Or Docker 20+, or a Vercel account

How NextChat works

NextChat (formerly ChatGPT Next Web) is a web chat client you host yourself. It supports OpenAI, Azure, Google Gemini, Anthropic, Baidu and other providers through environment variables, and is compatible with self-hosted models such as LocalAI.

Chats are stored locally in the browser. It renders markdown with LaTeX and mermaid, streams responses, compresses long chat history to save tokens, and lets you create prompt templates called masks. Plugins, artifacts and realtime chat are also supported, and MCP can be enabled at build time.

You can deploy it in one click on Vercel, run the Docker image, or download the small desktop app for Windows, macOS and Linux. A CODE environment variable adds a simple access password.

Features

Key features

One-click deploy

Deploy your own copy on Vercel in about a minute.

Many providers

OpenAI, Azure, Gemini, Anthropic and more through env variables.

Local storage

Conversations are stored in your browser.

Prompt templates

Create and share masks with predefined prompts.

Desktop app

A small client for Windows, macOS and Linux.

Access password

Protect your deployment with the CODE variable.

Strengths

  • Very easy to deploy
  • Lightweight and fast
  • Works with many AI providers
  • MIT licensed

Limitations

  • You pay providers for API usage
  • The CODE password is basic access control
  • Vercel forks need manual steps to stay updated

Practical use cases

Personal AI chat

Use your own API keys in one interface.

Team chat app

Share one deployment protected by a password.

Self-hosted models

Point BASE_URL at a compatible local server.

Installation

Install NextChat

Based on official documentation

Commands come from NextChat's README. AIRepoHub hasn't run them yet. Steps are as of Nov 25, 2026; projects change often, so if a command doesn't work, check the project's latest README. View source

Prerequisites

  • Docker 20+, or Node.js 18+ and yarn

Supported systems

  • Windows
  • macOS
  • Linux
  1. 1

    Pull and run the image

    Replace the key and password with your own.

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

    Open http://localhost:3000

  1. 1

    Create .env.local in the project root

    Text
    OPENAI_API_KEY=
  2. 2

    Install and run

    Needs Node.js and yarn.

    Shell
    yarn installyarn dev
  1. 1

    Get an API key

    For example from platform.openai.com.

  2. 2

    Deploy

    Use the Deploy with Vercel button in the README and fill in OPENAI_API_KEY and CODE.

Configuration and API keys

SettingWhat it's for
OPENAI_API_KEYRequiredYour OpenAI key; join several with commas.
CODEOptionalAccess passwords, separated by commas.
BASE_URLOptionalOverride the OpenAI API URL, for example for a proxy.
ANTHROPIC_API_KEYOptionalKey for Claude models.
GOOGLE_API_KEYOptionalKey for Gemini models.
ENABLE_MCPOptionalSet to true before building to enable MCP.

First run

  1. 1

    Start the container

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

    Open http://localhost:3000 and enter your access password

NextChat's documentation doesn't include sample output, so we don't show any. Expect the results in your terminal.

Your first project

Run your own NextChat with Docker

Host a private chat app protected by a password.

Before you start

  • Docker 20+
  • An OpenAI API key
  1. 1

    Pull the image

    Shell
    docker pull yidadaa/chatgpt-next-web
  2. 2

    Start it with your key and a password

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

    Open http://localhost:3000

    Enter the password in settings and start a chat.

What to expect

NextChat runs on port 3000 and answers using your API key.

Next steps

  • Add ANTHROPIC_API_KEY or GOOGLE_API_KEY for more models
  • Create a mask (prompt template)
  • Deploy on Vercel for a public URL

Costs and requirements

What it costs to run

License
MIT. Free to use, modify and use commercially.Free
Software
Free and open source.Free
AI providers
Usage is billed by the providers whose keys you add.Paid
Hosting
Vercel or your own server, depending on your plan.Depends

Troubleshooting

Common setup issues

Vercel keeps showing Updates Available

Delete the repo Vercel created, fork the project instead and redeploy, then enable Upstream Sync in the fork's Actions.

Source: README.md

Upstream Sync fails

Update the fork manually using GitHub's syncing-a-fork steps.

Source: README.md

Password changes don't apply

Redeploy after changing the CODE variable.

Source: README.md

Can't reach the OpenAI API

Set BASE_URL to a proxy you trust.

Source: README.md

Alternatives

Similar AI repositories