Postgres for persistence storage #34

Closed
opened 2026-02-15 19:15:39 -05:00 by yindo · 4 comments
Owner

Originally created by @hongbo-miao on GitHub (Sep 25, 2024).

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). 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! ☺️
yindo added the awaiting-user-feedback label 2026-02-15 19:15:39 -05:00
yindo closed this issue 2026-02-15 19:15:39 -05:00
Author
Owner

@westbrook-ai commented on GitHub (Sep 26, 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!

@westbrook-ai commented on GitHub (Sep 26, 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! ☺️

@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

@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!

@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.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: open-webui/helm-charts#34