How to deploy Zitadel Auth Container with Fly.io Managed Postgres?

I am able to connect to the managed postgres database with the initial user. Zitadel wants to create a new role for “zitadel” while starting the container. fly.io managed postgres doesn’t allow the container to create a new role, so the container stops with level=fatal msg=“unable to initialize the database” caller=“/home/runner/work/zitadel/zitadel/cmd/initialise/init.go:63” error=“ERROR: permission denied to create role (SQLSTATE 42501)”
zitadel-1 exited with code 1 Anyone an idea how to overcome that? Creating the user in advance via the fly.io backend doesn’t help either.

This might be useful:

Note: If your cluster was created before July 2025, you’ll need to opt in to the new Role system before you can add new users. This can be done on the Users tab of your dashboard.

Might be worth a try.

I don’t believe the Role system lets you create new roles/users through the postgres connection, but only through the dashboard, unfortunately.
I’m not familiar with Zitadel but does it by any chance let you configure the “zitadel” role manually instead of at container start?

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.