Open WebUI backup and restore

A practical guide to backing up Open WebUI so that chats, accounts, uploads, knowledge bases and the secret key can be restored and verified. It covers what to protect in SQLite or PostgreSQL deployments, scheduled jobs and restore testing.

On this page

Open WebUI backup and restore: what a recoverable deployment needs

A backup of Open WebUI is only useful if the database, uploaded files, vector store and secret key are captured together and can be restored into a working system. If a team relies on a self-hosted Open WebUI for daily work, the recoverable unit is the whole set: database, uploads, vector store and the secret key, backed up from one point in time and restore-tested. Losing any one of them can leave users with accounts that sign in to nothing, chats without the files they referenced, or knowledge bases that no longer answer.

Backup here means a set of consistent copies taken at roughly the same moment, not four independent file copies made on different schedules. Where the parts live depends on the install. A single-container deployment may keep the SQLite database, uploads and default vector store inside one data directory, while a multi-replica deployment usually moves accounts and chats into PostgreSQL, puts uploads on shared file storage and uses an external vector database. The secret key is typically supplied as configuration outside the data directory, so it is easy to forget and impossible to recover from the data alone. Confirm in your own environment exactly which paths, databases and buckets hold each part before you write any backup job.

This need is greatest for production use, for any deployment with more than one replica, and for any deployment where teams have built knowledge bases, since rebuilding embeddings for a large corpus can take far longer than restoring a copy. This page does not set backup intervals or retention periods. Ask the vendor documentation and your own recovery objectives for those, and treat a restore test in a separate environment as the proof that the set works.

Which data stores to back up and when each applies

This table compares the data stores an Open WebUI installation may hold, what each one contains, the backup method family that fits it and the deployment shape where it applies. Read each row against your topology: single replica with SQLite, or multi-instance with PostgreSQL, an external vector database and shared file storage. The main takeaway is that the database, vector store and uploads must be backed up together so they stay consistent with each other.

Data storeWhat it holdsBackup method and when it fits
SQLite in the data directoryUsers, chats, settings and application state in one database file under the data directoryFile copy or consistent snapshot while the service is stopped or quiesced. Fits single-replica deployments only, with the file on locally attached SSD or NVMe storage, not network storage
PostgreSQL as the main databaseUsers, chats, settings and application state held in a server databaseLogical dump or physical backup with point-in-time recovery, taken by the database team. Required by the scaling guide for multi-instance deployments
External vector database (PGVector, Qdrant or Milvus)Embeddings and retrieval indexes for knowledge bases and documentsNative snapshot or dump from the vector store, or rebuild from source files. Fits when retrieval data cannot be regenerated cheaply; confirm rebuild time with your team
Default ChromaDB in the data directoryLocal vector index files for retrievalFile copy with the service stopped. Not suitable for multi-process or multi-replica setups, where the scaling guide warns it will crash
Uploads and file storageUploaded files and knowledge source documentsFile copy or object storage snapshot. Multiple replicas need shared file storage so every instance can reach the same files
Redis (shared state)Sessions, websocket connections and application state for replicasGenerally not backed up. Losing it signs users out and resets live connections; confirm this behavior for your version
Secret key kept outside the data directoryKey used to protect stored data and sessionsBack up separately in your secrets store, not with data directory files. A restore without the matching key can leave encrypted data unreadable

How to set up a backup job that can be restored

This sequence builds a backup job for Open WebUI that captures the database, vector store, uploads and secret key as one consistent set. Each step ends with a check so you can prove the copy is usable before you rely on it.

  1. Inventory every store and its location

    Before writing any script, list each place Open WebUI keeps state: the data directory or the PostgreSQL database, the vector store if it is not the default, the uploads and knowledge files, and the secret key that signs sessions and encrypts stored values. For each item, record the host, path or connection string, owner and the container or volume it lives in. Confirm exact paths against your version in the release notes on the Open WebUI GitHub releases page, since storage locations can change between releases. The output is a written inventory that the rest of the job follows. Check it by comparing the list against a running container's mounts and environment variables, so nothing is missed.

  2. Quiesce writes or take database-native dumps

    Decide how the database is captured before copying anything. For PostgreSQL, use the database's native dump tool so the snapshot is internally consistent while users are still signed in. For SQLite in a single-replica setup, stop the Open WebUI process or use SQLite's own backup method so the file is not copied mid-write. Whichever method you choose, record it in the job definition. The output is a dump file or a stopped-writer window. Check it by confirming the dump command exits with status zero and the file size is non-zero and plausible for your user base.

  3. Copy the database, vector store and uploads together

    Capture the database, the vector store and the uploads within the same time window, so that a file record in the database has its matching upload and embeddings. If you run an external vector database, use its native snapshot or backup feature in the same window. Write all three to a staging directory with a timestamp in the name. The output is one staging set per run. Check it by comparing file counts between the uploads directory on the host and in the staging copy, and by confirming the total size matches within expected churn during the run.

  4. Store the secret key outside the data directory

    Copy the secret key into a separate, access-controlled secret store or a dedicated file with restricted permissions, not into the same directory as the data backup. Without the same key, restored encrypted values and sessions may not work, so this copy is part of the restore set. Keep it on a separate schedule and change history from the database backup. The output is a versioned copy of the key held by your secrets owner. Check it by confirming the key from the store matches the key the running instance reads, using a test restore in a later step rather than a comparison of raw values in logs.

  5. Encrypt the set and move copies off the host

    Compress and encrypt the staging set with a key held separately from the backup storage, then transfer it to storage outside the Open WebUI host, such as an object store or a backup server in another failure domain. Confirm the encryption tool and key management meet your organization's policy. The output is an encrypted archive plus a manifest listing each file and its checksum. Check it by generating checksums on the host before transfer and verifying them again on the destination after upload, so a corrupted transfer is caught immediately.

  6. Schedule the job with logging and alerts

    Run the sequence from a scheduler such as cron, a systemd timer or your platform's job runner, under a service account with only the permissions the steps need. Write a log entry for each run with start time, end time, exit status and the manifest location, and send failures to the team that owns on-call alerts. Set retention so old sets are pruned on a documented rule. The output is a recurring job with a visible status. Check it by forcing one failure, such as an unreachable destination, and confirming the alert arrives and the job reports a non-zero status.

  7. Run a restore test on a separate host

    Restore the latest encrypted set into an isolated environment with the same Open WebUI version, then start the application and sign in with a known test account. Confirm that chats, uploads and knowledge items are present and that retrieval returns results from the restored vector store. Record the version, the restore time and any manual steps so the runbook reflects what actually happened. The output is a signed-off restore record. Check it by comparing a sample of file checksums and a sample of database row counts against the manifest, and repeat this test on a schedule your team agrees on.

Why the secret key and data must be backed up together

The secret key and the database must be restored as a matched pair. Open WebUI uses its secret key to protect values it stores, and a database restored without the key that was in use when those values were written may leave them unreadable or unverifiable. Users may then appear to sign in but lose saved settings, provider credentials or other protected data, and nothing in the database itself will say why. Keep the key in a secrets store that is separate from the data directory or database host, and record where it lives in the recovery runbook so that the restore team does not have to search the old container or server for it during an incident.

The second risk is inconsistency across stores. Chat history and user records may live in PostgreSQL or in the data directory, while uploaded files and knowledge base content sit in file storage and vectors sit in a separate vector database. If the database comes from one point in time and the uploads or vector store come from another, references to files and knowledge can point at objects that no longer exist or at records that were never created. Decide on a single recovery point for all components, take the snapshots as close together as your storage allows, and test that a restored knowledge base answers queries against its source files.

Before you write the runbook, confirm with the Open WebUI documentation which stored values are encrypted or signed with the secret key, how the key is set and whether it can be rotated without invalidating existing data or sessions. Ask the same questions of any vector database and file storage backend you use. The answers determine whether a key rotation is a routine change or a migration project, and whether a backup of the key must be kept for as long as the database backups it protects. Open WebUI scaling documentation also describes which shared state a multi-replica deployment depends on, which helps identify every store that needs a matching recovery point.

Security risks in backup copies

A backup of Open WebUI holds the same sensitive material as the live system: chat history, uploaded documents, vector data and the keys that protect stored secrets. The risks below appear when those copies are stored, shared, retained or restored without the same care as production, and each card names the control to apply in your environment.

