Conflict between docker-compose.yml and config.php?


I am experiencing a strange problem:

I set up NC via docker-compose where I defined, among others, the following environment variable: SMTP_HOST= was an additional msmtp container I need to NC to talk to my mail server; for some reason, its IP address has changed. So I changed the setting in NC on the Basic Settings page to and saved it. This change is also reflected in config.php.

However, when I try to send a test mail, I get an error that NC failed to send the mail via (!) So although the IP address appears to be changed successfully (as evidenced by config.php), NC seems to still be using the previous setting from the docker-compose.yml file.

Is the IP address provided via docker-compose environment somehow “hard-coded” and overrides the setting in config.php?

Any ideas?


In general I would recommend you to use container names rather than IPs - because IPs could change over time, but Docker has built-in DNS resolution so containers could reliably reach each other…

Regarding variables - this are used only at container creation - you need to re-create the container to “enable” your new variable (docker-compose down/docker-compose up)…