Set up, rent, manage, and troubleshoot Horizon Device Sync homes and away devices over Tailscale. Use when the person asks to rent a cloud Horizon home, turn a Linux or macOS machine into a home (horizon home), connect devices over Tailscale, generate or revoke pairing codes, or fix Device Sync discovery and Tailscale ACL issues. Works with horizon-machines for cloud VM creation and Tailscale joining, verifies release checksums before installing Horizon, never prints secrets, and always confi...
726 stars
0 votes
0 copies
0 views
Added December 4, 2026
ai-agentsgosqlawsgcpazuregit
Works with
terminal
cli
Security analysis
F17/100
mediumUses curl or wget to download content
criticalAccesses sensitive system or user directories
criticalModifies startup scripts or system services for persistence
criticalExfiltrates credentials via HTTP — exact pattern from Snyk ToxicSkills study
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Horizon Sync?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/peters-horizon-sync)
---
name: horizon-sync
description: >-
Set up, rent, manage, and troubleshoot Horizon Device Sync homes and away devices over
Tailscale. Use when the person asks to rent a cloud Horizon home, turn a Linux or macOS
machine into a home (horizon home), connect devices over Tailscale, generate or revoke
pairing codes, or fix Device Sync discovery and Tailscale ACL issues. Works with
horizon-machines for cloud VM creation and Tailscale joining, verifies release checksums
before installing Horizon, never prints secrets, and always confirms paid cloud resources
or destructive actions first.
---
# Horizon Device Sync
Use this skill to make setting up and operating Horizon **Device Sync** fast and
safe across a person's Linux desktops, Macs, and rented cloud VMs.
## The model
- **One home, one or more away devices.** One computer is the **home** — it
stays on and runs the terminals, coding agents, machines, and the in-process
sync hub (`~/.horizon/sync-home.sqlite`, mode `0600`). Each other computer is
an **away device** that shows one home board at a time and forwards actions to
it. Horizon never merges boards; use Git to move work between computers.
- **Tailnet transport, loopback + tailnet binding only.** A home listens only on
`127.0.0.1` and on its Tailscale address(es) on port `8787` by default (never
`0.0.0.0`). The tailnet encrypts the `ws://` link; never expose port `8787` on
a public cloud firewall.
- **No separate hub required.** Both desktop Horizon (**Sync → Make this the
home**) and headless `horizon home` run the hub inside the Horizon process.
A standalone `horizon-hub` server stays available under **Device Sync →
Advanced setup** for setups without a tailnet.
- **8-character single-use pairing codes.** Each code encodes the device role
(**Full access** or **View & approve**), expires after 10 minutes, works once,
and locks out all active codes after 20 failed attempts.
## Choose the workflow
| What the person wants | Where to go |
|---|---|
| Rent a new cloud VM, join it to Tailscale, and run it as a Horizon Home | Follow [cloud-home](references/cloud-home.md) together with the `horizon-machines` skill |
| Turn an existing Linux or macOS machine into a Horizon Home over SSH | Follow [Set up an existing machine as a home](#set-up-an-existing-machine-as-a-home) below |
| Pair a new away device, list devices, revoke access, or stop a home | Follow [Manage a running home](#manage-a-running-home) below |
| Fix discovery, `Cannot reach <home>`, Tailscale ACLs, or service persistence | Follow [Troubleshoot Device Sync](#troubleshoot-device-sync) below |
## Set up an existing machine as a home
Use this flow when the person already has a Linux computer or Mac reachable over
SSH and wants it to act as a headless Horizon Home (`horizon home`).
1. **Inspect the remote machine (read-only).** Confirm OS/arch (`uname -sm`),
whether `horizon` is already installed and supports `horizon home --help`,
and whether Tailscale is running:
- Linux: `tailscale status --json`
- macOS (non-interactive SSH often omits `/opt/homebrew/bin` and the app
bundle): check `tailscale`, `/opt/homebrew/bin/tailscale`,
`/usr/local/bin/tailscale`, and
`/Applications/Tailscale.app/Contents/MacOS/Tailscale`.
Do not modify local Tailscale state on this computer (`tailscale up`, `down`,
`login`, `logout`, `switch`, or `set`).
2. **Install or update `horizon` if missing or older than `horizon home`.**
- Prefer the matching pre-built GitHub Release tarball from
`https://github.com/peters/horizon/releases/latest/download/`
(`horizon-linux-x64.tar.gz`, `horizon-osx-arm64.tar.gz`, or
`horizon-osx-x64.tar.gz`) **after verifying its SHA-256 against
`SHA256SUMS.txt`**, then install atomically (`horizon.new` + `mv`) to
`~/.local/bin/horizon` (Linux) or `~/bin/horizon` (macOS) with mode `0755`.
- Confirm `horizon home --help` exits `0`. If the latest published release
predates Device Sync (for example `v0.2.7`), follow the pre-release fallback
in [cloud-home](references/cloud-home.md#5-install-horizon-verified-checksum-or-source-fallback)
(copy a compatible locally built binary or build `cargo build --release -p horizon-ui`
with the person's confirmation).
3. **Start the home service and confirm persistence.**
- Run `horizon home` (add `--port <port>` only if `8787` is already taken on
that machine).
- On Linux, `horizon home` installs and enables
`~/.config/systemd/user/horizon-home.service` and attempts
`loginctl enable-linger`. Check
`loginctl show-user "$USER" -p Linger --value`; if it is not `yes`, run
`loginctl enable-linger "$USER"` (or `sudo -n loginctl enable-linger "$USER"`
when permitted) so the home stays on after SSH logout and reboot.
- On macOS, `horizon home` installs and loads
`~/Library/LaunchAgents/io.horizon.home.plist` (`RunAtLoad` + `KeepAlive`).
- If another Horizon GUI window already holds that `HORIZON_HOME`, tell the
person to click **Sync → Make this the home** in that window instead of
killing their desktop session unasked.
4. **Verify reachability from this computer before handing over the code.**
- Extract the remote Tailscale IPv4 (`<ts-ip>`) and port (`<port>`, default
`8787`) and probe it from this computer:
```sh
curl -fsS --max-time 3 "http://<ts-ip>:<port>/sync/probe"
```
- Expect HTTP `200` JSON with `"horizon_sync_probe":1` and `"home_name"`. If
the probe times out, diagnose the Tailscale ACL or firewall before asking
the person to pair (see [Troubleshoot Device Sync](#troubleshoot-device-sync)).
5. **Give the person the pairing step.** Report the home name, tailnet address,
single-use 8-character pairing code (10-minute TTL), and `horizon://pair?...`
link, with the exact UI step:
> Open **Device Sync** in Horizon → **Connect to a home** → select `<home>`
> (or paste the pairing link into **Pairing code or pairing link**) → click
> **Pair & Connect**.
Horizon does not register an OS URL handler for `horizon://pair`; the person
always pastes the link into **Device Sync**.
## Manage a running home
Run these commands on the home machine (or over SSH to a headless home):
| Goal | Command |
|---|---|
| Start home service and print a **Full access** code | `horizon home` (optional `--port <port>`, `--no-service`) |
| Create a new **Full access** pairing code | `horizon home code` |
| Create a **View & approve** pairing code | `horizon home code --view-and-approve` |
| List paired devices, roles, and online state | `horizon home devices` |
| Disconnect and remove one paired device at once | `horizon home revoke <device>` (confirm first) |
| Stop the home and remove its installed user service | `horizon home stop` (confirm first) |
Notes:
- Passing a non-default `--port <port>` requires entering `<host>:<port>` (or
pasting the printed `horizon://pair?home=<host>:<port>&code=<code>` link) on
away devices because Tailscale discovery probes default port `8787`.
- On a desktop home, all of these actions live directly in the **Device Sync**
popover (**Add a device**, **New code**, **Revoke**, **Stop being home**).
- On a connected away device, **Device Sync** lets the person switch between
multiple saved homes, toggle **Local** vs `<home>` board, reopen closed
mirrors under **Dismissed Mirrors**, or click **Unpair `<home>`**.
## Troubleshoot Device Sync
| Symptom | Likely cause | Check and fix |
|---|---|---|
| `curl http://<ts-ip>:8787/sync/probe` times out from away device, even though `tailscale ping` succeeds | Tailscale ACL blocks `tcp:8787` between the away device and the home (common when either device has a `tag:*`, since tagged devices are excluded from `autogroup:member`) | Inspect `tailscale status --json` tags on both devices. Add a Tailscale ACL grant allowing `tcp:8787` in the direction away → home (for example `autogroup:member` → `tag:horizon`, or `tag:dev` → `autogroup:member`). Never edit Tailscale ACLs unasked. |
| Home is not listed in **Connect to a home**, but probe works on custom port | Discovery probes default port `8787` only | Paste the full `horizon://pair?home=<host>:<port>&code=<code>` link, or click **Type an address instead** and enter `<host>:<port>`. |
| `horizon home` exits after SSH disconnect on Linux | `systemd` user linger is off, or `horizon home` fell back to `--no-service` | Check `loginctl show-user "$USER" -p Linger --value` and enable linger (`loginctl enable-linger "$USER"`). Check `systemctl --user status horizon-home.service` and `~/.horizon/logs/home.log`. |
| `horizon home` binds `127.0.0.1` only, or fails to bind tailnet IP on a container | Container lacks `/dev/net/tun` (Tailscale userspace networking has no kernel `tailscale0` interface to bind) | Use a full-kernel VM (Hetzner, AWS, GCP, Azure) for an always-on Horizon Home, or use **Advanced setup** with an SSH tunnel to `127.0.0.1:8787`. |
| `horizon home` prints `Tailscale is not on` on macOS | Tailscale app/daemon is not signed in or stopped | Check `/Applications/Tailscale.app/Contents/MacOS/Tailscale status` and ask the person to connect Tailscale on that Mac, then restart `horizon home`. |
| `This code does not work. Make a new code on the home.` | Code expired (10 min), already used, replaced by role switch, or all active codes cancelled after 20 failed attempts | Run `horizon home code` (or click **New code** on a desktop home) and pair with the fresh code. |
| `The home removed this device. Pair again to connect.` | Device token was revoked on the home | Confirm the person wants to re-pair, generate a fresh code on the home, and pair again. |
| Existing separate `horizon-hub` setup | Pre-existing `sync.hub_url` stays active on upgrade | Manage it under **Device Sync → Advanced setup** without resetting its tokens. |
## Safety and limits
- **Always confirm before cost or destructive actions.** Confirm provider,
region/zone, machine type, estimated CLI price (never guess), and name before
renting a cloud home. Confirm before running `horizon home revoke`,
`horizon home stop`, or deleting a cloud VM.
- **Verify release checksums.** Always check `SHA256SUMS.txt` before installing
a downloaded Horizon release binary.
- **Keep sync traffic on Tailscale.** Never open port `8787` on a public cloud
firewall and never bind `0.0.0.0`.
- **Keep secrets strictly isolated.** Never print Tailscale OAuth secrets,
one-time Tailscale auth keys, or Horizon bearer tokens. Never copy local
`~/.ssh` private keys, `~/.aws`, `~/.config/gcloud`, `~/.azure`, `.env` files,
cookies, or keyrings onto a rented home.
- **Never touch local Tailscale state.** Only read local tailnet status with
`tailscale status --json`; never run `tailscale up`, `down`, `login`,
`logout`, `switch`, or `set` on the person's computer.
- **Keep private identifiers private.** Never publish private hostnames, tailnet
names, IP addresses, or local paths in public issues, PRs, or logs.
## References
| Reference | Contents |
|---|---|
| [cloud-home](references/cloud-home.md) | End-to-end workflow to rent a cloud VM, join Tailscale (interactive URL or OAuth stdin), install verified Horizon, start `horizon home`, prove `/sync/probe`, and tear down cleanly |