Chat history and uploads carry personal data

A backup of the Open WebUI database or data directory contains user conversations, uploaded files and knowledge base content, which often include personal data and confidential business information. Treat every backup as production data for classification, access and incident purposes. Check which data categories your users actually upload and map them to your records of processing before you decide how long copies may exist.

Unencrypted copies on shared storage

Backup archives copied to network shares, shared volumes or general-purpose object buckets often inherit broad read access. Encrypt backup files at rest with keys held by your key management system, and restrict the bucket or share to the backup service account. Confirm that replicas sent to other sites or cloud regions meet the same encryption and access requirements.

Secret key stored beside its backup

Open WebUI uses a secret key to protect sensitive values, so a backup that contains the database but not the key can be unreadable, while a backup that contains both in the same bundle hands an attacker everything at once. Store the secret key in a separate secrets manager with its own access policy and versioning. Record which key version matches each backup so a restore can be completed.

Restore access granted too widely

Restoring a backup overwrites live chats, accounts and permissions, so the ability to run a restore is itself a high-impact privilege. Limit restore rights to a small named group, require a change ticket and a second approver, and log every restore job with its source and target. Keep restore credentials separate from the day-to-day administrator accounts that manage Open WebUI settings.

Retention that outlasts deletion

When a user deletes a chat or leaves the company, the live system removes the record, but older backup sets may still hold it for months. Set a retention period for backups that matches your data deletion policy, and document how a deletion request reaches backup copies. Ask your legal or privacy team to confirm whether backup retention needs its own exception process.

Session state restored as durable data

Redis holds sessions, websocket connections and application state for multi-replica deployments. Without Redis, sign-out does not revoke tokens, and tokens remain valid until they expire, by default after 4 weeks. A restored Redis snapshot can therefore bring back sessions that users or administrators had already ended, so exclude Redis from the restore set and let sessions be re-established after recovery.

Scaling docs

How backup differs for Docker, Kubernetes and PostgreSQL installs

Docker and Docker Compose installs usually keep Open WebUI state in a data directory mounted from the host, so the host file system is the primary backup target. In a default single-container setup, the data directory holds the SQLite database, uploaded files and any local vector store data, which means a copy of that directory captures most of the application state while the container is stopped or quiescent. The secret key is not guaranteed to live there, so it must be recorded separately in the Compose file, environment file or secret store and backed up with the same care as the data. Confirm which paths your image and version actually write to by inspecting the mounts, not by assuming the defaults.

  • Data directory: a bind mount on the host typically holds the database file, uploads and local vector data. Back it up with the container stopped or using a consistent snapshot.
  • Snapshot coverage: a volume or file-system snapshot covers everything under the mount, but not the environment variables, reverse proxy configuration or images.
  • Secret key: store it outside the data directory, because restoring the data without the original key can break stored secrets and sessions.
  • Manual additions: the Compose file, .env file, reverse proxy configuration and certificates must be copied separately.
  • Scheduling: cron or a backup tool on the host runs the copy, and its retention and off-host transfer are the team's responsibility.

Before you rely on this setup, check the mounts with docker inspect and confirm the restore path on a second host.

Restore tests that prove recovery

A backup that has never been restored is an assumption, not a recovery plan. The checks below describe one scheduled restore exercise: restore into an isolated environment, start the same release, and confirm that the service and its data work end to end. Your team must set its own recovery targets, because this page does not supply them.

Isolated restore environment

Run every restore test in an environment with no route to production users, production model providers or production identity callbacks. Restore the database dump, the data directory or the object store copy, the vector store and the uploads into that environment, then start Open WebUI against them. Isolation matters because a restored instance that can reach live integrations may send messages, call tools or write to shared systems during the test. Confirm the isolation before the first restore, and record which copy of the secret key the test instance used.

Same release version

Start the restored instance on the same Open WebUI release that produced the backup. Schema migrations run on startup, so a different version can hide a restore problem behind a migration problem or the reverse. Record the release tag used for the backup and the one used for the test in the test log. If you plan to upgrade, run a separate test that restores the backup and then performs the upgrade, so each result has one cause.

