2024-04-19 12:00:11 +00:00
---
title: Changing Database Password
---
Sadly enough, Nextcloud Containers do not correctly update database passwords when changed.
To do so, please execute the following steps to do so manually:
## Other Platforms
Due to other platforms do all having the same storage backend, it depends on your storage backend how you do this.
2024-04-20 00:15:35 +00:00
It might be advisable to change the password within nextcloud _before_ changing the password on the cnpg database.
2024-04-19 12:00:11 +00:00
In summary:
2024-04-20 00:15:35 +00:00
2024-04-19 12:00:11 +00:00
- Access the config PVC
- Edit config.php to ensure "dbpassword" reflects your password
## TrueNAS SCALE
1. Mount Nextcloud with HeavyScript, ex:
2024-04-20 00:15:35 +00:00
heavyscript pvc --mount nextcloud
2024-04-19 12:00:11 +00:00
2. Change to the mounted path, then to the nextcloud-config folder, ex:
2024-04-20 00:15:35 +00:00
cd /mnt/mounted_pvc/nextcloud/nextcloud-config
2024-04-19 12:00:11 +00:00
3. grep out dbpassword, ex:
2024-04-20 00:15:35 +00:00
cat config.php | grep "dbpassword"
2024-04-19 12:00:11 +00:00
4. Copy the value from the grep command, should look something like: dF6h35JFX5v6AzfFpviFAoBbZU9cghKrwHWJf9GY5oRmYJEaiTHkYz93JPUgRf
2024-04-20 00:15:35 +00:00
Change to your home directory, or exit the terminal, ex:
cd ~
2024-04-19 12:00:11 +00:00
5. Unmount Nextcloud with HeavyScript, ex:
2024-04-20 00:15:35 +00:00
heavyscript pvc --unmount nextcloud
2024-04-19 12:00:11 +00:00
6. Open TrueNAS UI > Apps > Nextcloud > Edit, and scroll down to the CNPG section and replace PLACEHOLDERPASSWORD under the password field, with the grep value (from step 3-4), then save
2024-04-20 00:15:35 +00:00
If a failure happens here regarding cannot upgrade between pg versions then change the Postgres Version under CNPG settings to 15 if its 16 and attempt to save again
2024-04-19 12:00:11 +00:00
7. Start with heavyscript, ex:
2024-04-20 00:15:35 +00:00
heavyscript app --start nextcloud