Skip to content

FATAL: password authentication failed for user \"nextcloud_db_user\" #2446

@ryanbrenden

Description

@ryanbrenden

Steps To Reproduce

  1. Deploy clean Ubuntu 22.04 VM
  2. Go to https://github.com/nextcloud/vm
  3. Click on "Code", download as .zip (vm-master.zip)
  4. In VM, extract vm-master.zip to ~/vm-master
  5. In VM, cd ~/vm-master
  6. Run... chmod +x nextcloud_install_production.sh
  7. Execute... sudo bash nextcloud_install_production.sh
  8. Accept default prompts, e.g. create new user ncadmin, use 2nd disk for "data"
  9. Error occurs just after the following installation step...

Creating possible missing Directories
chmod Files and Directories
⣾⣽⣻chown Directories
chmod/chown .htaccess
]
Installing Nextcloud...

  1. Two screenshots of errors attached here - key errors state....

Sorry but something went wrong. Please report this issue to https://github.com/nextcloud/vm/issues and include the output of the error message. Thank you!

sudo -u www-data php /var/www/nextcloud/occ maintenance:install --data-dir=/mnt/ncdata --database=pgsql --database-name=nextcloud_db --database-user=nextcloud_db_user --database-pass=L5QAaVYGMavmsl4Zlxm0OINEE7 --admin-user=ncadmin --admin-pass=nextcloud failed

""message":"Error trying to connect as "postgres", assuming database is setup and tables need to be created"

and...

"Message":"Failed to connect to the database: An exception occurred in the driver: SQLSTATE[08006] [7] connection to server at "localhost" (127.0.0.1), port 5432 failed: FATAL: password authentication failed for user "nextcloud_db_user"\nconnection to server at "localhost"

PostgreSQL username and/or password not valid

Screenshot 1

Screenshot 2

Expected Result

Expectation was the automated vm-master installation script to complete

Actual Result

Error suggests PostgreSQL username and/or password autogenerated by the script are not valid

Screenshots, Videos, or Pastebins

Screenshot 1

Screenshot 2

Additional Context

No response

Build Version

25.0.4

Environment

By using the scripts

Environment Details

Ubuntu 22.04
4 vCPU
4GB RAM
64GB OS disk, 256GB Data disk

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions