Step 1: π οΈ Pull the Latest Docker Image
The first step is to pull the latest version of Open WebUI from the GitHub container registry.
docker pull ghcr.io/open-webui/open-webui:main
This will ensure that you have the most recent updates, including bug fixes and new features. π
Step 2: π Stop the Existing Container
Stop the current open-webui container to prepare for the update.
docker stop open-webui
Stopping the container ensures no conflicts during the update. β οΈ
Step 3: πΎ Create a Backup of Data (Optional but Recommended)
Itβs always a good idea to create a backup before making significant changes. This helps safeguard all your chat history and configurations.
docker run --rm -v open-webui:/volume -v C:\temp\backup:/backup ubuntu tar cvf /backup/open-webui-backup.tar /volume
This command saves a backup in C:\temp\backup
. ποΈ If anything goes wrong, you’ll have peace of mind knowing your data is secure! π
Step 4: ποΈ Remove the Old Container
Remove the old container to make room for the new version:
docker rm open-webui
Removing the existing container allows you to start fresh with the latest image. β¨
Step 5: π Run the Updated Container
Now, itβs time to run the updated container while retaining all your existing data and settings:
docker run -d `
-p 3000:8080 `
--add-host=host.docker.internal:host-gateway `
--env-file .env `
-v open-webui:/app/backend/data `
--name open-webui `
--restart always `
ghcr.io/open-webui/open-webui:main
π Command Breakdown:
-d
: Runs the container in the background.-p 3000:8080
: Maps port8080
in the container to port3000
on your machine.--env-file .env
: Loads your configuration settings.-v open-webui:/app/backend/data
: Uses an existing volume to preserve chat history and settings.--restart always
: Ensures the container restarts automatically if stopped.
Step 6: π Verify the Update
After the update, itβs crucial to verify that everything is working correctly.
𧩠Check the Logs:
docker logs open-webui
This command helps you identify any issues that might have occurred during the startup. π οΈ
π Access the WebUI:
Go to http://localhost:3000
in your browser to see if everything is up and running smoothly. You should see the latest version and all your chat history intact. π