[GH-ISSUE #83] Postgres for persistence storage #36

Closed
opened 2026-10-18 21:04:56 +00:00 by bsakaguchi · 4 comments
Owner

Originally created by @hongbo-miao on GitHub (Sep 25, 2024).
Original GitHub issue: https://github.com/open-webui/helm-charts/issues/83

It seems this pull request allows using Postgres for Open WebUI storage

It would be great to support / document as well, thank you! ☺️

Originally created by @hongbo-miao on GitHub (Sep 25, 2024). Original GitHub issue: https://github.com/open-webui/helm-charts/issues/83 It seems this pull request allows using Postgres for Open WebUI storage - https://github.com/open-webui/open-webui/pull/1791 It would be great to support / document as well, thank you! ☺️
Author
Owner

@james-westbrook commented on GitHub (Sep 27, 2024):

Hey @hongbo-miao, I believe all you would need to do is add your Postgres connection string as a value to extraEnvVars, such as:

extraEnvVars:
- name: "DATABASE_URL"
  value: "postgresql://[user[:password]@][host][:port][/dbname][?param1=value1&...]"

You can see more in the Open WebUI docs here: https://docs.openwebui.com/getting-started/env-configuration/#database_url

Please report back on whether or not this works for you, thanks!

<!-- gh-comment-id:2378328562 --> @james-westbrook commented on GitHub (Sep 27, 2024): Hey @hongbo-miao, I believe all you would need to do is add your Postgres connection string as a value to `extraEnvVars`, such as: ``` extraEnvVars: - name: "DATABASE_URL" value: "postgresql://[user[:password]@][host][:port][/dbname][?param1=value1&...]" ``` You can see more in the Open WebUI docs here: https://docs.openwebui.com/getting-started/env-configuration/#database_url Please report back on whether or not this works for you, thanks!
Author
Owner

@hongbo-miao commented on GitHub (Sep 27, 2024):

Thanks @0xThresh ! I am wondering in this case, if I set

persistence:
  enabled: false

Could Open WebUI fully use external Postgres to save all data? I created a question at https://github.com/open-webui/open-webui/discussions/5746

In the meanwhile, I will do some tests as well when got time, thanks! ☺️

<!-- gh-comment-id:2378354834 --> @hongbo-miao commented on GitHub (Sep 27, 2024): Thanks @0xThresh ! I am wondering in this case, if I set ```yaml persistence: enabled: false ``` Could Open WebUI fully use external Postgres to save all data? I created a question at https://github.com/open-webui/open-webui/discussions/5746 In the meanwhile, I will do some tests as well when got time, thanks! ☺️
Author
Owner

@tjbck commented on GitHub (Sep 27, 2024):

@hongbo-miao yes, except for uploaded files

<!-- gh-comment-id:2379241585 --> @tjbck commented on GitHub (Sep 27, 2024): @hongbo-miao yes, except for uploaded files
Author
Owner

@hongbo-miao commented on GitHub (Sep 27, 2024):

Thanks @tjbck for the info! 😃 It makes sense.
So I assume I still have to use Kubernetes persistence storage for uploaded files.
In future, if it could support S3 as storage, that would be awesome! I opened a feature request at https://github.com/open-webui/open-webui/issues/5763
I will close this for now. Once Open WebUI supports S3 for user uploaded files, I will test Postgres + S3. Thanks!

<!-- gh-comment-id:2379334350 --> @hongbo-miao commented on GitHub (Sep 27, 2024): Thanks @tjbck for the info! 😃 It makes sense. So I assume I still have to use Kubernetes persistence storage for uploaded files. In future, if it could support S3 as storage, that would be awesome! I opened a feature request at https://github.com/open-webui/open-webui/issues/5763 I will close this for now. Once Open WebUI supports S3 for user uploaded files, I will test Postgres + S3. Thanks!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
open-webui/helm-charts#36
No description provided.