I recently ran into this error without changing anything in my setup. I get the error “504 Gateway Time-out” when trying to access my nextcloud instance at sub.domain.com, both from local network and from outside. I can access https pages in domain.com (apache running on host without docker) and ssh into the server. I have rebooted both the server and the router. My DDNS is up to date.
The nextcloud and letsencrypt logs are here and here.
Where to go from here?
EDITED TO ADD: I tried switching to swag, but the situation is the same. Swag log is here.
also, if you have followed this and done the port forwarding, please share your compose for swag and nextcloud as well as the contents of /config/www/nextcloud/config/config.php
I switched everything off in the network, but still run into this problem. When it works, it’s extremely slow. I can’t find anything hogging server resources in htop or nethogs.
it looks like you removed the original entry from the trusted domains array which you should not have done, you should have a minimum of the original + your added domain.
swag’s nginx has logging in /home/docker/appdata/letsencrypt/logs/nginx/ you should see access.log and error.log (amongst others) you can tail -f these and then try to access and see what’s going on. however, 504 means the traffic isn’t reaching swag at all, which makes sense since it sounds like you’re sending port 443 to your apache instance.
can you describe how you’re testing? external from a mobile connected cell phone or internal? if internal, do you have split dns or are you relying on hairpin nat? You could take a look at our troubleshooting guide: https://blog.linuxserver.io/2019/07/10/troubleshooting-letsencrypt-image-port-mapping-and-forwarding/ and see if this all works for you… I have a feeling it will not which should help diagnose further.