Security
Cloudify controls your Cloudflare tunnels, DNS records and published services. Background: The idea behind it.
Dashboard#
By default cloudify serve and the Docker image listen on port 8765 of every interface, over plain HTTP. Passwords and login tokens then cross the network unencrypted.
- Run it in secure mode:
cloudify serve --secure(Docker:CLOUDIFY_SECURE=1). - On AWS or Azure, allow port 8765 only from your own IP address.
- Use
--allowed-hostpatterns only for a domain whose DNS you, or a provider you trust, control.
Remote access, most secure first:
| Option | How |
|---|---|
| SSH tunnel | Run with --secure. Then ssh -L 8765:localhost:8765 user@server and open http://localhost:8765. |
| Cloudflare Access | Run with --secure. Add a route dash.example.com to localhost:8765 and protect it with an Access application (Zero Trust → Access → Applications, allow only your e-mail). |
| HTTPS on your network | cloudify serve --ssl-certfile cert.pem --ssl-keyfile key.pem. Add --secure --host 0.0.0.0 to accept only known names. |
| Plain HTTP (default) | cloudify serve. Only behind a TLS proxy or on a network you fully trust. |
Users#
- The first account needs the one-time setup code that
cloudify serveprints on its console (docker logs cloudifyin Docker). - For scripted installs, set
CLOUDIFY_SETUP_CODEto a long random value. - Every account can do everything. Give accounts only to people you would give your Cloudflare account to.
- Use long passwords. There is no password reset: see Files and data.
- Changing a password signs out every other session.
Secrets on disk#
Everything is in ~/.cloudflared.
chmod 700 ~/.cloudflared
- Never commit
~/.cloudflared, put it in an image, or paste its files into issues. - Backups contain the same secrets. Protect them too.
Replica files#
- Use a long passphrase (8 characters minimum).
- Send the file and the passphrase separately.
- Delete the file after importing it.
- Import only files you exported yourself.
Cloudflare API token#
- Create it with the Edit zone DNS template, limited to the one zone it is for.
- Optionally restrict it to your server's IP address (Client IP Address Filtering) and give it an expiry date.
What you publish#
- Every route is reachable from the internet, without a login unless the service has one.
- For private services, add a Cloudflare Access policy to the hostname (Zero Trust → Access → Applications).
- Temporary tunnels (
cloudify -p) are public too. Stop them when done: Ctrl+C, orcloudify temp stop.
SSH sharing#
cloudify -ssh host gives a shell as your user to whoever has both the access code and the password. Ctrl+C ends it. See SSH sharing.
Installer#
Pin a released version with --branch v2.1.0 instead of main.
Docker#
- All secrets are in the
/root/.cloudflaredvolume. Protect it and its backups like~/.cloudflared. - The dashboard is open on port 8765 of every interface by default. Set
CLOUDIFY_SECURE=1. - For HTTPS:
CLOUDIFY_SERVE_ARGS: "--ssl-certfile /certs/cert.pem --ssl-keyfile /certs/key.pem".
See Docker.
Safety check#
safety-check.sh lists what on this machine is reachable through Cloudflare, and can stop it. It works without Cloudify, on Linux, macOS and WSL.
curl -fsSL https://raw.githubusercontent.com/VickyDev810/Cloudify-Tunnel-Manager/main/safety-check.sh | bash
Without options it only lists: temporary and persistent tunnels, SSH sharing, outgoing connections, dashboards, auto-start entries and installed programs.
| Option | What it does | Asks first |
|---|---|---|
--kill |
Stops temporary tunnels, SSH sharing and outgoing sessions | no |
--kill-all |
Also stops persistent tunnels and the dashboard | yes |
--remove |
Stops everything, removes auto-start entries, uninstalls Cloudify and cloudflared | yes |
--remove --purge |
Also deletes ~/.cloudflared and /etc/cloudflared |
you type delete |
-y, --yes |
Skips the questions. Without a terminal, --kill-all and --remove need it |
- Only your own processes are stopped.
sudostops other users' too. - Do not use
sudowith--remove. It would remove root's installation. - Docker containers are listed but not stopped. Use
docker compose -f docker/docker-compose.yml down, anddocker volume rm cloudify-datato delete the data. --purgedeletes local keys only. Tunnels and DNS records stay in Cloudflare. Delete them first withcloudify tunnel delete NAME.
Reporting a vulnerability#
Report privately through GitHub's Report a vulnerability, not in a public issue. See SECURITY.md.