From f34611d6757bfc7ee397707ba15dacd435146faa Mon Sep 17 00:00:00 2001 From: Gibheer Date: Thu, 5 Jan 2023 11:05:01 +0100 Subject: [PATCH] docs(postgres): avoid using the admin user. (#4975) docs: Update the documentation to avoid using the postgres user. In some environments it is not possible to get access to the postgres user. Co-authored-by: Silvan --- .../manage/database/_postgres.mdx | 20 ++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/docs/docs/self-hosting/manage/database/_postgres.mdx b/docs/docs/self-hosting/manage/database/_postgres.mdx index 6937830814..25e75f4c45 100644 --- a/docs/docs/self-hosting/manage/database/_postgres.mdx +++ b/docs/docs/self-hosting/manage/database/_postgres.mdx @@ -35,4 +35,22 @@ Database: RootCert: Cert: Key: -``` \ No newline at end of file +``` + +The admin user is only needed for the installation step but can also be avoided +by preparing the necessary requirements: + +* the zitadel user +* the zitadel database +* granting required permissions to the zitadel user + +```sql +CREATE ROLE zitadel LOGIN; +CREATE DATABASE zitadel; +GRANT CONNECT, CREATE ON DATABASE zitadel TO zitadel; +``` + +Don't forget to adjust pg_hba.conf and set a password for the zitadel user. + +With the setup done, follow the [phases guide](/docs/self-hosting/manage/updating_scaling#separating-init-and-setup-from-the-runtime) +to run the init and then setup phase to get all necessary tables and data set up.