I installed n8n using Docker on Google Cloud. It was working, but I had to restart the virtual machine due to an issue. Since then, I haven’t been able to access it via the subdomain.
The VM changed IP, but I changed the DNS. Everything worked internally. There were no errore in Docker’s logs.
It sounds like everything is correctly configured on the server side, especially since you’re able to access n8n via the IP:port. One common issue in cases like this is DNS caching - both locally on your computer and across DNS resolvers (like your ISP, Google DNS, Cloudflare, etc.).
DNS records have a TTL value, which measures how long the record should be cached by caching systems, once they resolve it. This could be the reason - even though the dns record was changed, resolution could be coming from cache (the old value) and this will be happening until the TTL expires and the request actually goes out to the authoritative server.
If it resolves to your vm ext ip across the board, yes, most likely the cache is repopulated.
I understand the requests DO work when sent internally with vm’s network?
The next things I’d check is whether you have the appropriate firewall rules for the request to hit your vm.
It’s very strange. If you edit a workflow, the URL starts with the subdomain. But to login, you have to go use IP:port. Otherwise the home page cannot be loaded.
Which environment variables you set with docker for n8n?
Are they all up to date?
When you say the page cannot be loaded - do you mean a timeout?
Do you see the request going through the firewall rules in GCP (or hitting the vm, you’d need tcpdump for that).
Now it’s working.
And the solution was pulling the image and recreating the container. The problem originated when I add to restart the VM because Docker was stuck. Maybe something broke.