Working remotely (terminal + VNC)
Driving the machine from your Mac or your Windows PC: the terminal for everything, and a VNC graphical desktop for when you need one. The right apps, the right config.
In this guide
Guide checked 3 months ago: some commands may have changed. Let us know if so.
In short
To drive the mini-PC from a Mac, a Windows PC or a phone, an SSH terminal over Tailscale covers almost everything: you run your agent there, inside a tmux session that survives network drops. A VNC graphical desktop helps for the rare visual needs, as long as it goes through an SSH tunnel and never straight onto the Internet. With a claude.ai subscription, Remote Control also lets you follow and steer a Claude Code session from the Claude app on your phone.
Do this first: Tailscale: your private networkSecuring access
Your machine is reachable from anywhere thanks to Tailscale. What’s left is to settle in comfortably from your everyday machine, Mac or Windows. Good news: there are two ways to work remotely, and one of them covers 95% of cases.
- The terminal, via SSH. Light, fast, this is where you’ll spend most of your time. You type commands (or you chat with your agent), the machine responds. A few kilobytes over the network, it works even on a struggling 4G connection.
- The graphical desktop, via VNC. For the rare moments when you really need an interface: opening a browser on the machine, working a graphical tool. Heavier, to be kept for cases where the terminal isn’t enough.
We’ll set up both. But keep the ratio in mind: you’ll live in the terminal, you’ll visit the graphical desktop.
The terminal: your control station
SSH is built in everywhere, but a good terminal app makes daily life noticeably more pleasant, tabs, search, clean copy-paste, connection profiles.
On macOS
Apple’s Terminal is enough to get started. For comfort, two solid free picks: iTerm2 (the classic, fully loaded) or Tabby (modern, cross-platform). Either way, the connection command is the same:
ssh ulrich@mini # 'mini' = your machine's MagicDNS name
On Windows
On Windows 11, Windows Terminal is already there: it’s the default terminal. Otherwise it’s a free install from the Microsoft Store. The OpenSSH client is built into Windows, so there’s nothing else to install to connect:
ssh ulrich@mini
If you prefer, Tabby works great on Windows too.
On phone and tablet
To drive your machine from an iPhone, an iPad or an Android, look at Termius: cross-platform (Mac, Windows, iOS, Android), a polished interface, with connections and keys synced across your devices. It’s the most comfortable option when you don’t have a physical keyboard on hand.
Driving Claude Code from your phone: Remote Control
If you use Claude Code with a claude.ai subscription (Pro, Max, Team or Enterprise), there’s something more comfortable than a terminal on a small screen: Remote Control. The session runs on the mini-PC, and you follow and steer it from the Claude app (iOS, Android) or from claude.ai/code. Your files, tools and MCP servers stay on the machine; the phone is just a window onto it.
# In the project folder, ideally inside a tmux session (see below)
claude remote-control
# Prints the session URL; the spacebar shows a QR code to scan
Inside a Claude Code session that’s already open, the /remote-control command (or /rc) does the same. Network-wise there’s nothing to open: the machine only makes outbound requests to Anthropic, so you don’t even need Tailscale for this.
Two limits to know. The machine has to stay on and the claude process has to keep running, which is where tmux comes in. And it doesn’t work with an API key, nor when Claude Code goes through another endpoint (an ANTHROPIC_BASE_URL variable pointing to a local model, for example). The official docs cover the rest.
Keeping your session alive with tmux
An SSH connection drops (Wi-Fi flaking out, a train in a tunnel), and everything running in that terminal stops, your agent included. tmux fixes that: the session lives on the machine, independent of your connection. Network gone? You reconnect and find everything exactly as you left it. The package was installed in the System settings step (otherwise: sudo apt install tmux).
0 of 3 steps done Your ticks stay in this browser.
-
Open a named session
tmux new -s agent # creates a session named "agent" and puts you inside itThen start your agent (
claudeoropencode) inside it. Get into the habit of one session per project, with a meaningful name: you’ll always know where you are. -
Detach without stopping anything
Press Ctrl + B, release, then D. You leave the session, it keeps running. Closing the terminal or losing the network has the same effect: nothing stops.
-
Take back control, from anywhere
tmux ls # lists the sessions open on the machine tmux attach -t agent # reattaches you to the "agent" sessionFrom the laptop, the phone or another computer: it’s the same session, down to the character.
The graphical desktop: VNC, and only when you need it
Sometimes the terminal isn’t enough: you want a real browser on the machine, or a tool that only exists as a graphical version. That’s VNC’s job, it sends the machine’s screen back to your machine.
On the mini-PC side: setting up the VNC server
Several servers exist (wayvnc for Wayland, x11vnc for the simplest). The most turnkey remains TigerVNC, which creates a dedicated virtual desktop, no need for a screen plugged into the machine:
# Install TigerVNC
sudo apt install -y tigervnc-standalone-server tigervnc-common
# Launch a virtual desktop, accessible ONLY locally
vncserver :1 -localhost yes
The -localhost yes is the detail that matters. It tells the server: only accept connections from the machine itself, never directly from the network. We’ll reach it through the Tailscale/SSH tunnel, which shuts the door on prying eyes. On first launch, TigerVNC asks you for a session password, pick a strong one.
On your machine’s side: tunnel, never expose
Absolutely no opening of the VNC port (5900/5901) directly. We route it through the SSH tunnel, which itself travels over your private Tailscale network:
# Create a tunnel: local port 5901 points to the machine's 5901
ssh -L 5901:localhost:5901 ulrich@mini
As long as this command is running, your machine has a local door (localhost:5901) that opens, encrypted, onto the machine’s VNC desktop.
On your machine’s side: the VNC viewer
- macOS has a built-in client. In the Finder, press Cmd + K and enter
vnc://localhost:5901. Otherwise, RealVNC Viewer (free, cross-platform) does the job nicely. - Windows: RealVNC Viewer or TightVNC Viewer. You point the viewer at
localhost:5901, that’s your end of the tunnel.
In reality, you’ll rarely open the desktop
A small honest reframe to finish. Once your coding agent is installed, the overwhelming majority of remote work is: SSH + your agent (Claude Code or OpenCode) running in the terminal. You describe what you want, it reads, writes, runs, fixes. No mouse, no windows, no graphical latency.
VNC stays there for the exceptions, a browser to drive visually, an interface debug. But don’t be surprised to go weeks without opening it. The terminal is 95% of the time, and that’s for the best: it’s faster, lighter, and it works even when the network is coughing.
All the commands in this guide
Frequently asked questions
Which terminal app should I use to SSH in from a Mac or a Windows PC?
On a Mac, Apple's Terminal is enough to get started; iTerm2 or Tabby, both free, add comfort. On Windows 11, Windows Terminal is already installed and the OpenSSH client is built into the system, so there's nothing else to add. On an iPhone, iPad or Android device, Termius is the most comfortable option without a physical keyboard.
Do my tmux sessions survive a reboot of the mini-PC?
No. tmux protects you from network drops, but its sessions disappear when the machine restarts, for instance after a kernel update or a power cut. You then have to start them again. For a task that must run on its own and come back after a reboot, a scheduled service is a better fit.
Which VNC server should I install on the mini-PC?
The most turnkey is TigerVNC: it creates a dedicated virtual desktop, with no screen plugged into the machine. Start it with the -localhost yes option so it only accepts connections from the machine itself, and pick a strong session password the first time it runs. wayvnc (for Wayland) and x11vnc are other options.
How do I open the mini-PC's VNC desktop from a Mac or a Windows PC?
First open an SSH tunnel with ssh -L 5901:localhost:5901 ulrich@mini and leave the command running. On a Mac, press Cmd + K in the Finder and enter vnc://localhost:5901, or use RealVNC Viewer. On Windows, point RealVNC Viewer or TightVNC Viewer at localhost:5901.
Does Remote Control work with an API key or a local model?
No. Remote Control requires a claude.ai subscription (Pro, Max, Team or Enterprise) and works neither with an API key nor when Claude Code goes through another endpoint, such as an ANTHROPIC_BASE_URL variable pointing to a local model. The machine also has to stay on and the claude process has to keep running, which is why it's worth starting it inside tmux.
Terms in this guide: SSHAgentClaude CodeRemote ControlMCPTailscaletmuxAPI keyOpenCode
Spotted a mistake?
A command stopped working, a price changed?
Tools change every month. Tell me what is wrong in this chapter and I will fix it and update its date.