Raspi Course

Cloudflare Tunnel

If you want to host your app over the internet, you have a few options. However, Cloudflare Tunnel is a secure and easy way to do it.

step 1:

Head over to the Cloudflare Tunnel dashboard and make sure you can create a new tunnel

You need to have an account setup with your credit card information. This service is free but you still need a credit card.

step 2:

Create a new tunnel

  • Select your tunnel type: cloudflared
  • Name: raspberrypi or whatever you want
step 3:

On the Configure page, select debian and run the code to install the tunnel on your pi. Then click next

step 4:

On the Route Traffic page, create a public hostname for your tunnel

Public hostname:

  • Subdomain: optional
  • Domain: a domain you have setup in Cloudflare
  • Path: optional

Service:

  • Type: http
  • URL: localhost:3000

Once you've clicked save tunnel you should be able to visit your public hostname and see your app running on your pi.