NextChat
Deploy NextChat with a gateway root URL, access code and explicit custom model.
Install and prepare
Install Docker 20 or newer and deploy the official NextChat image with the command below. Replace YOUR_API_KEY with a routerra.ai key, YOUR_MODEL_ID with an exact permitted model, and CHANGE_THIS_ACCESS_CODE with a private password. Open http://localhost:3000. The server stores the gateway key in its environment and proxies chat requests; CODE is the instance’s access password, not the API key. See the official deployment instructions for other hosting options.
Configure the connection
BASE_URL must be https://routerra.ai without /v1: NextChat’s OpenAI proxy appends API paths itself. CUSTOM_MODELS=-all,+YOUR_MODEL_ID hides built-in names and adds the permitted ID; DEFAULT_MODEL sets the initial selection. Keep the OpenAI provider for this compatible route. Enter your CODE through Settings → Access Code when prompted; leave personal custom API overrides disabled when using the server configuration. If deploying on Vercel, set the same variables in project settings and redeploy after edits.
docker run -d --name nextchat -p 3000:3000 \
-e OPENAI_API_KEY=YOUR_API_KEY \
-e BASE_URL=https://routerra.ai \
-e CODE=CHANGE_THIS_ACCESS_CODE \
-e CUSTOM_MODELS=-all,+YOUR_MODEL_ID \
-e DEFAULT_MODEL=YOUR_MODEL_ID \
yidadaa/chatgpt-next-web
Select a model and resolve errors
Start a new chat, confirm YOUR_MODEL_ID in the model selector and send a short message. For 404 errors, remove /v1 from BASE_URL. If the old list remains, recreate the container or redeploy, then refresh the client; also inspect personal custom models. For access-denied errors check CODE first, then gateway key permissions if the request reaches the upstream. docker logs nextchat helps separate server routing failures from model errors.