-
Notifications
You must be signed in to change notification settings - Fork 480
Updated DockerUpdating.md page #337
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
94 changes: 80 additions & 14 deletions
94
docs/getting-started/quick-start/tab-docker/DockerUpdating.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Original file line | Diff line number | Diff line change |
|---|---|---|---|
| @@ -1,35 +1,101 @@ | |||
| ## Updating | ## Why isn't my Open WebUI updating? | ||
|
|
|
||
| To update your local Docker installation to the latest version, you can either use **Watchtower** or manually update the container. | To update your local Docker installation of Open WebUI to the latest version available, you can either use **Watchtower** or manually update the container. Follow either of the steps provided below to be guided through updating your existing Open WebUI image. | ||
|
|
|
||
| ### Option 1: Using Watchtower | ### Manual Update | ||
|
|
|
||
| With [Watchtower](https://containrrr.dev/watchtower/), you can automate the update process: | 1. **Stop and remove the current container**: | ||
|
|
|||
| This will stop the running container and remove it, but it won't delete the data stored in the Docker volume. (Replace `open-webui` with your container's name throughout the updating process if it's different for you.) | |||
|
|
|
||
| ```bash | ```bash | ||
| docker run --rm --volume /var/run/docker.sock:/var/run/docker.sock containrrr/watchtower --run-once open-webui | docker rm -f open-webui | ||
| ``` | ``` | ||
|
|
|
||
| _(Replace `open-webui` with your container's name if it's different.)_ | 2. **Pull the latest Docker image**: | ||
|
|
|
||
| ### Option 2: Manual Update | This will update the Docker image, but it won't update the running container or its data. | ||
|
|
|||
| 1. Stop and remove the current container: | |||
|
|
|
||
| ```bash | ```bash | ||
| docker rm -f open-webui | docker pull ghcr.io/open-webui/open-webui:main | ||
| ``` | ``` | ||
|
|
|
||
| 2. Pull the latest version: | 3. **Remove any existing data in the Docker volume (NOT RECOMMENDED UNLESS ABSOLUTELY NECCESSARY!)**. Skip this step entirely if not needed and move on to the last step: | ||
silentoplayz marked this conversation as resolved.
Show resolved
Hide resolved
|
|||
|
|
|||
| If you want to start with a clean slate, you can remove the existing data in the Docker volume. Be careful, as this will delete all your chat histories and other data. | |||
|
|
|||
| The data is stored in a Docker volume named `open-webui`. You can remove it with the following command: | |||
|
|
|
||
| ```bash | ```bash | ||
| docker pull ghcr.io/open-webui/open-webui:main | docker volume rm open-webui | ||
| ``` | ``` | ||
|
|
|
||
| 3. Start the container again: | 4. **Start the container again with the updated image and existing volume attached**: | ||
|
|
|||
| If you didn't remove the existing data, this will start the container with the updated image and the existing data. If you removed the existing data, this will start the container with the updated image and a new, empty volume. **For Nvidia GPU support, add `--gpus all` to the docker run command** | |||
|
|
|
||
| ```bash | ```bash | ||
| docker run -d -p 3000:8080 -v open-webui:/app/backend/data --name open-webui ghcr.io/open-webui/open-webui:main | docker run -d -p 3000:8080 -v open-webui:/app/backend/data --name open-webui ghcr.io/open-webui/open-webui:main | ||
| ``` | ``` | ||
|
|
|
||
| Both methods will get your Docker instance updated and running with the latest build. | ## Automatically Updating Open WebUI with Watchtower | ||
|
|
|||
| You can use [Watchtower](https://containrrr.dev/watchtower/) to automate the update process for Open WebUI. Here are three options: | |||
|
|
|||
| ### Option 1: One-time Update | |||
|
|
|||
| You can run Watchtower as a one-time update to stop the current container, pull the latest image, and start a new container with the updated image and existing volume attached (**For Nvidia GPU support, add `--gpus all` to the docker run command**): | |||
|
|
|||
| ```bash | |||
| docker run --rm --volume /var/run/docker.sock:/var/run/docker.sock containrrr/watchtower --run-once open-webui | |||
| ``` | |||
|
|
|||
| ### Option 2: Running Watchtower as a Separate Container | |||
|
|
|||
| You can run Watchtower as a separate container that watches and updates your Open WebUI container: | |||
|
|
|||
| ```bash | |||
| docker run -d --name watchtower \ | |||
| --volume /var/run/docker.sock:/var/run/docker.sock \ | |||
| containrrr/watchtower -i 300 open-webui | |||
| ``` | |||
|
|
|||
| This will start Watchtower in detached mode, watching your Open WebUI container for updates every 5 minutes. | |||
|
|
|||
| ### Option 3: Integrating Watchtower with a `docker-compose.yml` File | |||
|
|
|||
| You can also integrate Watchtower with your `docker-compose.yml` file to automate updates for Open WebUI (**For Nvidia GPU support, add `--gpus all` to the docker run command**): | |||
|
|
|||
| ```yml | |||
| version: '3' | |||
| services: | |||
| open-webui: | |||
| image: ghcr.io/open-webui/open-webui:main | |||
| ports: | |||
| - "3000:8080" | |||
| volumes: | |||
| - open-webui:/app/backend/data | |||
|
|
|||
| watchtower: | |||
| image: containrrr/watchtower | |||
| volumes: | |||
| - /var/run/docker.sock:/var/run/docker.sock | |||
| command: --interval 300 open-webui | |||
| depends_on: | |||
| - open-webui | |||
|
|
|||
| volumes: | |||
| open-webui: | |||
| ``` | |||
|
|
|||
| In this example, Watchtower is integrated with the `docker-compose.yml` file and watches the Open WebUI container for updates every 5 minutes. | |||
|
|
|||
| ## Persistent Data in Docker Volumes | |||
|
|
|||
| The data is stored in a Docker volume named `open-webui`. The path to the volume is not directly accessible, but you can inspect the volume with the following command: | |||
|
|
|||
| ```bash | |||
| docker volume inspect open-webui | |||
| ``` | |||
|
|
|||
| This will show you the details of the volume, including the mountpoint, which is usually located in `/var/lib/docker/volumes/open-webui/_data`. | |||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.