From eb4cef348275d268754c61c3ecca995e7ab11141 Mon Sep 17 00:00:00 2001 From: DrMelone <27028174+Classic298@users.noreply.github.com> Date: Sat, 20 Dec 2025 22:00:15 +0100 Subject: [PATCH] docker info --- docs/faq.mdx | 38 ++++++++++++++----- .../quick-start/tab-python/Conda.md | 7 ++++ .../quick-start/tab-python/Uv.md | 4 ++ .../quick-start/tab-python/Venv.md | 7 ++++ 4 files changed, 47 insertions(+), 9 deletions(-) diff --git a/docs/faq.mdx b/docs/faq.mdx index bc4b0bca..dbc64a8d 100644 --- a/docs/faq.mdx +++ b/docs/faq.mdx @@ -39,22 +39,42 @@ The same principles apply in harsh terrestrial settings, including submarines, p ### Q: Why isn't my Open WebUI updating? I've re-pulled/restarted the container, and nothing changed. -**A:** Updating Open WebUI requires more than just pulling the new Docker image. Here’s why your updates might not be showing and how to ensure they do: +**A:** To update Open WebUI, you must first pull the latest image, then stop and remove the existing container, and finally start a new one. Simply pulling the image isn't enough because the running container is still based on the old version. -1. **Updating the Docker Image**: The command `docker pull ghcr.io/open-webui/open-webui:main` updates the Docker image but not the running container or its data. -2. **Persistent Data in Docker Volumes**: Docker volumes store data independently of container lifecycles, preserving your data (like chat histories) through updates. -3. **Applying the Update**: Ensure your update takes effect by removing the existing container (which doesn't delete the volume) and creating a new one with the updated image and existing volume attached. +**Follow these exact steps:** -This process updates the app while keeping your data safe. +1. **Pull the latest image:** + ```bash + docker pull ghcr.io/open-webui/open-webui:main + ``` +2. **Stop and Remove the current container:** + ```bash + docker stop open-webui + docker rm open-webui + ``` +3. **Start the new container with your data attached:** + ```bash + docker run -d -p 3000:8080 -v open-webui:/app/backend/data --name open-webui --restart always ghcr.io/open-webui/open-webui:main + ``` + +*(Note: If your container or volume has a different name, adjust the commands accordingly.)* + +For a deeper dive into update methods (including automated updates like Watchtower), check our full **[Updating Guide](/getting-started/updating)**. ### Q: Wait, why would I delete my container? Won't I lose my data? -**A:** It's a common concern, but deleting a container doesn't mean you'll lose your data, provided you're using Docker volumes correctly. Here’s why: +**A:** In Docker, containers are meant to be "disposable." Your data is safe **only if you have a Volume configured**. -- **Volumes Preserve Data**: Docker volumes are designed to persist data outside of container lifecycles. As long as your data is stored in a volume, it remains intact, regardless of what happens to the container. -- **Safe Update Process**: When updating Open WebUI, removing the old container and creating a new one with the updated image does not affect the data stored in volumes. The key is not to explicitly delete the volume with commands like `docker volume rm`. +:::danger Important: Data Persistence +If you ran your container *without* the `-v open-webui:/app/backend/data` flag (or a similar volume mount in Docker Compose), your data is stored **inside** the container. In that specific case, deleting the container **will result in permanent data loss**. -By following the correct update steps—pulling the new image, removing the old container without deleting the volume, and creating a new container with the updated image and the existing volume—your application code is updated while your data remains unchanged and safe. +Always ensure you follow our **[Quick Start Guide](/getting-started/quick-start)** correctly to set up persistent volumes from the beginning. +::: + +When you use a Volume (typically named `open-webui` in our examples), your data stays safe even when the container is deleted. When you start a new container and mount that same volume, the new version of the app attaches to your old data automatically. + +**Default Data Path:** +On most Linux systems, your volume data is physically stored at: `/var/lib/docker/volumes/open-webui/_data`. ### Q: Should I use the distro-packaged Docker or the official Docker package? diff --git a/docs/getting-started/quick-start/tab-python/Conda.md b/docs/getting-started/quick-start/tab-python/Conda.md index 15b106bf..a423a143 100644 --- a/docs/getting-started/quick-start/tab-python/Conda.md +++ b/docs/getting-started/quick-start/tab-python/Conda.md @@ -24,3 +24,10 @@ ```bash open-webui serve ``` + +:::tip 'open-webui: command not found'? +If your terminal says the command doesn't exist: +1. Ensure your conda environment is **activated** (`conda activate open-webui`). +2. If you still get an error, try running it via Python directly: `python -m open_webui serve` +3. If you want to store your data in a specific place, use (Linux/Mac): `DATA_DIR=./data open-webui serve` or (Windows): `$env:DATA_DIR=".\data"; open-webui serve` +::: diff --git a/docs/getting-started/quick-start/tab-python/Uv.md b/docs/getting-started/quick-start/tab-python/Uv.md index 22e1c96c..24ca3942 100644 --- a/docs/getting-started/quick-start/tab-python/Uv.md +++ b/docs/getting-started/quick-start/tab-python/Uv.md @@ -33,3 +33,7 @@ Once `uv` is installed, running Open WebUI is a breeze. Use the command below, e ```powershell $env:DATA_DIR="C:\open-webui\data"; uvx --python 3.11 open-webui@latest serve ``` + +:::tip Why set DATA_DIR? +Setting `DATA_DIR` ensures your chats and settings are saved in a predictable location. If you don't set it, `uvx` might store it in a temporary folder that gets deleted when the process ends. +::: diff --git a/docs/getting-started/quick-start/tab-python/Venv.md b/docs/getting-started/quick-start/tab-python/Venv.md index 8d92f5f0..130727be 100644 --- a/docs/getting-started/quick-start/tab-python/Venv.md +++ b/docs/getting-started/quick-start/tab-python/Venv.md @@ -36,3 +36,10 @@ Create isolated Python environments using `venv`. ```bash open-webui serve ``` + +:::tip 'open-webui: command not found'? +If your terminal says the command doesn't exist: +1. Ensure your virtual environment is **activated** (Step 2). +2. If you still get an error, try running it via Python directly: `python -m open_webui serve` +3. If you want to store your data in a specific place, use: `DATA_DIR=./data open-webui serve` +:::