Saved admin settings can outlive the container that created them. In Open WebUI, an ignored environment variable can reflect database precedence even when the running container contains the intended value.
Settings marked ConfigVar in the environment reference retain their saved values across container recreations. A one-time configuration reset reloads them from the environment, but also discards every other saved admin setting. It suits an environment-managed deployment whose env file already contains all required settings; a single unwanted UI value is usually safer to change in the admin settings.
An existing Docker Compose deployment with local SQLite storage can retain its data volume and original secret configuration during recovery. Message rating provides a harmless test case without changing account access. After the reset flag is removed, the repaired value must survive another recreation; normal database persistence then resumes, so future environment changes can encounter the same precedence rule.
Steps to troubleshoot ignored Open WebUI environment variables:
The commands run in the existing Compose project directory using Bash, curl 7.55 or newer, jq, and Python 3. The service is named open-webui and loads open-webui.env through env_file. An existing API key or session bearer token must belong to an account allowed to request /api/config. API-key creation is covered in How to enable API keys in Open WebUI. The observed responses below are from Open WebUI 0.12.4.
- Confirm the message-rating environment value in the running service.
$ docker compose exec -T open-webui printenv ENABLE_MESSAGE_RATING false
The intended value is false. A missing or different value points to deployment configuration before database precedence. A changed env file reaches Docker only after container recreation; a plain restart retains the old container environment.
- Store the existing bearer token in a private HTTP header file.
$ python3 - <<'PY' import getpass import os fd = os.open("open-webui-auth.headers", os.O_WRONLY | os.O_CREAT | os.O_EXCL, 0o600) with os.fdopen(fd, "w") as header: header.write("Authorization: Bearer " + getpass.getpass("Open WebUI token: ") + "\n") PYThe token grants access as its owner. The prompt hides its value, and the file keeps it out of curl's process arguments. An existing file causes an error rather than being overwritten. The project directory must be private and excluded from version control.
- Read the effective message-rating setting from the application.
$ curl -q --fail --silent --show-error --header @open-webui-auth.headers \ https://openwebui.example.com/api/config | jq '.features.enable_message_rating' true
An authenticated response of true despite the container's false reproduces the mismatch. null does not establish a mismatch; it can mean an unauthenticated response or a different API schema.
- Check the variable's persistence classification in the upstream environment reference.
https://docs.openwebui.com/reference/env-configuration/#enable_message_rating
ENABLE_MESSAGE_RATING is database-backed. An ordinary environment-only variable needs a deployment correction instead of a saved-config reset.
- Verify a recoverable offline backup using How to back up and restore Open WebUI data.
The reset discards saved connections, model defaults, feature switches, and other admin configuration. The backup must include the stopped instance's full data volume and its original secret configuration, with a successful restore rehearsal. A failed repair can be recovered from the archive with the original image and WEBUI_SECRET_KEY.
- Reconcile the protected env file with every setting required after the reset.
ENABLE_MESSAGE_RATING=false ENABLE_SIGNUP=false
These lines are an excerpt, not a replacement env file. Existing connection settings, authentication policy, and the original WEBUI_SECRET_KEY must remain in place. Missing values fall back to defaults, which can reopen signup or disconnect providers. An environment that cannot reproduce the required saved settings is not ready for this reset.
- Add the one-time reset flag to the same env file.
RESET_CONFIG_ON_START=true
ENABLE_PERSISTENT_CONFIG remains unset or true. Combining the reset with a persistence bypass would change the ownership model and obscure the repair.
- Recreate the service from its existing Compose definition.
$ docker compose up -d --force-recreate open-webui
The service is unavailable during recreation. Compose retains the existing named volume, env file, mounts, and deployment options; removing volumes is unnecessary.
- Check application readiness after the reset.
$ curl --fail --silent --show-error https://openwebui.example.com/health {"status":true}
Startup can take several minutes. An unsuccessful request means the service is not ready for the configuration check.
- Confirm that the application now serves the intended value.
$ curl -q --fail --silent --show-error --header @open-webui-auth.headers \ https://openwebui.example.com/api/config | jq -e '.features.enable_message_rating == false' true
The expression returns true with exit status zero only when message rating is disabled; a missing field also fails.
- Remove RESET_CONFIG_ON_START from open-webui.env.
A reset flag left enabled can discard later admin changes at every startup. The intended setting and the original secret configuration remain in the file.
- Recreate the service without the reset flag.
$ docker compose up -d --force-recreate open-webui
- Check readiness after the normal recreation.
$ curl --fail --silent --show-error https://openwebui.example.com/health {"status":true}
- Confirm that the running service has no enabled reset flag.
$ docker compose exec -T open-webui sh -c 'printf "%s\n" "${RESET_CONFIG_ON_START:-false}"' false
- Retest the message-rating setting after the normal recreation.
$ curl -q --fail --silent --show-error --header @open-webui-auth.headers \ https://openwebui.example.com/api/config | jq -e '.features.enable_message_rating == false' true
A successful result shows that the repaired setting survived with database persistence enabled. The application is using the intended value after the one-time reset has been removed.
- Delete the temporary bearer-token header file.
$ rm open-webui-auth.headers
The repaired service, original data volume, and protected backup remain available.