Unleashing Autonomy: Getting Setup 5
Creating a Cloudflare tunnel
This article is for people who are self-hosting n8n on a local PC in your house. You do not need to do this if you are using a VPS as the server is already on a public facing IP.
Let me explain.
If you are hosting n8n in your house, then n8n cannot receive calls from external services because your home PC is not directly exposed to a public IP address. You can do port forwarding on your router, but there are a couple of problems with this.
This is a security risk that exposes your home network to potential hackers.
Your IP address may change often depending on you provider.
The solution to this is creating a tunnel. What this effectively means is that you have a public facing URL such as n8n.yourdomain.com and all traffic to that goes to Cloudflare, and then there is a private tunnel between Cloudflare and the computer in your house. This is a secure, encrypted connection that does not expose your home network or IP address.
It might sound complicated, but this is very easy to setup. I have found a good video for you to watch to go through the setup process, you can watch it below.
This video also covers what I have previously shown about setting up n8n using Docker desktop, as well as adding the Cloudflare tunnel.
If you have any questions then please feel free to ask away in the comments.



I think the cloudflare settings have changed.
I've got the cloudflared client installed & the tunnel is showing as healthy in Cloudflare Tunnels.
But... in the video, creating Routes now says "Hostname Routes" and "Published Application Routes".
The latter looks a lot like the config in the video, but the subdomain doesn't resolve.
I've used a domain I have in cloudflare and it set up a n8n.mydomain.com as the route endpoint.
It's a cloudflare pages static site, but I'm not sure that would matter.
Any ideas?
The Telegram trigger needs the Webhook URL to be https, but the current setup with n8n running on my Ubuntu desktop has just http ... what do you suggest?