How can I use Cloudflare Tunnel on Cloud Flare Zero trust to connect to my node?

I have start9 running on a raspberry pi

How can I setup a cloudflare tunnel so that I can access it from the clearnet?

Has anyone else done this?

Thanks

I’ve created a wrapper for the cloudflared client here: Releases Ā· remcoros/cloudflared-startos Ā· GitHub

It needs the api key from the tunnel you created in CF, and then you use the CF dashboard to add public hostnames with routes to the internal hostname:port of each container:

image

1 Like

Thank you for the help, your code works perfectly to tunnel. I can now get to the start9 login from clearnet.
I would also like to get to btcpayserver, and have added the http://btcpayserver.embassy:80 line to published application route of the tunnel, and when I browse to the sub domain on clearnet it does try and open, but the page is blank.
If I view the source I see code is there, but there is also a message: ā€œPlease enable JavaScript to continue using this application.ā€

Is there a setting in the tunnel config that you know of in cloudflare that could be limiting the data and preventing it from loading?

Thanks again for your help!

Just checked, but I don’t have any special config in the route:

(everything under ā€œAdditional application settingsā€ is default)

Did you set a ā€˜default app’ inside the BTCPayServer settings? Server Setting → ā€˜Display app on website root’ → choose your ā€˜app/page’:

I have switched the default page and it still does not display. I know the new page is trying to render as the title is different and source code but the same error.
I tried different browsers and devices with the same issue.

I think that since I am using a domain that is also used for a live website, its possible the normal cloudflare protections I have on the website are interfering with the subdomain to btcpay.

I’ll tinker around in those settings and see if I can fix it there. It looks to me like your code seems to work fine, thank you again!

I fixed the problem. It was the settings I have in Cloudflare for the domain.

I turned OFF the Rocket Loader toggle under the Speed > Settings > Content Optimization.

Now the BTCPay server screen loads perfectly!

Is there a way to setup a route to a specific store or crowdfund on btcpay server while still keeping the default one active on another subdomain?
I want to setup a few different subdomains to open different apps

Add the subdomain to the cloudflare dashboard and route it to btcpay.embassy, the same way as for the main domain, and then you can map those (sub)domains to btcpay apps in BTCPayServer settings, (see the screenshot above, click on ā€˜Map specific domains to specific apps’).

1 Like

Thank you! works perfectly :grinning:

1 Like

Hi, I’ve managed to configure btcpay, lnbits and mempool with the cloudflare tunnel and they work perfecty, thanks for the help so far. I want to do the same for electrs, file browser, ghost, gitea, nextcloud, ride the lightning and start9 pages if possible. Can you help out with the correct Service URL in the published application route for Cloudflare to connect them please :pray: