This machine runs Claude Code only. All model inference happens on the Windows
machine (rizen) on your tailnet. No Ollama is installed here.
Model used: glm-5.2:cloud • Server: rizen (Windows, Ollama on port 11434)
These must already be true — you set them up earlier:
- Ollama is running with
OLLAMA_HOST=0.0.0.0:11434(listening on all interfaces). - Windows firewall allows inbound TCP 11434.
- Ollama is signed in to Ollama Cloud (
ollama signin) and the model is pulled:ollama pull glm-5.2:cloud rizenis online on the tailnet.
Open a terminal and run:
curl -fsSL https://tailscale.com/install.sh | shThis auto-detects your distro and installs the Tailscale client and daemon.
Bring Tailscale up:
sudo tailscale upIt prints a URL like https://login.tailscale.com/a/xxxxxxxx. Copy it into a browser
and sign in:
- Joining an existing tailnet (this machine should be on the same network as
rizen): sign in with the same account that ownsrizen. - New account: sign in with Google / GitHub / Microsoft / email — that creates your tailnet.
Once authenticated in the browser, the terminal command completes and this machine is on the tailnet.
Verify it can see the Windows box:
tailscale statusYou should see a line for rizen with a 100.x.y.z address, marked online.
If
rizenis not listed, the two machines are on different tailnets — sign in with the correct account, or share/invite as needed.
Test the full network path before installing anything else:
curl http://rizen:11434/api/tags- Returns JSON listing models → the tunnel works, continue.
- Hostname won't resolve → MagicDNS isn't enabled. Use the raw IP instead:
curl http://100.x.y.z:11434/api/tags(get the IP fromtailscale status). - Hangs / times out → Windows firewall is blocking 11434.
- Connection refused → Ollama on
rizenis still bound to localhost, not0.0.0.0.
Claude Code needs Node.js 18 or newer. Check what you have:
node --versionIf Node is missing or older than 18, install it (nvm is the easiest, distro-independent way):
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash
# restart the shell, then:
nvm install --ltsThen install Claude Code:
npm install -g @anthropic-ai/claude-codeConfirm it's installed:
claude --versionAdd these three environment variables to your shell profile so every session uses
rizen automatically. Open ~/.bashrc (or ~/.zshrc if you use zsh) and add:
export ANTHROPIC_BASE_URL=http://rizen:11434
export ANTHROPIC_AUTH_TOKEN=ollama
export ANTHROPIC_API_KEY=""If the
rizenhostname didn't resolve in Step 3, use the IP form instead:export ANTHROPIC_BASE_URL=http://100.x.y.z:11434
Reload the profile:
source ~/.bashrc # or: source ~/.zshrcSanity check the variables are set:
echo $ANTHROPIC_BASE_URL # should print http://rizen:11434From any project directory:
claude --model glm-5.2:cloudThat's it. Claude Code talks to Ollama on rizen over Tailscale, and rizen runs
the model via Ollama Cloud. Your GPU on rizen stays idle because :cloud inference
runs on Ollama's infrastructure — the Windows box is just the endpoint.
| Item | Value |
|---|---|
| Server hostname (tailnet) | rizen |
| Ollama port | 11434 |
| Base URL | http://rizen:11434 |
| Auth token | ollama |
| API key | (empty string) |
| Model | glm-5.2:cloud |
| Launch command | claude --model glm-5.2:cloud |
claudecan't connect / API errors → re-run thecurl http://rizen:11434/api/tagstest. If that fails, it's a network/Ollama problem onrizen, not Claude Code.- Works by IP but not by
rizen→ enable MagicDNS in the Tailscale admin console (DNS settings), or just keep using the100.x.y.zIP inANTHROPIC_BASE_URL. glm-5.2:cloudnot found → onrizen, runollama pull glm-5.2:cloudand make sure it's signed in withollama signin.- Env vars blank in a terminal → you edited the profile but didn't
sourceit, or opened the terminal before saving. Open a fresh terminal or re-runsource ~/.bashrc.