Set up Hoptail on Linux

Hoptail on your iPhone talks to a small program on your computer, the Hoptail daemon. It watches your tmux sessions and the agents in them, and lets your iPhone know when one needs you. On Linux it runs as a systemd user service. Setup takes about five minutes.

What you need

  • A 64-bit Linux on x86-64 or ARM64 with glibc 2.28 or later and systemd 240 or later. We test on Ubuntu 24.04 LTS. Alpine and other musl-based systems are not supported.
  • Tailscale on this computer and on your iPhone, signed in to the same tailnet.
  • Claude Code, with claude working in your shell.
  • tmux. On Ubuntu or Debian: sudo apt install tmux. Hoptail doesn’t install or upgrade tmux, so your running sessions stay as they are.
  • libatomic1, a small system library the daemon needs. Most desktops already have it; minimal and cloud images often don’t. On Ubuntu or Debian: sudo apt install libatomic1.
  • Hoptail on your iPhone from TestFlight: Join the beta

Install

With Homebrew

If you use Homebrew on Linux:

brew install hoptail-app/tap/hoptail
hoptail setup

From the archive

Download the archive for your processor and its checksum from GitHub Releases: hoptail-<version>-linux-x64.tar.gz for Intel and AMD, hoptail-<version>-linux-arm64.tar.gz for ARM. uname -m tells you which one: x86_64 or aarch64.

sudo apt install libatomic1   # once, before the first run
sha256sum -c hoptail-<version>-linux-arm64.tar.gz.sha256
tar -xzf hoptail-<version>-linux-arm64.tar.gz
install -D -m 755 hoptail-<version>-linux-arm64/hoptail ~/.local/bin/hoptail
hoptail setup

If hoptail says error while loading shared libraries: libatomic.so.1, install libatomic1 as above.

If your shell can’t find hoptail, add ~/.local/bin to your PATH, or install it to /usr/local/bin with sudo install -m 755 hoptail-<version>-linux-arm64/hoptail /usr/local/bin/.

What hoptail setup does

It checks that tmux, Tailscale and claude are in place, then:

  • creates a TLS certificate, so your iPhone talks to this computer over an encrypted connection;
  • installs and starts the user service hoptail.service (in ~/.config/systemd/user);
  • adds Hoptail’s hooks to Claude Code’s settings, so the daemon knows when an agent is waiting. Your existing hooks stay, and a backup of settings.json is saved next to it;
  • doesn’t touch Claude Code’s sandbox. It prints one line about the sandbox profile Hoptail recommends, which keeps your agents away from Hoptail’s files. The profile goes into your user settings, so it applies to Claude Code in every project. To add it, run hoptail setup --sandbox: it shows what would change and what you give up, and adds the profile only if you answer y. Claude Code’s sandbox on Linux needs bubblewrap and socat; without them --sandbox stops before changing anything. Where AppArmor restricts user namespaces, as on recent Ubuntu, this profile would make every Bash command fail, so --sandbox stops and points you to the weaker profile on the same page. The profile and what it costs you are on hoptail.app/security. To take it off: hoptail setup --remove-sandbox. If a command asks to reach this computer (127.0.0.1, localhost or 0.0.0.0), answer No: Yes opens Hoptail’s ports to the agent.

It’s safe to run hoptail setup again at any time.

Keep it running after you log out

A user service stops when you log out. On a server, or to start Hoptail at boot, turn on lingering once:

sudo loginctl enable-linger $USER

hoptail setup reminds you if lingering is off. It never asks for sudo itself.

Pair your iPhone

hoptail pair

A QR code appears in the terminal. Open Hoptail on your iPhone and scan it, or scan it with the iPhone Camera. If scanning doesn’t work, tap Enter Code Manually and type the address and code shown next to the QR.

Codes last 5 minutes. If yours expires, run hoptail pair again.

Once your iPhone is paired, hoptail pair asks it first: your iPhone shows Pairing Request, choose the number shown in the terminal, and the QR code appears. Lost that iPhone? Run hoptail devices, then hoptail devices revoke <id> to remove it, and pair the new one. This needs hoptail 0.1.10 or later and an up-to-date Hoptail app on your iPhone. With an older app, hoptail pair asks you to update it and shows the QR code right away.

Then start an agent in tmux, for example tmux new -s demo and claude, or tap New Session in the app. When the agent asks something, your iPhone will let you know.

