The idea behind it
This page explains how Cloudify works and why it is built that way. You need none of it to use Cloudify; the guides start at Getting started.
How a tunnel works#
Cloudify publishes services that run on your machine, such as a website on localhost:3000, a container or an SSH shell, without opening ports in your firewall or router.
The work is done by cloudflared, Cloudflare's connector program. It runs on your machine and keeps outbound connections to Cloudflare open. Visitors connect to Cloudflare, and their requests reach your service through those connections. Cloudflare provides the HTTPS certificate. Cloudify starts and supervises cloudflared.
Nothing connects inward. Only the dashboard listens on a port.
The words Cloudify uses#
| Term | Meaning |
|---|---|
| Temporary tunnel | A random https://<words>.trycloudflare.com address for a local port. No account, no domain, gone when stopped. |
| Tunnel | A permanent connector created in your Cloudflare account. One tunnel can publish many hostnames. |
| Route | One public hostname (app.example.com or *.example.com) mapped to a local service. |
| Connected domain | The authorization Cloudify gets when you log in to Cloudflare and pick a domain. You can connect many, also from different accounts. |
| Replica | The same tunnel running on another machine. |
| Auto-start | The tunnel starts again by itself after a reboot. |
| Dashboard | The web interface started with cloudify serve. Everything it does is also available on the command line. |
Adding a route writes the tunnel's configuration, creates the DNS record and restarts the tunnel.
cloudflared can create DNS records but cannot delete them, so a removed route leaves a record behind. With a Cloudflare API token, Cloudify cleans up, and it only deletes a CNAME that points at that exact tunnel. Without a token it never deletes DNS records.
What the installer does#
One script covers the common Linux distributions and macOS. It asks no questions and can be run again at any time to repair or update.
- If Cloudify is already installed, it backs up the settings and replaces the program.
- It installs missing prerequisites (Python, pipx, git) with your package manager, or with Homebrew on macOS.
- It installs or updates cloudflared for your CPU.
- It installs Cloudify in its own isolated environment. Nothing goes into the system Python.
- It puts
cloudifyon your PATH.
Tunnels and settings live in ~/.cloudflared. Installing, updating and uninstalling never touch that folder. Tunnels are cloudflared processes, separate from the Cloudify program, so they keep running through an update.
To do this: Linux, macOS, Windows, Updating
Starting at boot#
Cloudify picks the mechanism that fits the system.
| System | Mechanism | Starts |
|---|---|---|
| Linux with systemd | user service, plus linger | at boot, without logging in |
| Linux without systemd | @reboot line in your crontab |
at boot |
| macOS | LaunchAgent | when you log in |
| Windows | scheduled task | when you log in |
| Docker | restart policy, plus cloudify tunnel resume at container start |
when Docker starts |
On Linux these are user services, so no root is needed. Linger lets them start when nobody is logged in.
Auto-start covers tunnels only. The dashboard needs its own service, or Docker.
Docker: one network, no ports#
At every start the container resumes all auto-start tunnels, then runs the dashboard as its main process. A volume on /root/.cloudflared holds logins, credentials, configs and users, so data survives re-creating or upgrading the container.
A route's service host is resolved where Cloudify runs. Put Cloudify and your app containers on one shared Docker network and a route can point at a container by name, such as http://my-container:80. Nothing needs to be published on the host.
The compose file that ships with Cloudify uses host networking instead. There localhost is the Docker host, so routes reach host services and published container ports as localhost:PORT. The dashboard is then on port 8765 of every server interface by default.
To do this: Docker
How the dashboard is protected#
Whoever controls the dashboard controls your tunnels, DNS records and published services, so it should stay private.
By default it listens on every interface, answers under any address and uses plain HTTP unless you give it a certificate. Anyone who can reach the port can open the login page, and passwords cross the network unencrypted. cloudify serve warns about this at start.
--secure changes both defaults. The dashboard then listens on this machine only and answers only to known names, such as localhost, the hostnames of your routes and names you allow.
Other protections:
- The first account needs a one-time setup code printed on the server's console, so nobody else can claim a new installation.
- Requests that change something are refused when they come from another site. Login tokens are not cookies, so the browser never sends them automatically.
- Sessions last up to 7 days. They end on sign-out, on a password change, and when the dashboard restarts.
There are no roles: every account can do everything. With Cloudflare Access in front of a route to the dashboard, nobody reaches the login page without passing Access.
To do this: Dashboard
Secrets and files#
Everything Cloudify knows is in ~/.cloudflared, cloudflared's own folder. Auto-start entries are the exception. They live in the system, and cloudify tunnel resume recreates them after a restore.
Some files in that folder are secrets:
<tunnel-id>.jsonlets its holder run your tunnel.cert.pemand the certificates of extra domains allow creating and deleting tunnels and DNS records for that domain's account.cloudify/accounts.jsoncontains the DNS cleanup tokens.
To do this: Files and data
SSH sharing#
SSH sharing gives someone temporary shell access to a machine behind NAT. It needs no open ports and no Cloudflare account. It runs through a temporary tunnel, and Cloudify brings its own SSH server.
The host prints an access code and a password. The code contains the tunnel address and a one-time private key, encrypted with the password. The host accepts only that key and never accepts passwords, so the password cannot be guessed over the network. The code also pins the host's key.
Keys and password are new for every share and exist only in memory on the host. Ctrl+C ends everything. The remote gets the same rights as the user who shares, so sharing as root is discouraged.
To do this: SSH
Redundancy#
Run the same tunnel on several machines and Cloudflare spreads traffic across them and skips one that goes down.
A second machine needs no Cloudflare login. An export file carries the tunnel's credentials, encrypted with a passphrase. Import only files you exported yourself, because the file decides which local services the tunnel forwards to.
Routes are managed on the first machine. After a route change, replicas need a fresh export and import.
The security review#
In November 2026 Cloudify was audited with Cloudflare's open-source security-audit skill. The audit raised 31 possible problems, and an independent reviewer re-checked each one.
15 were confirmed: 1 high, 8 medium and 6 low. The rest could not be proven without a real deployment, or had no security impact. All 31 are fixed.
The high finding was that a malicious SSH access code could run commands on the connecting computer. The remote now checks every field of the code before using it.
Two of the fixes apply only in secure mode, because the dashboard is open to the network by default. The audit looked at the code before the fixes; the fixes were tested, not audited again.
Full details: Security