-
-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: Nextcloud always changes the MySQL db password #34123
Comments
Hi 👋, thanks for your bug report. Would you mind to update the title? ;) As reference #34121 which sounds similar. |
Oof, very sorry for that, done!
Now that I re-read it, it seems related indeed. However it seems to be about a slightly different case, i.e. when providing a wrong db password in the first place:
(emphasis mine) |
This also affect my dev environment, see juliushaertl/nextcloud-docker-dev#77 |
I'm also looking why this is causign an issue since a few months and found this now. Interesting that passwords gets changed in the source of truth, which should not happen.. As I found out it is not only the Anyway, I have
What I could maybe propose is to add config parameters to disable those specific generators? (I could potentially contribute this change) I still need to do some trickery with config_is_read_only since I rather have it always to true. |
Hi, please update to 24.0.9 or better 25.0.3 and report back if it fixes the issue. Thank you! My goal is to add a label like e.g. 25-feedback to this ticket of an up-to-date major Nextcloud version where the bug could be reproduced. However this is not going to work without your help. So thanks for all your effort! If you don't manage to reproduce the issue in time and the issue gets closed but you can reproduce the issue afterwards, feel free to create a new bug report with up-to-date information by following this link: https://github.com/nextcloud/server/issues/new?assignees=&labels=bug%2C0.+Needs+triage&template=BUG_REPORT.yml&title=%5BBug%5D%3A+ |
Still reproducible with 25.0.3. |
Hopefully fixed with #36400 in 25.0.4 |
Bug description
Since #33513 Nextcloud always recreates the MySQL installation password.
To explain why this is a problem, let me elaborate how Nextcloud is currently managed when using NixOS:
/var/lib/nextcloud/config/override.config.php
(this takes precedence overconfig.php
. We do this by design because NixOS is essentially a tool for configuration management and the config should be the single source of truth).config.php
, but the original password inoverride.config.php
is still effective and thus Nextcloud now uses the wrong MySQL password which renders the instance in a broken state.We fixed the issue ourselves now by patching out the entire behavior: https://github.com/NixOS/nixpkgs/blob/e986ddf417949e1a045430326a7238f9972827c9/pkgs/servers/nextcloud/0001-Setup-remove-custom-dbuser-creation-behavior.patch
However I figured it's still reasonable to file a bug here:
*.config.php
-files is useful for config management tools, however these tools are supposed to contain the single source of truth and diverging from that is IMHO a problem.It's understandable to me though if you'd prefer to keep the behavior the way it currently is for a better installation experience (even though I disagree with the motivation). In the end, we fixed the issue on our end, I thought I'd still bring it to your attention :)
Steps to reproduce
Expected behavior
I'd expect Nextcloud to not touch the MySQL password, reasoning is outlined in the description.
Installation method
Other Community project
Operating system
Other
PHP engine version
PHP 8.0
Web server
Nginx
Database engine version
MySQL
Is this bug present after an update or on a fresh install?
Fresh Nextcloud Server install
Are you using the Nextcloud Server Encryption module?
Encryption is Disabled
What user-backends are you using?
Configuration report
No response
List of activated Apps
Nextcloud Signing status
No response
Nextcloud Logs
No response
Additional info
Installed via the NixOS module of nextcloud, https://nixos.org/manual/nixos/stable/index.html#module-services-nextcloud
The text was updated successfully, but these errors were encountered: