Getting Local Servers Online with Cloudflare Zero Trust Tunnel

After some years using Cloudflare CDN for the websites I manage, I was recently starting to dig into another great feature of Cloudflare-because it's free. It is the Cloudflare Tunnel. 

Cloudflare Tunnel, as quoted on its own Cloudflare website, is a tunneling software that enables you to quickly secure and encrypt application traffic through all forms of infrastructure that can hide the IP of web servers and prevent direct attacks.

Cloudflare Tunnel gives a secure way to connect your resources to the Cloudflare Network without a public IP. Interesting, right? I myself started utilizing this feature a few months back and so far it's been quite satisfying given that it is a free service. I use Cloudflare Tunnel to access the home local server. The same concept as ngrok, but I think this is more OP.

This may suit your needs when setting up an online server perhaps for e-Rapor or others that "may" come in handy for only the odd seasonal occasion or perhaps some server with barely any traffic.

Requirements that must be fulfilled

Before you start, make sure you have the following things ready:
  1. Have a VPS (Virtual Private Server)
    VPS is needed to host your website independently. You can use any VPS service according to your needs and budget. if you want the free version install linux or ubuntu, if you are a windows user you can follow this tutorial:
    👉 First time using VirtualBox? Here's how to install it easily
  2. Have Installed aaPanel on the VPS
    aaPanel is a free and lightweight control panel for managing servers.
    See the installation guide here:
    👉 How to Host Website for Free at Home (ScrollWebID)
  3. Have a Cloudflare Account and Active Domain
    Needed to manage DNS and secure websites over the Cloudflare network.
    The sign-up and setup guide is here:
    👉 Want a Faster & Safer Website? Register Cloudflare Now (ScrollWebID)
  4. Have an Account for International Transactions
    Required if you later need to make additional (optional) service payments. Examples of accounts that can be used: Bank Jago, Wise, Payoneer, etc.
    I use Jago Syariah, if you want to follow then you can register here.

Cloudflare Zero Trust Feature Introduction

Cloudflare Zero Trust (or more precisely: CloudFlare Zero Trust) is a network security solution based on the principle of zero trust offered by CloudFlare to protect applications, devices and users from cyber threats.

Quoting from cloudflare's own website, Cloudflare Tunnel is tunnel software that allows you to quickly secure and encrypt application traffic to any type of infrastructure, so as to hide the IP address of the web server and block direct attacks.

What Is Cloudflare Zero Trust?

How Cloudflare Zero Trust Works

Cloudflare Zero Trust is today's security system that has many properties to. Enhance security with zero trust design.Secure access to internal and external applications without VPN Control and verify user & device access Protect personal information and accounts from risks such as email fraud, viruses, and unauthorized disclosure of information.

With Cloudflare Tunnel, you don't send traffic to an external IP - instead, a lightweight daemon in your infrastructure (‘cloudflared’) makes an outbound-only connection to Cloudflare's global network. Cloudflare Tunnel can connect servers:

  • Web (HTTP, HTTPS)
  • TCP
  • SSH
  • RDP
  • Samba
  • and others

Cloudflare Zero Trust Key Features

  1. Cloudflare Access
    Ditches old VPN in favor of identity-based access controls (Single Sign-On, MFA) for internal applications.
  2. Cloudflare Gateway
    DNS protection & content filtering to keep users off of the bad sites (think of it as the modern firewall for users).
  3. Browser Isolation
    Opens cloud-hosted sites (not directly on the user”s device) to prevent threats from the web.
  4. Device Posture Checks
    Restrict devices that do not comply with security policies (such as up to date antivirus) from accessing applications.
  5. SSO& IDP Integration Skilled Support
    Now, we’ve integrated Okta, Google Workspace, Microsoft Entra ID, etc
Cloudflare Zero Trust = Intelligent access control + user security + no VPN required + cloud-based.

Cloudflare Tunnel Network Design

Getting Local Servers Online with Cloudflare Zero Trust Tunnel

Register for a Cloudflare Account

If you don't have a zero trust account, you can follow these steps
  1. Go to website: https://dash.cloudflare.com/sign-up
  2. Enter:
    1. Active email
    2. Create a strong password
    3. Click Sign Up
  3. Verify email through the link sent by Cloudflare

Log in to Cloudflare Zero Trust Dashboard

  1. After login, go to the page: https://dash.teams.cloudflare.com
  2. You will be redirected to the Cloudflare Zero Trust dashboard
  3. Click “email account”

    Picture : Step 1

 Create and Setup a Zero Trust Account

  1. Enter the organization name (can be short, for example: tasikbase)
  2. Subdomain will be created automatically: namaperusahaanku.cloudflareaccess.com
  3. Click Next

    Picture : Step 2

  4. Choose a free plan



  5. Click Procced to Payment

  6. Click Payment Method


  7. Then fill in the payment method data according to the jago syariah bank account data that has been created. and fill in your personal data according to the available form. if done, click Next


Because the free funds in your jago account will not be reduced

Video Create Account Zero Trust and Tunnels

How to create a Tunnel to connect to your aaPanel Local server

  1. Click zero Trust in sidebar menu

    Dashboard Cloudflare

  2. Click Tunnels

    Dashboard Zero Trust

  3. Add a Tunnels


  4. Select Cloudflared and Input your Tunnel Name


  5. If it's like the picture below, the tunnel creation is complete, we just need to connect it to our local server


How to connect Cloudflare Tunnel to aaPanel


Since I am using an ubuntu VPS, then I select this debian button and it will issue a cloudflare installation code to connect to your aaPanel. if you are using a different VPS than me, then adjust to the available data.

Step Instalation

  1. Copy Code 

  2. Login to your VPS
  3. Paste Code in Your Terminal and wait instalation process
  4. If successful, it will appear like this

Tunnel Configuration

To configure a tunnel to connect to a website on your aapanel, you must know the IP Address for how to create a website on aapanel, you can click the guide below.
https://www.scrollwebid.com/2025/05/how-to-host-website-for-free-at-home.html

Subscribe My Blog

Comments