I am running into an issue with my local n8n setup using Docker on macOS. I have deployed n8n in a Docker container and am using the --tunnel option to create a tunnel for webhooks. However, when I try to send a webhook through the tunnel, I receive a “504 Gateway Timeout” error.
Despite setting the N8N_TUNNEL_SUBDOMAIN to my_tunnel_subdomain, the tunnel URL assigned is different, and I consistently get a “504 Gateway Timeout” error when trying to send webhooks.
I have tested on my WiFi network and an iPhone hotspot, but the problem is the same.
Logs:
Failed to renew license: renewal failed because current cert is not initialized
Error: connection refused: hooks.n8n.cloud:42617 (check your firewall settings)
I would greatly appreciate any guidance or suggestions on how to resolve this issue. Is there a specific configuration I might be missing or any known issues with using the tunnel option in Docker on macOS?
Failed to renew license: renewal failed because current cert is not initialized
Error: connection refused: hooks.n8n.cloud:42617 (check your firewall settings)
Which means n8n could not verify the license (even if its free I believe). I saw some recommended solutions of restarting, changing different env vars if you are reverse proxying for example. Or trying an upgrade.
This could also be related to docker directly. I was working with a client that wanted large high-availability setups on MacOS devices only. It was crazy difficult because docker does not correctly forward ports to the main host (on macos only), as it uses a virtualized host, causing TONS of issues. Nearly every solution, including kubernetes, had lots of issues communicating both outside of their sandboxes, to their own host, and to each other.
You should also double check your firewall, allow the hooks port.
Thank you for your response. I tested the npm installation locally, and the tunnel works perfectly. This confirms that the issue lies with Docker and not my firewall.
I suspected it might be a port forwarding problem within Docker. Is there a known solution for this issue on macOS? I haven’t found anything so far…
Edit: The npm install tunnel command worked for a few minutes, but then I encountered an HTTP ERROR 408. This isn’t a timeout issue like with Docker.
Honestly, I’m starting to lose patience with n8n. I also tried installing it on Render, but due to a suspicious warning, my Render account got blocked. (but this is another issue)
When using the tunnel you shouldn’t set the N8N_TUNNEL_SUBDOMAIN option, It sounds like you have nailed it and it is likely something to do with the Docker configuration maybe the Docker network is set to host only or something although it is an outbound tunnel so that should work.
We will likely be removing the tunnel option in the future with a preference towards ngrok or Cloudflare tunnels as while the tunnel is handy for testing it can have it’s issues if the connection is dropped.