{
    "type": "article",
    "title": "A private network between my computers",
    "canonical": "https://www.dealmobile.co.uk/writing/a-private-network-between-my-computers",
    "path": "/writing/a-private-network-between-my-computers",
    "url": "https://www.dealmobile.co.uk/writing/a-private-network-between-my-computers",
    "markdown": "https://www.dealmobile.co.uk/writing/a-private-network-between-my-computers.md",
    "json": "https://www.dealmobile.co.uk/writing/a-private-network-between-my-computers.json",
    "summary": "Two Linux boxes, a Raspberry Pi, two phones and a tablet on one ZeroTier network: what runs over it, what broke, and the fallback to the home network when it is down.",
    "published": "2026-11-26T19:40:00+00:00",
    "modified": "2026-11-26T19:40:00+00:00",
    "image": {
        "url": "https://www.dealmobile.co.uk/sites/default/files/content/images/posts/a-private-network-between-my-computers/hero.png",
        "alt": "The box I carry reaches the box at home over ZeroTier, tried first, and over the home network, tried second. A line underneath says two phones, a tablet and a Raspberry Pi are on the same network."
    },
    "fields": {
        "image_dark": null
    },
    "tags": [
        {
            "name": "Linux",
            "url": "https://www.dealmobile.co.uk/writing/tag/linux",
            "json": "https://www.dealmobile.co.uk/writing/tag/linux.json"
        },
        {
            "name": "Security",
            "url": "https://www.dealmobile.co.uk/writing/tag/security",
            "json": "https://www.dealmobile.co.uk/writing/tag/security.json"
        }
    ],
    "body": {
        "html": "<p>Six of my devices sit on one <a href=\"https://www.zerotier.com\">ZeroTier</a> network: the two Linux boxes, a Raspberry Pi that never goes off, two phones and a tablet. Each has an address on it that stays the same wherever the device is, so <code>ssh</code> to the box at home is the same command from the next room as from anywhere else.</p>\n<p>ZeroTier is peer to peer. When two members can reach each other directly the packets go straight between them, and with both boxes in the house the private network costs nothing I can measure:</p>\n<pre><code>$ ping -c 10 -i 0.3 -q HOME_BOX\n10 packets transmitted, 10 received, 0% packet loss, time 2737ms\nrtt min/avg/max/mdev = 0.537/0.719/0.963/0.136 ms\n</code></pre>\n<h2 id=\"why-not-forward-a-port\">Why not forward a port</h2>\n<p>I don’t want sshd answering on my home address for every scanner to find, and the same goes for the desktops and the camera page. With ZeroTier a new device is one join and one approval from me, and the router isn’t involved.</p>\n<p>Because members talk to each other directly, nothing depends on the Pi being up. When it’s down the cameras and the alerts stop, and the two boxes carry on reaching each other.</p>\n<p>The cost is that membership is held by ZeroTier’s hosted controller, which is somebody else’s service and not something I can rebuild from my own repos.</p>\n<h2 id=\"what-runs-over-it\">What runs over it</h2>\n<p>Nearly everything between the two boxes: ssh, the heavy jobs <a href=\"/writing/two-linux-boxes-kept-in-step\">the box I carry sends to the one at home</a>, its nightly backup, which is a restic repository on the home box reached over sftp, and the hourly health checks, where each box reads the other’s last run. Syncthing uses it too, and the home network when both are on it.</p>\n<p>The phones and the tablet use it for ssh from Termux, for <a href=\"/writing/my-desk-from-a-phone-or-a-tablet\">the desktop</a>, for the camera page on the Pi and for the alerts the Pi pushes through ntfy.</p>\n<h2 id=\"what-went-wrong\">What went wrong</h2>\n<p>A newly joined phone lost its first pings to one box and then got 8 of 8. ZeroTier takes a moment to find a direct path.</p>\n<p>The Pi once lost its path to a phone and didn’t get it back until ZeroTier was restarted. Its five-minute check now covers that: if a machine that’s always on answers on the home network and not over ZeroTier, it restarts ZeroTier, at most once an hour.</p>\n<p>Android was the awkward member. It stops background apps to save battery, so ZeroTier and Termux are exempt from battery optimisation on all three devices, and one phone’s Android skin still stops ZeroTier from time to time. Android also allows one VPN at a time, so a phone running another VPN app is off the network until I switch.</p>\n<p>Rebuilding a machine nearly cost it its place. A node’s identity lives in <code>/var/lib/zerotier-one</code>, and a fresh install makes a new one, with a new address that would need approving and then changing everywhere the old one is written down. When I reinstalled the home box I stopped the service, put the old identity back from the old disk and started it again. It came up as the same member on the same address, and nothing else had to change.</p>\n<h2 id=\"when-its-down\">When it’s down</h2>\n<p>Most of my scripts reached the other box by its ZeroTier address only, so a stopped ZeroTier looked like a dead machine. The status and health checks now try ZeroTier with a five-second timeout, then the box’s name on the home network, and say that ZeroTier is down when they had to.</p>\n<p>I proved it by stopping ZeroTier on the box I carry and running the status command. It reached the home box over the home network in 13 seconds and named ZeroTier as the cause. With ZeroTier and the home network both gone, each box works on its own until one of them comes back.</p>"
    },
    "markdown_text": "---\ntitle: 'A private network between my computers'\ncanonical: 'https://www.dealmobile.co.uk/writing/a-private-network-between-my-computers'\nurl: 'https://www.dealmobile.co.uk/writing/a-private-network-between-my-computers'\ntype: Post\npublished: '2026-11-26'\nsummary: 'Two Linux boxes, a Raspberry Pi, two phones and a tablet on one ZeroTier network: what runs over it, what broke, and the fallback to the home network when it is down.'\n---\n\n# A private network between my computers\n\nPublished 2026-11-26\n\n![The box I carry reaches the box at home over ZeroTier, tried first, and over the home network, tried second. A line underneath says two phones, a tablet and a Raspberry Pi are on the same network.](https://www.dealmobile.co.uk/sites/default/files/styles/almanac_shot_md/public/content/images/posts/a-private-network-between-my-computers/hero.png.webp?itok=uSGey-wh)\n\nSix of my devices sit on one [ZeroTier](https://www.zerotier.com) network: the two Linux boxes, a Raspberry Pi that never goes off, two phones and a tablet. Each has an address on it that stays the same wherever the device is, so `ssh` to the box at home is the same command from the next room as from anywhere else.\n\nZeroTier is peer to peer. When two members can reach each other directly the packets go straight between them, and with both boxes in the house the private network costs nothing I can measure:\n\n```\n$ ping -c 10 -i 0.3 -q HOME_BOX\n10 packets transmitted, 10 received, 0% packet loss, time 2737ms\nrtt min/avg/max/mdev = 0.537/0.719/0.963/0.136 ms\n\n```\n\n## Why not forward a port\n\nI don’t want sshd answering on my home address for every scanner to find, and the same goes for the desktops and the camera page. With ZeroTier a new device is one join and one approval from me, and the router isn’t involved.\n\nBecause members talk to each other directly, nothing depends on the Pi being up. When it’s down the cameras and the alerts stop, and the two boxes carry on reaching each other.\n\nThe cost is that membership is held by ZeroTier’s hosted controller, which is somebody else’s service and not something I can rebuild from my own repos.\n\n## What runs over it\n\nNearly everything between the two boxes: ssh, the heavy jobs [the box I carry sends to the one at home](https://www.dealmobile.co.uk/writing/two-linux-boxes-kept-in-step.md), its nightly backup, which is a restic repository on the home box reached over sftp, and the hourly health checks, where each box reads the other’s last run. Syncthing uses it too, and the home network when both are on it.\n\nThe phones and the tablet use it for ssh from Termux, for [the desktop](https://www.dealmobile.co.uk/writing/my-desk-from-a-phone-or-a-tablet.md), for the camera page on the Pi and for the alerts the Pi pushes through ntfy.\n\n## What went wrong\n\nA newly joined phone lost its first pings to one box and then got 8 of 8. ZeroTier takes a moment to find a direct path.\n\nThe Pi once lost its path to a phone and didn’t get it back until ZeroTier was restarted. Its five-minute check now covers that: if a machine that’s always on answers on the home network and not over ZeroTier, it restarts ZeroTier, at most once an hour.\n\nAndroid was the awkward member. It stops background apps to save battery, so ZeroTier and Termux are exempt from battery optimisation on all three devices, and one phone’s Android skin still stops ZeroTier from time to time. Android also allows one VPN at a time, so a phone running another VPN app is off the network until I switch.\n\nRebuilding a machine nearly cost it its place. A node’s identity lives in `/var/lib/zerotier-one`, and a fresh install makes a new one, with a new address that would need approving and then changing everywhere the old one is written down. When I reinstalled the home box I stopped the service, put the old identity back from the old disk and started it again. It came up as the same member on the same address, and nothing else had to change.\n\n## When it’s down\n\nMost of my scripts reached the other box by its ZeroTier address only, so a stopped ZeroTier looked like a dead machine. The status and health checks now try ZeroTier with a five-second timeout, then the box’s name on the home network, and say that ZeroTier is down when they had to.\n\nI proved it by stopping ZeroTier on the box I carry and running the status command. It reached the home box over the home network in 13 seconds and named ZeroTier as the cause. With ZeroTier and the home network both gone, each box works on its own until one of them comes back.\n\n- **Tags:** [Linux](https://www.dealmobile.co.uk/writing/tag/linux.md), [Security](https://www.dealmobile.co.uk/writing/tag/security.md)\n\n---\n\nIndex of this site: [llms.txt](https://www.dealmobile.co.uk/llms.txt)\n"
}