Fun with Cloudflare Tunnels - Create secure and direct links to your external services

If like me you have your own services parked in a VPS or a local machine, endpoint security is a pain to properly setup. Avoid a lot of that headache using Cloudflare Tunnels.

Just route a Cloudflare managed domain to your host and let Cloudflare handle security. You can apply Cloudflare Access and protect routes with tokens or go further with Zero Trust.

I use Tunnels to route to services (n8n, WAHA etc) hosted in local machines installed different clients’ premises. Those routes are protected by one Cloudflare Worker that receive calls from a Bubble app, then check tokens and payload to route users to the appropriate services.

If you are already building services in your own VPS, then it’s actually pretty easy to setup!

Just sharing another little tip on how you can use Cloudflare to enhance your Bubble apps.

2 Likes

Cloudflare tunnels are awesome, my go to for my VPS’. As another few tips:

  1. Use CF Workers for heavy backend work or CRON jobs, anything basically you might not achieve with good performance or marginal utility on Bubble. Generous free tier.

  2. Use CF R2/Image transformations for website static assets as opposed to Bubble’s file manager, I tested and it’s far quicker and way better image optimization and cacheing. Plus, a far better way to manage them then the current File manager ui.