Cannot Install with PostgreSQL: Privelege Issue


I’m trying to set up Nextcloud (15.0.7) with Postgres (11.2) on a Raspberry Pi 2B+ with Ubuntu Server 19.04. I have a database created (nextcloud) with a role nextcloud with login and a password, with ownership of the nextcloud database, all privileges on that database, and permissions to create databases and create roles. I’ve confirmed I can log in as the user with psql -U nextcloud using the password. I made the database with the instructions in the manual.

However, when running the set up I get the error: Error while trying to create admin user: Failed to connect to the database: An exception occured in driver: SQLSTATE[08006] [7] FATAL: permission denied for database “nextcloud” DETAIL: User does not have CONNECT privilege. I’ve double checked with GRANT CONNECT ON DATABASE nextcloud TO nextcloud;.

Sorry to bump, but does anyone have any ideas? Are these incompatible versions for some reason?

try to create a database ‘default’. and drop the nextcloud db. (thats way it’s implemented in a docker container.)

and check the pg_hba.conf if the web server user is allowed to connect. and with which method.