Learn how to set up CloudFlare Tunnels on CasaOS for secure, reliable remote access to your home server without port forwarding! This step-by-step guide makes it easy to create a secure connection to your CasaOS installation from anywhere.
In this tutorial, I’ll show you:
- Setup Tunnels
- Complete installation process on CasaOS
- How to setup multiple sub domains for each app.
I’m new to ZimaOS (former QNAP user!), and have found your videos really helpful. I subscribed to learn even more.
I have followed your instructions, but am stuck at 10:38 at your video where you enter an IP address. You don’t really explain where you grabbed the IP, so I tried using my external IP (which is dynamic), as well as the internally assigned IP for the ZimaCube. Both give me the same Cloudflare Bad Gateway error when I try to open them.
Are there other steps that need to be taken, such as setting up port forwarding with my router? Thanks!
I commented on the video on YouTube as well.
1 Like
Hello and thank you for being a BigBearClub Member!
For the Cloudflare Tunnel setup (as shown in the video), you should enter the Local CasaOS IP address (the one you use to access CasaOS on your network) and the host port that BookStack is listening on. You can find this port in the CasaOS app settings for BookStack.
You do NOT need to set up port forwarding on your router with Cloudflare Tunnels—this is one of the best benefits! With the Cloudflared daemon set up, you can easily create tunnels for your subdomains that point directly to your local IPs and services, exposing them securely without any port forwarding or needing your external IP address.
If you visit the CasaOS IP and port and get a Bad Gateway error:
- Check that BookStack is running and accessible on your local network at that IP and port.
- Review the BookStack logs in CasaOS for any errors or startup issues.
TIP: You can install Dozzle and look at the logs more easily. Here is a video for that: https://youtu.be/lLLNDcHNOuM
I posted on YouTube as well! Hope it helps.
you should enter the Local CasaOS IP address (the one you use to access CasaOS on your network)
That worked! So strange it didn’t work immediately when I tried it. I got home a few hours later and went back to the local IP address and it worked immediately. I really appreciate your help!
Now that I got the basics, I of course have gotten stuck again, I followed the instructions on the older public video (10:07 in the video), and clicked the button to Always Use HTTPS. This broke my tunnels and unswitching Always Use HTTPS fixes it again.
The interface has changed a lot since the video, and I wonder if there may be additional steps required now. Thanks again for one of your help.
Welp, I’m back cap in hand.
My HTTPS query was addressed simply by waiting almost 24 hours and now suddenly “Always Use HTTPS” works as intended. I don’t know why there was a considerable delay, but I am up and running with all my containers tunneled through Cloudflare using HTTPS.
Thanks BigBear!
1 Like
You’re welcome. Glad to hear it’s working now! Sometimes there’s a delay while DNS or Cloudflare settings fully propagate, so waiting was definitely the right call. If you run into any more Cloudflare or HTTPS issues, let me know—always happy to help if I have time!