LobeChat and NextChat Integration Guide

Applicable roles: Developer, Deployment Administrator Last updated: 2026-08-06

Both applications can connect to an OpenAI Compatible service through environment variables, but the variable names and Base URL concatenation methods differ. Before deploying, refer to the official environment variable documentation for your version.

LobeChat

Older versions of LobeChat Docker deployments support the following variables:

docker run -d \
  -p 3210:3210 \
  -e OPENAI_API_KEY=YOUR_API_KEY \
  -e OPENAI_PROXY_URL=https://<your-api-endpoint> \
  -e OPENAI_MODEL_LIST='+deepseek-v4-flash' \
  lobehub/lobe-chat

OPENAI_MODEL_LIST uses the +modelname syntax to add custom models. Separate multiple values with commas. The deployment architecture of newer LobeChat versions may have changed. If the official documentation no longer uses the image or variables above, follow the current deployment documentation to create an instance, then enter the platform address in the OpenAI Compatible Provider settings.

Use the endpoint address shown on the "API Key" page in the console.

NextChat

The official NextChat Docker image is yidadaa/chatgpt-next-web:

docker run -d \
  -p 3000:3000 \
  -e OPENAI_API_KEY=YOUR_API_KEY \
  -e BASE_URL=https://<your-api-endpoint> \
  -e CUSTOM_MODELS='+deepseek-v4-flash' \
  yidadaa/chatgpt-next-web

For NextChat, BASE_URL should be set to the root domain address. The application appends the API path automatically.

Post-Deployment Verification

First check the container logs to confirm the environment variables have been loaded, then open the model selector and test. If you encounter a 404 error, check the final request path. If no models appear on the page, check the + prefix and separator in the custom models variable.

In production deployments, do not write Keys into public Compose files or deployment logs. Use your deployment platform's secret management feature to inject them instead.