1
Cloudflare Tunnel Setup
gtadmin edited this page 2026-01-10 03:24:00 +00:00

Cloudflare Tunnel Setup

You can set up a Cloudflare Tunnel on the host where you are running GT AI OS which lets you access your private AI from anywhere on the internet with built in two factor authentication (2FA).

Table of Contents


What You Need Before Starting

  • A free Cloudflare account (sign up at https://cloudflare.com)
  • A domain name accessible to Cloudflare (see Pro Tip below).

Pro Tip:

It's easiest to just register a domain in Cloudflare itself. You can register a primary domain and then add sub domains as needed for control panel access or additional tenants. You can get a low cost domain there for around $10.


Step 1: Create a Tunnel

  1. Go to the Cloudflare Zero Trust Dashboard: https://one.dash.cloudflare.com/
  2. If prompted, select your account
  3. In the left sidebar, click Networks
  4. Click Tunnels
  5. Click the Create a tunnel button
  6. Choose Cloudflared and click Next
  7. Give your tunnel a name like gt-ai-os and click Save tunnel

Step 2: Install the Tunnel Software

After creating the tunnel, Cloudflare shows you install commands. You must run TWO separate commands - one to install cloudflared, and one to install the service.

Ubuntu Linux 24.04 (x86_64)

  1. Look for the Debian tab on the Cloudflare page
  2. You will see two commands:
    • Command 1: Downloads and installs cloudflared (e.g., curl -L ... && sudo dpkg -i ...)
    • Command 2: Installs and starts the service (e.g., sudo cloudflared service install eyJhI...)
  3. Open Terminal
  4. Copy and run Command 1 first, wait for it to complete
  5. Copy and run Command 2 second

NVIDIA DGX OS 7 (Grace Blackwell Architecture)

  1. Look for the Debian tab on the Cloudflare page
  2. You will see two commands:
    • Command 1: Downloads and installs cloudflared (e.g., curl -L ... && sudo dpkg -i ...)
    • Command 2: Installs and starts the service (e.g., sudo cloudflared service install eyJhI...)
  3. Open Terminal
  4. Copy and run Command 1 first, wait for it to complete
  5. Copy and run Command 2 second

macOS (Apple Silicon M1+)

  1. Look for the macOS tab on the Cloudflare page
  2. You will see two commands:
    • Command 1: Installs cloudflared (e.g., brew install cloudflared)
    • Command 2: Installs and starts the service (e.g., sudo cloudflared service install eyJhI...)
  3. Open Terminal on your Mac
  4. Copy and run Command 1 first, wait for it to complete
  5. Copy and run Command 2 second

Important: Both commands are required. The first installs the software, the second connects it to your tunnel.

How to know it worked: Go back to the Cloudflare dashboard. Under your tunnel, you should see "Connected" with a green dot.


Step 3: Set Up Your Web Addresses

Now you'll tell Cloudflare which addresses should connect to GT AI OS.

Add the main app:

  1. On the tunnel page, click Add a public hostname
  2. Fill in:
    • Subdomain: app (or whatever you want, like ai)
    • Domain: Select your domain from the dropdown
    • Type: HTTP
    • URL: localhost:3002
  3. Click Save hostname

Add the admin panel:

  1. Click Add a public hostname again
  2. Fill in:
    • Subdomain: admin
    • Domain: Select your domain
    • Type: HTTP
    • URL: localhost:3001
  3. Click Save hostname

Step 4: Update GT AI OS Settings

Tell GT AI OS about its new public web address:

  1. Open the Control Panel: http://localhost:3001
  2. Log in with gtadmin@test.com / Test@123
  3. Click Tenant in the left sidebar (this is the landing page)
  4. Click on your tenant name
  5. Find the App URL field
  6. Change it to your new address (for example: https://app.yourdomain.com)
  7. Click Save

You're Done!

Your GT AI OS is now accessible from anywhere:

  • Main App: https://app.yourdomain.com
  • Admin Panel: https://admin.yourdomain.com

To check that everything is working, go to the Cloudflare dashboard and look at Networks > Tunnels. Your tunnel should show "Connected" with a green dot.