Home services

How to reach the machines and apps at home from anywhere. Everything goes through Cloudflare, so nothing at home is open to the internet. Your email has to be on the allowed list, and you'll be asked to sign in the first time.

AddressWhat it isHow to use it
ssh.dingyangyao.comA terminal on the home MacSSH
vnc.dingyangyao.comThe home Mac's screenScreen Sharing
models.dingyangyao.comThe localLLM app and its model APIslocalLLM

1. Install cloudflared

SSH and Screen Sharing need Cloudflare's small cloudflared program on the computer you connect from. It carries the connection over HTTPS and handles the sign-in. You only need it once per computer. The localLLM page works in any browser without it.

With Homebrew:

brew install cloudflared

Debian / Ubuntu (other systems: see Cloudflare's downloads page):

curl -L -o cloudflared.deb https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64.deb
sudo dpkg -i cloudflared.deb

In PowerShell:

winget install --id Cloudflare.cloudflared

Then find where it was installed. You'll need this path in the next step:

which cloudflared
where.exe cloudflared

2. SSH

One-time setup

Add this to ~/.ssh/config (create the file if it doesn't exist). Replace the path with what which cloudflared printed:

Host ssh.dingyangyao.com
  ProxyCommand /opt/homebrew/bin/cloudflared access ssh --hostname %h

Add this to %USERPROFILE%\.ssh\config (create the file if it doesn't exist, with no file extension). Replace the path with what where.exe cloudflared printed:

Host ssh.dingyangyao.com
  ProxyCommand "C:\Program Files (x86)\cloudflared\cloudflared.exe" access ssh --hostname %h

Connect

ssh YOUR-USERNAME@ssh.dingyangyao.com

The first time, a browser window opens to sign in. After that, ssh works like normal until the sign-in expires.

No setup: from a browser or phone

Open https://ssh.dingyangyao.com, sign in, and you get a terminal in the browser.

Why the extra step? ssh.dingyangyao.com points at Cloudflare, not at the home Mac, and Cloudflare only accepts web traffic there. A plain ssh just hangs at “Connecting to … port 22”. The ProxyCommand line hands the connection to cloudflared, which carries it to the Mac over HTTPS.

3. Screen Sharing

Start a local forward and leave it running in a terminal window:

cloudflared access tcp --hostname vnc.dingyangyao.com --url localhost:5901

Then point a VNC viewer at localhost:5901:

Finder → Go → Connect to Server (⌘K), then enter:

vnc://localhost:5901

Use any VNC viewer (for example TigerVNC or RealVNC Viewer) and connect to localhost:5901.

Sign in with the home Mac's username and password. Stop the forward with Ctrl-C when you're done.

4. localLLM

Open https://models.dingyangyao.com in a browser and sign in. It's the same app as on the home Mac: images, video, music and chat.

From scripts

The model servers' APIs (OpenAI-style) are under https://models.dingyangyao.com/s/SERVER/…. Requests need a Cloudflare sign-in token, so the easiest way to call them is through cloudflared:

cloudflared access login https://models.dingyangyao.com
cloudflared access curl https://models.dingyangyao.com/s/SERVER/v1/models

Replace SERVER with the name of a running server.

Troubleshooting

What you seeWhat to do
ssh hangs at “Connecting to ssh.dingyangyao.com port 22” The ProxyCommand isn't being used. Check that the entry is in the .ssh/config on this computer and that the Host line matches exactly. ssh -G ssh.dingyangyao.com | grep -i proxycommand should print it.
No such file or directory / exit code 127 The path to cloudflared in the config is wrong, or it isn't installed.
websocket: bad handshake Sign in again: cloudflared access login https://ssh.dingyangyao.com. If it keeps failing, update cloudflared.
“That account does not have access” Your email isn't on the allowed list yet. Ask to be added.
Nothing answers at all The home Mac may be asleep, off or offline.