Skip to main content
This page covers the work after the first chat: rotating the token, revoking access, upgrading Open WebUI without losing data, and removing the install. The troubleshooting table at the end lists the errors that the gateway and Open WebUI return most often.

Rotate the token

Regenerate the token when it may have leaked, or on a schedule. Regenerating creates a new token and keeps the old one for a short grace period. The old token is shown with EXPIRING SOON and expires on its own.
1

Regenerate the token

In Access Management → Virtual Accounts, open the account’s token list, then click Regenerate token.
2

Copy the new token

On the row marked ACTIVE, click Get token, then copy the value. Do not copy from the EXPIRING SOON row.
3

Replace the token in the env file

Rewrite openwebui.env with the new value, using the same read -rs method as Write the env file.
4

Recreate the container

The container reads its environment at start-up, so recreate it. The volume keeps your data.
5

Check the gateway

Run the four checks in Check the gateway path. The models list and the granted call return 200. The ungranted call returns 403.
The old token works until its grace period ends. Copy the new token into the env file and restart the container before that time, or chats stop with 401.

Revoke access

To cut off Open WebUI at once, delete the token or the whole account. Both stop calls at the gateway, with no change in Open WebUI, which then shows errors on the next chat.
  • One grant. In Manage Permissions, delete the row with the trash icon. Calls for that model return 403 at once. Other grants keep working.
  • One token. In the token list, delete the token with the trash icon. Calls made with it stop working.
  • The account. Delete the virtual account from its row menu (More actions). Every token stops working.

Back up and upgrade

The data volume holds the accounts, chats and settings. Back it up before every upgrade. Back up the volume into a tar file in the current folder:
Expected output: no output, and a file named open-webui-data-<date>.tgz in the current folder. Pull the new tag, then recreate the container from it. Change v0.13.4 to the tag you want:
Check the health endpoint and sign in. Your accounts and chats should be unchanged. Then run the four checks in Check the gateway path.
Open WebUI migrates its database on start-up. Read the release notes for the new tag before you upgrade, and keep the backup until you have checked a chat on the new version.

Remove the install

Remove the container, the data volume and the env file. Removing the volume deletes every account and chat. Take a backup first if you need them.
Expected output:
Then delete the virtual account if you no longer need it, from Access Management → Virtual Accounts.

Troubleshoot

Checklist

  • The virtual account has one granted model, and the grant uses the provider-qualified ID.
  • The token was copied from the ACTIVE row, and openwebui.env is readable only by you.
  • The container runs the pinned tag, and /health returns 200.
  • The models list returns 200, the granted call returns 200, and the ungranted call returns 403.
  • Public sign-up is off after the first admin is created.
  • A backup exists before every upgrade.