Need help in setting up Cloudflare tunnel for my ESP8266

Hello respected members.

I have been using an ESP8266 for my home automation project (my first Arduino-based project). Until now, I have only been able to control the ESP8266 when I am on the same network as it. I have searched online for a solution and found that many people suggest using port forwarding or a Dynamic DNS provider. However, my ISP does not allow the use of port forwarding, and the Dynamic DNS method is also not working for me. Some people have also warned that exposing ports to the internet may not always be a good idea.

After doing more research, I have found a potential solution that seem to fit my requirements: Cloudflare Tunnel. My main goals are to make the communication secure and to make the operations more real-time. I have a few questions about these two options:

  1. If I use Cloudflare tunnel, will it result in increased latency?
  2. I have not been able to locate any resources for implementing Cloudflare tunnel for ESP8266. If you think that Cloudflare is a good option to consider, or if you have experience using it or know where I can learn more about it, please let me know.

Thank you.

I am new to all this as well, but there’s a YouTube video that got this kicked off for me. Search for EXPOSE your home network to the INTERNET!! (it’s safe) by NetworkChuck.

Far as I can tell, there would be nothing special you need to do with your ESP device, other than make sure it’s accessible inside your local network (preferably with a fixed IP address). Then, on a different machine inside your local network, install the “tunnel connector” (Windows, Mac, Debian, Red Hat, or Docker). Then, on that tunnel, you can configure a subdomain to point to the local address of your ESP. While I did no official latency testing, I switched a DIY garage door opener from a dyndns address with open port on my network to a Cloudflare tunnel and I cannot tell the difference.