From 70ed3d891d60c147ea240aafaa9901f2569fea83 Mon Sep 17 00:00:00 2001 From: Valentino Stillhardt <4715129+Fusseldieb@users.noreply.github.com> Date: Wed, 12 Jun 2024 10:03:12 -0300 Subject: [PATCH 1/3] Tips coming from Git --- docs/migration.mdx | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/docs/migration.mdx b/docs/migration.mdx index 691c826..2e298ec 100644 --- a/docs/migration.mdx +++ b/docs/migration.mdx @@ -69,6 +69,8 @@ docker volume rm ollama-webui For example, for local installation it would be `docker run -d -p 3000:8080 --add-host=host.docker.internal:host-gateway -v open-webui:/app/backend/data --name open-webui --restart always ghcr.io/open-webui/open-webui:main`. For other installation commands, check the relevant parts of this README document. +## Updating to Open WebUI while keeping your data + If you want to update to the new image migrating all your previous settings like conversations, prompts, documents, etc. you can perform the following steps: ```bash @@ -85,3 +87,22 @@ Once you verify that all the data has been migrated you can erase the old volume ```bash docker volume rm ollama-webui ``` + +### Coming from a local Git repository + +If you came from a git installation where you used `docker compose up` in the project directory, your volumes will be prefixed with the folder name. +Therefore, if your OpenWebUI path was: `/home/myserver/ollama-webui/`, the volumes would be named "ollama-webui_open-webui" and "ollama-webui_ollama". + +To copy the contents over to a conventional docker installation, you may run the same migration commands, but replacing them with the prefixed volume names and creating an additional volume for ollama. In our particular case, the commands would be: +```bash +docker rm -f ollama-webui +docker pull ghcr.io/open-webui/open-webui:main +docker pull ghcr.io/open-webui/open-webui:ollama +docker volume create --name open-webui +docker volume create --name ollama +docker run --rm -v ollama-webui_open-webui:/from -v open-webui:/to alpine ash -c "cd /from ; cp -av . /to" +docker run --rm -v ollama-webui_ollama:/from -v ollama:/to alpine ash -c "cd /from ; cp -av . /to" +``` +Then, start both containers as usual, as described in the Getting started guide. + +Once you verify that all the data has been migrated you can erase the old volume using the command `docker volume rm` mentioned above. From fcb7611448ebee85db9d352c23c42b1e29951033 Mon Sep 17 00:00:00 2001 From: Valentino Stillhardt <4715129+Fusseldieb@users.noreply.github.com> Date: Wed, 12 Jun 2024 10:10:27 -0300 Subject: [PATCH 2/3] Tips coming from Git --- docs/migration.mdx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/migration.mdx b/docs/migration.mdx index 2e298ec..13b9a26 100644 --- a/docs/migration.mdx +++ b/docs/migration.mdx @@ -93,9 +93,10 @@ docker volume rm ollama-webui If you came from a git installation where you used `docker compose up` in the project directory, your volumes will be prefixed with the folder name. Therefore, if your OpenWebUI path was: `/home/myserver/ollama-webui/`, the volumes would be named "ollama-webui_open-webui" and "ollama-webui_ollama". -To copy the contents over to a conventional docker installation, you may run the same migration commands, but replacing them with the prefixed volume names and creating an additional volume for ollama. In our particular case, the commands would be: +To copy the contents over to a conventional docker installation, you may run similar migration commands. In our particular case, the commands would be: ```bash -docker rm -f ollama-webui +docker rm -f open-webui +docker rm -f ollama docker pull ghcr.io/open-webui/open-webui:main docker pull ghcr.io/open-webui/open-webui:ollama docker volume create --name open-webui From b287bbd8214fb27425f62812319e473d943b4dca Mon Sep 17 00:00:00 2001 From: Valentino Stillhardt <4715129+Fusseldieb@users.noreply.github.com> Date: Wed, 12 Jun 2024 10:15:14 -0300 Subject: [PATCH 3/3] Tips coming from Git --- docs/migration.mdx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/migration.mdx b/docs/migration.mdx index 13b9a26..58c8e19 100644 --- a/docs/migration.mdx +++ b/docs/migration.mdx @@ -104,6 +104,9 @@ docker volume create --name ollama docker run --rm -v ollama-webui_open-webui:/from -v open-webui:/to alpine ash -c "cd /from ; cp -av . /to" docker run --rm -v ollama-webui_ollama:/from -v ollama:/to alpine ash -c "cd /from ; cp -av . /to" ``` + +Depending on whether you had ollama installed, or already had the same volume names in place, some of the commands **might throw errors**, but they can usually be safely ignored since we're overwriting. + Then, start both containers as usual, as described in the Getting started guide. Once you verify that all the data has been migrated you can erase the old volume using the command `docker volume rm` mentioned above.