[GH-ISSUE #20373] issue: webui.db stores full rooted path back to original RAG files in upload directory in files table #34704

Closed
opened 2026-04-25 08:48:10 -05:00 by GiteaMirror · 1 comment
Owner

Originally created by @ttait1 on GitHub (Jan 5, 2026).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/20373

Check Existing Issues

  • I have searched for any existing and/or related issues.
  • I have searched for any existing and/or related discussions.
  • I have also searched in the CLOSED issues AND CLOSED discussions and found no related items (your issue might already be addressed on the development branch!).
  • I am using the latest version of Open WebUI.

Installation Method

Docker

Open WebUI Version

0,6,43

Ollama Version (if applicable)

No response

Operating System

Debian 13

Browser (if applicable)

No response

Confirmation

  • I have read and followed all instructions in README.md.
  • I am using the latest version of both Open WebUI and Ollama.
  • I have included the browser console logs.
  • I have included the Docker container logs.
  • I have provided every relevant configuration, setting, and environment variable used in my setup.
  • I have clearly listed every relevant configuration, custom setting, environment variable, and command-line option that influences my setup (such as Docker Compose overrides, .env values, browser settings, authentication configurations, etc).
  • I have documented step-by-step reproduction instructions that are precise, sequential, and leave nothing to interpretation. My steps:
  • Start with the initial platform/version/OS and dependencies used,
  • Specify exact install/launch/configure commands,
  • List URLs visited, user input (incl. example values/emails/passwords if needed),
  • Describe all options and toggles enabled or changed,
  • Include any files or environmental changes,
  • Identify the expected and actual result at each stage,
  • Ensure any reasonably skilled user can follow and hit the same issue.

Expected Behavior

When moving the location of the DATA_DIR, the links back to the source files that were used to create the RAG knowledge should still work after the move. The upload path that is stored in the "file" table of webui.db should be relative to DATA_DIR.

Actual Behavior

The links back to the knowledge base source doc instead point to the fully rooted path of where the original location of the upload folder was, causing the links back to the original document at the top of the sources chunk to not work. This is a particular problem if moving from say native instance to docker instance or v.v.

Steps to Reproduce

Install open-webui native
Set DATA_DIR to a path where webui.db should be stored (other than /app/backend/data)
Start docker
launch browser to open-webui instance
Create a knowledge Collection
Add a file to the knowledge collection
Create a new chat
Attach knowledge collection
Make a prompt to query the collection with a known hit
click the sources link
click the link at the top with the original file name - This should open the original file that was stored in the upload dir
Shut down open-webui
spin up a docker instance of open-webui, and mount the previous DATA_DIR on /app/backend/data with line like " -v $DATA_DIR:/app/backend/data"
launch browser to open-webui instance
Create a knowledge Collection
Add a file to the knowledge collection
Create a new chat
Attach knowledge collection
Make a prompt to query the collection with a known hit
click the sources link
click the link at the top with the original file name - This should open the original file that was stored in the upload dir, but it will fail with an error

Logs & Screenshots

logs were destroyed along with docker instance

Additional Information

Work-around is open the webui.db in a Db browser, open the file table, and search/replace on it to replace the old path to upload with the new path.

Originally created by @ttait1 on GitHub (Jan 5, 2026). Original GitHub issue: https://github.com/open-webui/open-webui/issues/20373 ### Check Existing Issues - [x] I have searched for any existing and/or related issues. - [x] I have searched for any existing and/or related discussions. - [x] I have also searched in the CLOSED issues AND CLOSED discussions and found no related items (your issue might already be addressed on the development branch!). - [x] I am using the latest version of Open WebUI. ### Installation Method Docker ### Open WebUI Version 0,6,43 ### Ollama Version (if applicable) _No response_ ### Operating System Debian 13 ### Browser (if applicable) _No response_ ### Confirmation - [x] I have read and followed all instructions in `README.md`. - [x] I am using the latest version of **both** Open WebUI and Ollama. - [x] I have included the browser console logs. - [x] I have included the Docker container logs. - [x] I have **provided every relevant configuration, setting, and environment variable used in my setup.** - [x] I have clearly **listed every relevant configuration, custom setting, environment variable, and command-line option that influences my setup** (such as Docker Compose overrides, .env values, browser settings, authentication configurations, etc). - [x] I have documented **step-by-step reproduction instructions that are precise, sequential, and leave nothing to interpretation**. My steps: - Start with the initial platform/version/OS and dependencies used, - Specify exact install/launch/configure commands, - List URLs visited, user input (incl. example values/emails/passwords if needed), - Describe all options and toggles enabled or changed, - Include any files or environmental changes, - Identify the expected and actual result at each stage, - Ensure any reasonably skilled user can follow and hit the same issue. ### Expected Behavior When moving the location of the DATA_DIR, the links back to the source files that were used to create the RAG knowledge should still work after the move. The upload path that is stored in the "file" table of webui.db should be relative to DATA_DIR. ### Actual Behavior The links back to the knowledge base source doc instead point to the fully rooted path of where the original location of the upload folder was, causing the links back to the original document at the top of the sources chunk to not work. This is a particular problem if moving from say native instance to docker instance or v.v. ### Steps to Reproduce Install open-webui native Set DATA_DIR to a path where webui.db should be stored (other than /app/backend/data) Start docker launch browser to open-webui instance Create a knowledge Collection Add a file to the knowledge collection Create a new chat Attach knowledge collection Make a prompt to query the collection with a known hit click the sources link click the link at the top with the original file name - This should open the original file that was stored in the upload dir Shut down open-webui spin up a docker instance of open-webui, and mount the previous DATA_DIR on /app/backend/data with line like " -v $DATA_DIR:/app/backend/data" launch browser to open-webui instance Create a knowledge Collection Add a file to the knowledge collection Create a new chat Attach knowledge collection Make a prompt to query the collection with a known hit click the sources link click the link at the top with the original file name - This should open the original file that was stored in the upload dir, but it will fail with an error ### Logs & Screenshots logs were destroyed along with docker instance ### Additional Information Work-around is open the webui.db in a Db browser, open the file table, and search/replace on it to replace the old path to upload with the new path.
GiteaMirror added the bug label 2026-04-25 08:48:10 -05:00
Author
Owner

@owui-terminator[bot] commented on GitHub (Jan 5, 2026):

🔍 Similar Issues Found

I found some existing issues that might be related to this one. Please check if any of these are duplicates or contain helpful solutions:

  1. #19264 issue: Uploaded file hash remains in database even when OCR fails, causing false duplicate detection
    by flefevre • Nov 18, 2025 • bug

💡 Tips:

  • If this is a duplicate, please consider closing this issue and adding any additional details to the existing one
  • If you found a solution in any of these issues, please share it here to help others

This comment was generated automatically by a bot. Please react with a 👍 if this comment was helpful, or a 👎 if it was not.

<!-- gh-comment-id:3708738579 --> @owui-terminator[bot] commented on GitHub (Jan 5, 2026): 🔍 **Similar Issues Found** I found some existing issues that might be related to this one. Please check if any of these are duplicates or contain helpful solutions: 1. [#19264](https://github.com/open-webui/open-webui/issues/19264) **issue: Uploaded file hash remains in database even when OCR fails, causing false duplicate detection** *by flefevre • Nov 18, 2025 • `bug`* --- 💡 **Tips:** - If this is a duplicate, please consider closing this issue and adding any additional details to the existing one - If you found a solution in any of these issues, please share it here to help others *This comment was generated automatically by a bot.* Please react with a 👍 if this comment was helpful, or a 👎 if it was not.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#34704