# Setting Up Cloudflare Tunnels on Umbrel

**URL:** <https://community.umbrel.com/t/setting-up-cloudflare-tunnels-on-umbrel/10239>\
**Category:** Guides\
**Created:** [November 9, 2022, 2:44am UTC](https://community.umbrel.com/t/setting-up-cloudflare-tunnels-on-umbrel/10239 "2022-11-09T02:44:19Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![usernameisJim](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.umbrel.com/usernameisjim/32/3309_2.png) [@usernameisJim](https://community.umbrel.com/u/usernameisJim)\
**Post date:** [September 14, 2023, 2:24am UTC](https://community.umbrel.com/t/setting-up-cloudflare-tunnels-on-umbrel/10239/5 "2023-09-14T02:24:02Z")

</div>

This has been a great post by [x11r0n](https://community.umbrel.com/u/x11r0n) and I want to iron out some of the steps with helpful screenshots!

Pre-requsites:

A Cloudflare account  
Go to [https://www.cloudflare.com/](https://www.cloudflare.com/) and click Sign Up!

A domain name  
Choose your domain registrar and signup for a domain!

**Step 1: Add your domain to your cloudflare account**

Go to [https://dash.cloudflare.com/](https://dash.cloudflare.com/) and click “Add a site”

 ![image](https://canada1.discourse-cdn.com/flex030/uploads/getumbrel/original/2X/4/41b5fc2257977a1a1b98d3e2fe9141fae6934c61.png)

- Have your nameservers pointed at cloudflare,

- In your Cloudflare dashboard after you click on your added website go to the far right \> DNS Settings  
 ![image](https://canada1.discourse-cdn.com/flex030/uploads/getumbrel/original/2X/e/eec3beadc7a43de8299f540bd1a92e286654735b.png)

Then scroll down to find your nameservers:

![image](https://canada1.discourse-cdn.com/flex030/uploads/getumbrel/original/2X/9/944ecb7e6fb653c7a36c826f37a186e5aa77ae26.png)

This is for your domain’s nameserver settings so go to your chosen domain provider \> DNS settings \> Nameservers and enter in your Cloudflare Nameservers there (yours might be different from above), for GoDaddy that’s how this looks:

 ![image](https://canada1.discourse-cdn.com/flex030/uploads/getumbrel/original/2X/e/efc78c62e2727d348c4e0f2c7867f50c12e7e533.png)

* * *

**Step 2: Now we can SSH into your Umbrel and install the Cloudflare tunnel:**  
You can reference the [FAQ under How to SSH here](https://community.umbrel.com/t/official-umbrel-troubleshooting-guide-and-faq/9873)

After you’ve SSH’d to run these commands to install the cloudflare tunnel daemon, you’ll need to run each line one by one:

```auto
sudo mkdir -p --mode=0755 /usr/share/keyrings

curl -fsSL https://pkg.cloudflare.com/cloudflare-main.gpg | sudo tee /usr/share/keyrings/cloudflare-main.gpg >/dev/null

echo 'deb [signed-by=/usr/share/keyrings/cloudflare-main.gpg] https://pkg.cloudflare.com/cloudflared buster main' | sudo tee /etc/apt/sources.list.d/cloudflared.list

sudo apt-get update

sudo apt-get install cloudflared

cloudflared tunnel login

```

Running each command should look something like this, except as opposed to already installed, you’ll see installed successfully:

 ![image](https://canada1.discourse-cdn.com/flex030/uploads/getumbrel/original/2X/9/962914d3c8ca98d85e17c0106bf41b58406fa613.png)

Then the output of this last command will display a URL in the terminal window starting with `https://dash.cloudflare.com`

Copy the output you get after you run the last command:  
`cluodflared tunnel login`  
and paste that it into your web browser

**Step 3: Create the tunnel!**

After you paste URL from the last step it will take you to your Zero Trust page on Cloudflare, when prompted, select the domain name you want to use! It will be the only thing you can click on in the middle.

Now, go to [https://dash.teams.cloudflare.com](https://dash.teams.cloudflare.com)  
Then click on your domain on this page to open its settings,

On the left click Access \> Tunnels \> Create a Tunnel:

![image](https://canada1.discourse-cdn.com/flex030/uploads/getumbrel/original/2X/4/439fa822e636ae2204e7f3ec83b64d6ffbdab73f.png)

Give it a name, “Umbrel” or whatever you’d like, the tunnel name can be anything:  
 ![image](https://canada1.discourse-cdn.com/flex030/uploads/getumbrel/original/2X/7/70092ce6b61f612a2dc44e372028bc3d85dbd825.png)

Click Save tunnel on the bottom right

Then choose “Debian” under “Choose your environment”  
Like so:

 ![image](https://canada1.discourse-cdn.com/flex030/uploads/getumbrel/original/2X/6/6a5dfe44395041cac561ae3fd8e25022f41aae04.png)

Under this copy the text on the right under “If you already have cloudflared installed on your machine:”

 ![1](https://canada1.discourse-cdn.com/flex030/uploads/getumbrel/original/2X/b/b21ae93042435d232fa72aaaa75984a0e467f813.png)

Paste that text back in your terminal from the last step, and then hit enter to run it

Back in your web browser click “Next” or you can navigate to the next Public Hostname tab,

Now, we will set up the forwarding rule.

![image](https://canada1.discourse-cdn.com/flex030/uploads/getumbrel/original/2X/4/4f4eee662806997ab243878e3c59b4bc2e5bd0d2.png)

Under “Public hostname” enter a subdomain, you can make this anything you want,

Choose the domain name we selected previously

Under “Service” the details are:  
Type: **HTTP**  
URL should be `localhost:3003`  
(This is the same port that you see in your address bar when using the Umbrel App in your web browser locally)

Click Save Hostname

Here is an example of that screen:

 ![image](https://canada1.discourse-cdn.com/flex030/uploads/getumbrel/original/2X/f/fcf25592c03c7a436ef0bc7c76a3e2f559c2acef.png)

All done! You should now be able to access the subdomain we set up in the last step.

You can see it’s working if its status is “Healthy”

![image](https://canada1.discourse-cdn.com/flex030/uploads/getumbrel/original/2X/0/0fe12aea85e27e7d94a9d64dedc63cb6debe992d.png)

You can now manage your BTCPay Server via your web link, creating your store there or from within your Umbrel app and edit its settings. Then you can provide your store’s web link direct to your consumers or embed it in any other website.

Let us know here in a post if you have any issue or in our Telegram [Help and Support Channel](https://t.me/getumbrel/207765)!

---

_[View the full topic](https://community.umbrel.com/t/setting-up-cloudflare-tunnels-on-umbrel/10239)._