Login and session checks

Sign in with a local admin account and with one ordinary user account, using the same authentication method production uses. A restore that loses the secret key or the session data can leave users unable to sign in, or leave old tokens in place. Check that sign-in works, that sign-out behaves as expected, and that the admin panel shows the users and groups you expect. If you run Redis, confirm the session store is also restored or rebuilt as your design requires.

Chat history sample

Open a fixed sample of conversations chosen before the test, including one long chat, one with an attached file and one with a model selection that still exists. Confirm that messages, titles and model names render correctly and that a new message can be sent and answered by a configured model. Keep the sample list in the test record so the next exercise checks the same conversations. A missing chat is a finding, even if the rest of the restore looks complete.

Knowledge base query

Run a known question against a knowledge base whose answer you already know, and confirm that the response cites the expected document. This check exercises the database, the vector store and the uploaded files together, so it catches a restore where the vector index and the file store are out of step. Compare the vector store version and the document count with the values recorded at backup time. Where retrieval depends on an embedding model, confirm the model is present in the test environment.

File downloads and elapsed time

Download a sample of uploaded files and compare each checksum with the value recorded at backup time. Then record the elapsed time from the start of the restore to the first successful sign-in and the total time for all checks. Those figures are the measured recovery time for this exercise, and you compare them with the recovery targets your organization sets. Log each failed check with the step, the error and the owner, and rerun the full exercise after each fix.

How the backup jobs and stores fit together

The scheduler starts a backup job that reads the primary database (a SQLite file or PostgreSQL), the uploads directory and the external vector database, while the application's secret key is fetched from a separate secret store rather than copied with the data. Each store writes into an encrypted backup target on a separate backup network. A restore environment, isolated from production, pulls the same set back so you can confirm that users, chats, files and retrieval indexes all come back together. Check that the key you restore with matches the one the data was written under, and that Redis holds only transient state you do not need to restore.

Backup jobs, the stores they read, and the trust boundaries between environments.

Questions teams ask before backing up Open WebUI

How much effort does a backup design for Open WebUI take?

The effort depends mainly on how many data stores the deployment uses, whether it runs more than one replica, and what retention and evidence rules apply. A single instance with a SQLite file and a local uploads directory is a small job. A deployment with PostgreSQL, an external vector database, shared file storage and Redis has more stores to capture consistently, and each one needs its own backup method and restore check. Ask any partner to list every store in scope, the backup method for each, the schedule, the retention period and who approves changes. Those answers set the size of the work more than the software version does.

Can our own team back up Open WebUI without a partner?

Yes, if the team already runs backups for PostgreSQL, object or file storage and container platforms. The hard parts are less about copying files and more about taking consistent snapshots across stores, keeping the secret key outside the data directory, and proving that a restore works. Teams without those skills often miss the vector store or the uploads, or they back up the database but not the key that decrypts stored values. A partner can review your current setup, write the procedure and run a restore test, and your team can then operate it. Decide which of those steps you need help with.

What do we need to provide before a backup engagement starts?

Expect to provide access to the deployment environment, the Open WebUI release version you run, a list of the data stores in use, and the storage targets where backups will be kept. Confirm who can approve changes to production and which restore window the business accepts. Also confirm where the secret key is stored today, because the backup design depends on keeping it separate from the data directory. For a fixed-scope engagement, these inputs belong in the written scope so that deliverables and timelines are agreed before work begins.

How long does a first restore test take?

The duration of a first restore test depends mainly on the volume of data, the number of stores that must be restored together, and whether the test runs on separate infrastructure. Larger databases, big uploads folders and large vector indexes take longer to copy and rebuild than a small single-node setup. The first test is usually the longest because it also exposes gaps in documentation and permissions. Ask for the restore steps, the environment used for the test, and the measured time for each store in the written report, rather than a single figure.

Which Open WebUI release version affects the backup procedure?

The release version matters because the data layout, database migrations and configuration keys can change between versions. A backup taken on one release should be restored and tested on the same release or on a version the upgrade path supports. Record the exact version in every backup set and in the restore runbook. Before an upgrade, take a fresh backup and confirm that the restore test still passes on the new version. Check the upgrade notes for your release in the project's release notes before you schedule a change.

