Skip to content

Setting up Cloudflare

tago edited this page Apr 19, 2024 · 20 revisions

How to Install Docker on Ubuntu

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 Ubuntu/Linux server

Update Index and Install Dependencies

  1. Before installing Docker, ensure that your package index is up-to-date:
    sudo apt update
  2. 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

Download and Install Docker

  1. Add Docker's official GPG key:
    curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
  2. 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"
  3. Update the index, and install Docker CE
    sudo apt update
    sudo apt install -y docker-ce

Setting Up Cloudflare Tunneling for AKoDFlare

Prepare Domain & Server

  1. Using AKoDFlare 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
  2. Have your Ubuntu/Linux server online and ready to install Cloudflare Tunnel

Set up Domain Name and Cloudflare Account

  1. Create a free account on Cloudflare and add your domain, Cloudflare will guide you through this process
  2. Wait for DNS propagation (Can take up to 24 hours sometimes)

Create Cloudflare Tunnel

  1. Navigate to the Cloudflare dashboard and access the Zero Trust section
  2. Select "Networks" and then "Tunnels"
  3. Click "Add a tunnel" and choose Cloudflared
  4. Name your tunnel and choose the free plan
  5. Proceed through the setup steps, including validating your email address and configuring payment information (the plan is free, payment is for verification)
  6. Select the Docker installation
  7. Copy the provided code and execute it (with sudo) on your Ubuntu/Linux server (EXAMPLE):
    sudo docker run -d cloudflare/cloudflared:latest tunnel --no-autoupdate run --token blahblahblah
  8. Now you can scroll down and you should see a connector. You successfully tunneled your server through Cloudflare!

Route Service through the Tunnel

  1. After the tunnel is set up, click on next
  2. Specify the subdomain, and choose your domain
  3. Select HTTP type and url will be the IP address of the WebDAV Ubuntu/Linux server and port (it should look like HTTP://192.168.443.123:80).
  4. Save the hostname
  5. Now it's time to finally setup AKoD Flare on your Ubuntu/Linux server!

Clone this wiki locally