Install on macOS

Works on Intel and Apple Silicon Macs. Requires Homebrew.

1. Homebrew#

Skip this if brew --version works.

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

On Apple Silicon, run the two eval "$(/opt/homebrew/bin/brew shellenv)" lines Homebrew prints, or open a new terminal.

2. Cloudify#

curl -fsSL https://raw.githubusercontent.com/VickyDev810/Cloudify-Tunnel-Manager/main/install.sh | bash

Open a new terminal window, then check:

cloudify --version
cloudflared --version

Installer options: Install on Linux. What the installer does: The idea behind it.

If macOS asks to install the Command Line Tools, accept, then run the installer again. Without git: download the ZIP from GitHub, unpack it and run bash install.sh --local <unpacked-folder>.

Auto-start#

Tunnels start when you log in.

cloudify tunnel autostart web --status
launchctl list | grep cloudflare                                   # loaded agents
tail -f ~/Library/Logs/cloudflared-tunnel-web.error.log            # cloudflared writes its log here

Tunnels started by hand log to ~/.cloudflared/logs/web.log.

For a Mac with nobody logged in: turn on automatic login (System Settings → Users & Groups → Automatically log in as) or use Docker.

Run the dashboard as a service#

Replace YOU with your user name (whoami):

cat > ~/Library/LaunchAgents/com.cloudify.dashboard.plist <<'EOF'
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
  <key>Label</key>
  <string>com.cloudify.dashboard</string>
  <key>ProgramArguments</key>
  <array>
    <string>/Users/YOU/.local/bin/cloudify</string>
    <string>serve</string>
    <string>--secure</string>
  </array>
  <key>EnvironmentVariables</key>
  <dict>
    <key>PATH</key>
    <string>/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin</string>
  </dict>
  <key>RunAtLoad</key>
  <true/>
  <key>KeepAlive</key>
  <true/>
  <key>StandardOutPath</key>
  <string>/Users/YOU/Library/Logs/cloudify-dashboard.log</string>
  <key>StandardErrorPath</key>
  <string>/Users/YOU/Library/Logs/cloudify-dashboard.log</string>
</dict>
</plist>
EOF
launchctl load -w ~/Library/LaunchAgents/com.cloudify.dashboard.plist

Open http://localhost:8765. Stop it with launchctl unload -w ~/Library/LaunchAgents/com.cloudify.dashboard.plist.

Warning: without --secure the dashboard is open to your network over plain HTTP. Read Security first.

Notes#

  • Firewall: allow incoming connections for Python only to open the dashboard from other devices.
  • Sleep: a sleeping Mac disconnects its tunnels. Prevent sleep on a server (System Settings → Energy, or caffeinate -s).

Next steps#