Does a partner's backup work include the vector store and uploads?

It should, and you should confirm it in the written scope. A complete backup design covers the relational database, the vector store used for retrieval, uploaded files and any shared file storage, together with the secret key kept outside the data directory. Missing one of these produces a restore that starts but loses knowledge bases, attachments or the ability to read encrypted values. Ask the partner to list each store in the deliverables, with the backup method, the schedule, the retention rule, the restore procedure and the evidence from the restore test.

What does a partner deliver for backup and restore?

A typical deliverable set includes a written inventory of data stores, a backup design with schedules and retention, scripts or job definitions for the agreed targets, a restore runbook, and a restore test with recorded results. Ask whether the partner also documents how to rotate backup credentials, how to alert on failed jobs and how to repeat the restore test on a schedule. DeployOpen plans, implements, backs up, documents and supports self-hosted platforms in your own infrastructure, so the backups and evidence remain in your environment. Confirm the exact deliverables and any ongoing support in the written scope.

Limits to confirm in your environment

A backup job is only as good as the assumptions behind it. The items below are the points we check first on any Open WebUI backup and restore plan, because each one changes what gets copied, when, and how it comes back.

Exact data paths and layout

The location of the data directory, the database files and the uploads folder can shift between releases and install methods. Confirm the paths in the version you run, inside your container or on your VM, before writing any backup job. Record which volumes or mounts hold state and which are disposable. A backup that misses one mount restores an instance that starts but has lost its uploads or knowledge.

Open WebUI features

Vector store and file storage coverage

Confirm whether your backup tool captures the vector database and the shared file storage, not just the relational database. Retrieval indexes and uploaded files live outside the main database in many setups, so a database dump alone can leave knowledge bases unusable. Check whether a restored index must be rebuilt, and how long that rebuild takes on your data.

Scaling guide

Consistency during active writes

Chats, uploads and settings change while a backup runs. Ask whether your database snapshot is taken from a quiescent state or from a live engine, and whether files and database rows can drift apart between the two copies. Plan a maintenance window or a database-native backup method if you cannot tolerate that drift.

Vendor-supported restore procedure

Find the restore steps in the documentation for your exact release before an incident, not after. Confirm which secret key, environment variables and database version the restored instance needs, and whether migrations run on start. A backup that no documented procedure can restore leaves you with files and no reliable way to use them.

Secret key kept separately

Confirm where the secret key is stored and that a copy exists outside the data directory. Encrypted values and sessions depend on it, so restoring data without the matching key can leave stored credentials unreadable. Store the key in your secrets manager with its own access controls and retention.

Recovery targets set by the business

Your recovery point and recovery time targets should come from the owners of the chat and knowledge data, not from the default schedule of a tool. Agree how much recent data the business can lose and how long the service can be down, then design the backup frequency and restore test cadence to meet those targets.

How DeployOpen works on this

DeployOpen plans, builds, documents and supports Open WebUI backup and restore inside your own infrastructure, from cloud accounts to data centers or air-gapped networks. The work starts with a written scope that names every data store, the secret key handling and the restore targets your team needs to trust.

How we scope

  • Inventory where Open WebUI keeps chats, users, uploads and vector data in your deployment.
  • Confirm whether you run SQLite, PostgreSQL, a vector database and shared file storage.
  • Agree recovery goals, backup retention and who owns each restore decision in writing.

How we build

  • Configure scheduled backups for the database, uploads and vector store, with the secret key stored separately.
  • Set up job monitoring and alerting so failed backups are noticed the same day.
  • Run timed restore tests into an isolated environment and record what was recovered.

How we hand over

  • Deliver runbooks for backup, restore and secret key recovery written for your operators.
  • Document the schedule, retention settings, storage locations and access permissions in one place.
  • Walk your platform and security teams through a restore test they can repeat themselves.

How we support

  • Engagements are fixed-scope, with deliverables and timelines agreed in writing before work starts.
  • Ongoing backup verification, upgrade-related restore testing and retesting are available as a retainer.
  • Ask any provider to confirm how restore tests are run, recorded and repeated after upgrades.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.