Deploy NextChat
Pinned NextChat with generated access code, optional OpenAI-compatible API.
nextchat
Just deployed
Deploy and Host NextChat on Railway
Pinned NextChat (ChatGPT-Next-Web) on Railway: official Docker image, generated access code, optional OpenAI-compatible backend.
This listing deploys yidadaa/chatgpt-next-web:v2.16.1 (manifest sha256:eaaa469ddeeb5fa58fb35f8767e9e096a2f1c8468c54b6703323624bf3071c5a) — the current image published by ChatGPTNextWeb/NextChat. It does not Nix-build the redirected Yidadaa/ChatGPT-Next-Web GitHub URL.
About Hosting NextChat
NextChat is a self-hosted ChatGPT-style UI. It proxies requests to OpenAI or any OpenAI-compatible backend and stores chat history in the browser, so no database or volume is required. Hosting your own instance lets you generate a shared CODE access password, optionally embed OPENAI_API_KEY, and point BASE_URL at LiteLLM, LocalAI, vLLM, OpenRouter, or a custom proxy.
One-click deploy:
- Click Deploy on Railway.
- Railway generates
CODE. Copy it from the service variables after deploy. - Optionally paste
OPENAI_API_KEY, or leave it empty and enter a key in the UI. - Optionally set
BASE_URLfor an OpenAI-compatible API. - Open the public HTTPS domain and enter
CODEwhen prompted.
Common Use Cases
- Shared team UI — one generated access code, optional server-side API key so teammates do not each manage credentials.
- OpenAI-compatible frontend — set
BASE_URLat a self-hosted or third-party/v1endpoint (LiteLLM, LocalAI, vLLM, OpenRouter). - Locked-down public domain — unlike clones that ship no
CODE, this template generates an access password so the HTTPS URL is not an open proxy.
Dependencies for NextChat Hosting
- None required to boot the UI. An API key for at least one provider is needed to chat (OpenAI via
OPENAI_API_KEY, another vendor in Settings, orBASE_URLplus that backend's key). - No volume. Chats live in the browser (export/import or WebDAV if you want backups).
- Port
3000with a Railway public HTTP domain.
Deployment Dependencies
- Image:
yidadaa/chatgpt-next-web:v2.16.1(ChatGPTNextWeb/NextChat, Docker Hubyidadaa/chatgpt-next-web) - Upstream environment variables
| Variable | Required | Default | Notes |
|---|---|---|---|
CODE | generated | ${{secret()}} | Access password. Comma-separate multiple codes. |
OPENAI_API_KEY | optional | empty | Server-side OpenAI key. Leave empty to paste a key in Settings. |
BASE_URL | optional | empty (https://api.openai.com) | OpenAI-compatible API base URL. |
HOSTNAME | set | 0.0.0.0 | Bind address inside the container. |
PORT | set | 3000 | HTTP listen port. |
Optional provider keys you can add later: GOOGLE_API_KEY, ANTHROPIC_API_KEY, AZURE_URL + AZURE_API_KEY, DEEPSEEK_API_KEY.
Login: open the Railway HTTP domain. NextChat asks for Access Code — that is the generated CODE variable.
Healthcheck: the image has no dedicated /health path. Railway GET / healthchecks fail on Next.js host checks (healthcheck.railway.app). Verify with curl of the public domain: GET / returns HTTP 200 and ``.
Why Deploy NextChat on Railway?
The search-winning NextChat card still Nix-builds Yidadaa/ChatGPT-Next-Web (GitHub redirect), ships no access code, and has no healthcheck (health ~50). This template pins the current ChatGPTNextWeb/NextChat Docker tag (not :latest, not a Nixpacks GitHub clone), generates CODE, leaves OPENAI_API_KEY empty/optional, documents BASE_URL, and restarts on failure.
Railway hosts the container, public HTTPS domain, and generated secret so you do not have to run Docker yourself.
Template Content
nextchat
yidadaa/chatgpt-next-web:v2.16.1