Cockpitsetup

Reach your Mac from your car

Cloudflare Tunnel + noVNC, on your own Mac. No port forwarding, no proxy. Takes about 10 minutes. Free.

1What you need

2Run the setup script

git clone https://github.com/cankilic-gh/cockpit.git
cd cockpit
bash scripts/setup-mac.sh

The script installs cloudflared, websockify, and noVNC; creates a Cloudflare Tunnel; routes a subdomain you pick to it; and registers both processes as launchd services so they survive reboots.

Open scripts/setup-mac.sh and change the DOMAIN variable to your own subdomain (e.g. mac.example.com) before running.

The script will open your browser once to log into Cloudflare. Pick the zone that matches your subdomain.

3Turn on macOS Screen Sharing

  1. System Settings → General → Sharing → Screen Sharing ON
  2. Click the ℹ next to Screen Sharing → “Allow access for: Only these users”
  3. Add your user account
  4. Lock Screen → “Turn display off when inactive” → Never (or use caffeinate -d when connecting)

4Add a Google login wall (recommended, free)

Without this, anyone who finds your subdomain can reach the VNC password prompt. With Cloudflare Access, only the Google account you allow can even see the page.

  1. Open Cloudflare Zero Trust and pick a team name (e.g. your initials)
  2. Access Controls → Identity providers → Add newGoogle → leave Client ID/Secret blank → Save
  3. Access Controls → Applications → Add an applicationSelf-hosted
  4. Name it, set subdomain to your mac subdomain, identity provider Google
  5. Add a policy: action Allow, Include → Emails → your Gmail address

5Test

Open https://your-subdomain.example.com on your laptop first.

  1. Cloudflare Access prompts for Google login — sign in with your allowed email
  2. noVNC loads. Click Connect
  3. Enter your Mac login user and password (ARD authentication)
  4. You see your Mac’s screen

Then open the same URL from your car’s browser. Bookmark it.

For a self-hosted Cockpit launcher pointing at your own Mac, fork this repo, edit the mac URL in index.html to your subdomain, and deploy to Vercel.

Troubleshooting

“Error 1033” / “Tunnel has no active connection”

The cloudflared service ran without arguments. Re-run bash scripts/setup-mac.sh — it patches the launchd plist (a known bug in cloudflared 2026.3 service install).

VNC connects but only the top-left of the screen appears

Add ?resize=scale to the URL, or use the noVNC settings panel to change Scaling mode to Local Scaling.

Can’t type the password on Tesla

Tesla’s on-screen keyboard cannot send keystrokes into VNC. The Cockpit launcher you visit from cockpit.thegridbase.com includes a custom keyboard overlay built for this case. Use that, not Tesla’s.

Voice dictation does nothing

Your browser must grant microphone permission. On Tesla, allow microphone for the noVNC origin in browser settings.

Uninstall

sudo cloudflared service uninstall
launchctl unload ~/Library/LaunchAgents/com.cockpit.websockify.plist
rm -rf ~/.cockpit-mac/novnc ~/Library/LaunchAgents/com.cockpit.websockify.plist ~/.cloudflared
← Back to Cockpit