Everyday commands

CommandWhat it does
hoptail statusShows whether the daemon is running, its address and port, and paired devices
hoptail logsShows the daemon’s log
hoptail restartRestarts the daemon
hoptail pairPairs another iPhone or iPad, after your paired iPhone approves; its code also signs in a browser
hoptail devicesLists paired devices; hoptail devices revoke <id> removes one
hoptail versionShows the version

Add --help to any command, or run hoptail help <command>, to see what it does and its options. The service also answers to systemctl --user status hoptail.

Use Hoptail in a browser

The web client works as on a Mac: the tailnet settings to turn on first, how to sign in are in Use Hoptail in a browser. What differs on Linux:

  • tailscale serve needs root unless your user is Tailscale’s operator. Make it so once, and Hoptail never needs sudo:
    sudo tailscale set --operator=$USER
  • hoptail web enable restarts hoptail.service and prints the address, such as https://build-box.yak-bebop.ts.net/.
  • No paired iPhone, or one with an older Hoptail app? Run hoptail pair on this computer, an SSH session included, and enter the code it shows in the browser. Keep it running until the browser signs in.

Update

With Homebrew:

brew upgrade hoptail && hoptail restart

From the archive: download the new one, check it and replace the file as in Install, then run hoptail restart.

If the app asks you to update Hoptail on this computer, the same steps apply. If hoptail logs or hoptail status says “run hoptail setup”, the hooks have changed in the new version: run hoptail setup once.

Uninstall

hoptail uninstall

Then brew uninstall hoptail, or rm ~/.local/bin/hoptail if you installed from the archive.

hoptail uninstall stops the service, removes it and removes only Hoptail’s hooks from Claude Code’s settings. Your pairings and settings stay, in case you come back.

To remove everything, including pairings, settings and logs, use hoptail uninstall --purge instead. Then unpair in the app, or just delete the app.

If you removed the hoptail file first

Claude Code keeps working: the leftover hook quietly does nothing. To clean up by hand:

  1. Stop and remove the service:
    systemctl --user disable --now hoptail.service
    rm ~/.config/systemd/user/hoptail.service
    systemctl --user daemon-reload
  2. Remove the hooks. Open ~/.claude/settings.json (or $CLAUDE_CONFIG_DIR/settings.json, if you set it) and, under "hooks", delete every entry whose command contains hoptail/hook.sh. Leave other hooks as they are. To check that nothing is left:
    grep -n "hoptail/hook.sh" ~/.claude/settings.json
  3. Remove Hoptail’s data (the paths follow XDG_CONFIG_HOME, XDG_CACHE_HOME and XDG_STATE_HOME if you set them):
    rm -rf ~/.config/hoptail ~/.cache/hoptail ~/.local/state/hoptail

Troubleshooting

“Can’t find your Mac” or “Can’t reach your Mac”

The app says “Mac” for any computer running the daemon.

  • Make sure Tailscale is running and connected on both devices, with the same account or tailnet.
  • On this computer, tailscale ip -4 should print an address starting with 100.. hoptail status should show the same address.
  • Make sure the service runs: hoptail status, or systemctl --user status hoptail. If it stopped after you logged out, turn on lingering (see Install).
  • If a firewall is on (for example sudo ufw status says active), allow the port from Tailscale only: sudo ufw allow in on tailscale0 to any port 7880 proto tcp.

The port is busy

Hoptail uses port 7880. If another program holds it, hoptail setup picks the next free port and saves it; the QR code carries the port to your iPhone. If you change ports later, run hoptail pair again. To see what holds a port:

ss -ltnp 'sport = :7880'

No notifications

  • Check that notifications for Hoptail are on in iOS Settings, and the app isn’t set to Mute.
  • In Desk mode, Hoptail first waits 20 seconds for you to answer at your computer. Try Away.
  • Make sure the agent runs in tmux, and run hoptail setup if you installed Claude Code after Hoptail.

claude not found

hoptail setup looks for claude the way your login shell finds it. Make sure claude --version works in a new terminal, then run hoptail setup again.

Feedback

Send feedback from TestFlight: take a screenshot in Hoptail and tap Share Beta Feedback, or email feedback@hoptail.app. If something broke, hoptail logs helps a lot. Logs can include project names and paths, so have a look before you send them.