- Implementing persistent volumes in Docker to prevent data loss when updating the container.
- Comprehensive backup of the webui.db file and the vector_db folder to preserve chats and knowledge bases.
- Safe update procedure by downloading recent images and restarting services.

¿How do I back up and restore Open WebUI? If you've embarked on the adventure of building your own AI at home, you probably already know that Open WebUI and Ollama They form an unbeatable team. While the first provides that polished and familiar ChatGPT-style interface, the second is the engine that makes everything work. Connecting Open WebUI with Ollama moving the models to your own hardware. It's wonderful to be able to chat without your data leaving your machine, but of course, there comes a point when the fear of losing your chat history or settings makes us think about how to protect that information.
For beginners, especially in environments like macOS Sequoia, Docker containers can be a bit confusing. Sometimes we see an update available and panic: if I update the container, will my chats be deleted? The short answer is no, as long as we have the Docker container properly configured. data persistenceIn this regard, we will break down step by step how to ensure your configuration is fail-safe and how to manage backups for peace of mind.
The foundation of it all: Ensuring that the data doesn't evaporate
Before discussing backups, it's important to understand that Docker containers are inherently ephemeral. If you store data within the container, deleting it to update the version will erase everything. That's why it's vital to use backups. persistent volumesIf you used the official Docker Compose from the GitHub repository, this is already sorted, but if you created your own mix, make sure the volume open-webui is correctly mapped to a path in your host file system.
To find out exactly where your data is landing on the hard drive, you can run the command docker volume inspect open-webuiThis will give you the actual path on your Mac or server. If you prefer to use bind mounts direct (fixed routes that you choose), it is essential that you write down these routes, as they will be the main target of any backup script you decide to implement.

What exactly should we support?
If we take a look at the persistent data folder, we'll see several items. The most critical is the file webui.db, which is an SQLite database where it is stored the entire chat history, the users and the settings. However, that's not the only important thing. We also have the folder uploads/ with the files we have uploaded and vector_db/, which contains the ChromaDB database necessary for RAG (recovery augmented generation) to function correctly.
In addition, we found the audit.log for audit events and the folder of cache/For a thorough backup, it's ideal to copy the entire data directoryIf you want to be more selective, you could prioritize the database and uploaded documents, but making a full clone of the persistence folder is the easiest way to avoid unpleasant surprises, especially if you need migrate your chats from ChatGPT to Open WebUI.
Strategies for performing effective backups
One of the most classic and efficient ways to do this is by rsyncwhich allows for very fast incremental backups. You can schedule a job to move the data to a local NAS or to the cloud (such as S3 or Backblaze B2). To ensure data consistency, it is best to perform the backup on a cold file systemThat is, by briefly stopping the container before copying and then lifting it immediately afterwards.
For more advanced users, there are options such as using the command .backup SQLite native tools can be used to obtain a consistent copy of the database without stopping the service. Tools such as [other tools] can also be used. borgbackup or resticwhich offer deduplication and encryption, adding an extra layer of security to your private information.
How to update Open WebUI without losing a single chat
When the system notifies you that a new version is available, don't panic. The process is quite straightforward. First, you need to download the latest image by running docker pull ghcr.io/open-webui/open-webui:mainThen, you stop and delete the current container with docker stop open-webui y docker rm open-webuiFinally, you run the command again. docker run original that you used to install it.
Thanks to the fact that data lives in the volume named And not within the software image; the new container will immediately recognize your old database. If you use Docker Compose, the process is even simpler: just do a docker compose pull followed by a docker compose up -d so that everything is updated automatically and cleanly.
Optimization and extras: RAG, Audio and MCP
To get the most out of your instance, remember that you can enhance your RAG by uploading your own PDFs in the Knowledge section. To make things even faster, downloading the template is essential. nomic-embed-text using Llama. If you notice the model is getting confused, try lowering the chunk size to around 800 tokens, especially if you're using small models like Llama 3.2.
Regarding voice, Open WebUI allows the integration of Whisper for speech recognition and OpenAI TTS or Coqui-TTS for speech synthesis. Finally, the arrival of Model Context Protocol (MCP) It's a total game-changer, allowing your local AI to interact with external tools like GitHub or Slack, turning a simple chat into a real productive assistant.
Maintaining full control of our local artificial intelligence involves good management of Docker volumes, performing regular backups of the SQLite database and vector folder, and following the correct image update flow to avoid compromising the integrity of our conversations and custom configurations.
Passionate about technology since he was little. I love being up to date in the sector and, above all, communicating it. That is why I have been dedicated to communication on technology and video game websites for many years. You can find me writing about Android, Windows, MacOS, iOS, Nintendo or any other related topic that comes to mind.
