forked from tagoWorks/akod
-
Notifications
You must be signed in to change notification settings - Fork 1
Setting up Cloudflare
tago edited this page Apr 25, 2024
·
20 revisions
Cloudflare Tunneling is a service provided by Cloudflare that enables users to securely expose resources within their private networks to the public internet. Unlike traditional methods like port forwarding or reverse proxies, Cloudflare Tunneling establishes a secure connection between the user's network and Cloudflare's global network, effectively extending the reach of the user's services without directly exposing them to potential security risks. First you will need to install Docker on your Linux server.
- Before installing Docker, ensure that your packages are up-to-date again:
sudo apt update
- Install the necessary packages to allow apt to use a repository over HTTPS:
sudo apt install -y apt-transport-https ca-certificates curl software-properties-common
- Add Docker's official GPG key:
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - - Add the Docker repository to your APT sources:
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" - Update the index, and install Docker CE
sudo apt update sudo apt install -y docker-ce
- Using Flare currently requires you to have an active domain name from a registrar like SquareUp, or Namecheap. If you have not done this yet, read this page
- Make sure your nameservers are pointed to Cloudflare.
- Have your Linux server online and ready to install Cloudflare Tunnel
- Create a free account on Cloudflare and add your domain, Cloudflare will guide you through this process
- Wait for DNS propagation (Can take up to 24 hours sometimes)
- Navigate to the Cloudflare dashboard and access the Zero Trust section
- Select "Networks" and then "Tunnels"
- Click "Add a tunnel" and choose Cloudflared
- Name your tunnel and choose the free plan
- Proceed through the setup steps, including validating your email address and configuring payment information (the plan is free, payment is for verification)
- Select the Docker installation
- Copy the connector command and then create a shell script file to run it when needed:
echo 'docker run -d cloudflare/cloudflared:latest tunnel --no-autoupdate run --token blahblahblah &' | sudo tee Cloudflare.sh
- After the tunnel is set up, click on next
- Specify the subdomain, and choose your domain
- Select HTTP type and url will be the IP address of the WebDAV Linux server and port (it should look like
HTTP://10.11.32.121:80). - Save the hostname
- Now it's time to finally start setting up Flare on your Linux server!