cross-posted from: https://lemmy.ca/post/60267812
Everytime I try setting trusted domains variables before booting, and rebuild my container, there is only localhost being set in config.php. Is there a way I can have the file automatically set on a freshly built container?
The environment variable
NEXTCLOUD_TRUSTED_DOMAINSdoes get loaded onto the server, but the Nextcloud install is not using it.Honestly, I would even be happy with
NEXTCLOUD_TRUSTED_DOMAINS=*at this point to trust all domains.
I did not find a way to do this. However part of my problem was Caddy reverse proxy not pointing to the right container. Updating my Caddyfile, and running the following solved accessing via my domain or other IPs.
For my setup I just copied the config.php from the container into my host filesystem, changed the trusted domains value and then mounted that file as docker bind mount into the container onto the same path. So the config.php, that nextcloud sees, is no longer the one provided by the container image, but mine with the changed trusted domains.

