Can't use my URL on self-hosted anymore

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.

Now I can only use it visiting the IP:port URL

Why is this happening?

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.

Hope it helps.

Thanks, I checked with dnschecker and the URL resolved to my VM external IP.
Doesn’t it mean the cache had already been flushed?

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.

The rules are ok.

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).

The strangest thing happened!

Yesterday n8ngooglecloud.italianindie.com couldn’t load the page.
Today everything works.

May there be caching problems on Google Cloud?

my env file is this

N8N_HOST=n8ngooglecloud.italianindie.com
N8N_TRUST_PROXY=1
N8N_PORT=443
N8N_PROTOCOL=https
N8N_EDITOR_BASE_URL=https://n8ngc.italianindie.com/
WEBHOOK_URL=https://n8ngc.italianindie.com/

N8N_SECURE_COOKIE=false

DEBUG=*
N8N_LOG_LEVEL=debug
GENERIC_TIMEZONE=Europe/Rome
N8N_DEFAULT_BINARY_DATA_MODE=filesystem
N8N_DIAGNOSTICS_ENABLED=false
N8N_RUNNERS_ENABLED=true

No, the page doesn’t time out

Ok, my understanding is this is now working?

It wasn’t working when I posted.

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.

1 Like