GitHub

Running on a Home Server

PocketDev doesn't need a cloud VPS. You can run the agent on a computer at home, such as a Mac mini on your desk or a Linux box in a closet, and control it from your phone anywhere. This page explains how that works and how to set it up.

A Mac mini inside a house, connected to a phone outside by a private, encrypted link
Left at home, but never alone —
your Mac's a tap away by phone.

Why a home server needs one extra step

A VPS has a public IP address, so your phone can connect to it from anywhere. A computer at home sits behind your router, which only lets devices on the same Wi-Fi reach it. Once you leave the house, your phone can no longer find it.

Don't fix this by port-forwarding 4387 on your router. That exposes the agent, and the shell access it provides, to the whole internet. Use Tailscale instead. It's a free private network (a "tailnet") that links your computer and your phone directly with WireGuard encryption. Nothing is opened on your router, and only your own devices can connect.

PocketDev sets up Tailscale before you pair, so the pairing code already contains an address that works from anywhere. You pair once, and it keeps working on Wi-Fi, cellular, or someone else's network.

What you need

  • A Mac (Apple Silicon or Intel) or a Linux machine that stays on. See keeping it always on below.
  • A free Tailscale account. You can sign in with Google, GitHub, Microsoft or Apple.
  • The Tailscale app on your phone (iPhone, Android), signed in with the same account.

Install on a Mac

Open Terminal on the Mac and run the same install command as on Linux, as your normal user and without sudo:

$curl -fsSL https://pocketdev.run/install.sh | bash

On macOS the installer runs the agent as a background service under your user account (a launchd LaunchAgent), not as root. That's deliberate: Claude Code and the GitHub CLI keep their logins in your macOS Keychain, which only processes running as you can read. Everything is installed under ~/.pocketdev, and logs go to ~/Library/Logs/PocketDev/agent.log.

Install Homebrew and the Xcode Command Line Tools (xcode-select --install) first. PocketDev's setup wizards use Homebrew to install tools like Node, the GitHub CLI and tmux on a Mac.

If you build iOS apps, a Mac at home can also sign and upload them to TestFlight for you. See Shipping iOS Apps.

Set up Tailscale

You can do this from the installer or from the web console. Both run the same steps.

Installing the Tailscale app on a Mac

Both options start by installing the Tailscale app. This is what it looks like (red boxes mark what to click):

The Tailscale installer on the Install step
1. Run the installer: Continue, then Install, and enter your Mac's password.
Tailscale's Required permissions screen with a Grant permissions button for the system extension
2. Open Tailscale. Under Required permissions, click Grant permissions.
macOS dialog: System Extension Approval Required, with an Open Settings button
3. Click Open Settings, then turn on Tailscale under General → Login Items & Extensions → Network Extensions.
Tailscale's Quality of life settings with the Start at login switch
4. Turn on Start at login, so Tailscale comes back after a restart. Then click Next and Log In.

Option A: let the installer walk you through it

If Tailscale isn't connected, the installer asks Set up Tailscale now? [Y/n]. Press Enter, and it will:

  1. Open the Tailscale download for Mac. Install it, open Tailscale, and click Allow when macOS asks about the system extension. Then, in Tailscale → Settings, choose CLI integration → Install.
  2. Open the Tailscale login page in your browser. Sign in, and the installer continues automatically.
  3. Turn on Tailscale Serve, which gives the agent a private HTTPS address like https://mac-mini.tail1234.ts.net. If HTTPS isn't enabled for your tailnet yet, it opens Tailscale's approval page first.

You can press s at any waiting step to skip it and finish later in the console. To do the whole thing without being asked, run:

$curl -fsSL https://pocketdev.run/install.sh | bash -s -- --tailscale-serve

Option B: from the web console

Open http://localhost:4387/PocketDev/setup on the computer and create your admin account. On home networks, the Security page starts with a Remote Access card that asks how your phone will reach this machine:

The Remote Access card in the PocketDev console, showing the Tailscale checklist
The Remote Access card after choosing From anywhere.
  • From anywhere (recommended): a live checklist that updates as you go:
    1. Tailscale installed on this machine
    2. This machine logged into Tailscale (Log in opens the sign-in link)
    3. MagicDNS and HTTPS Certificates enabled in the Tailscale admin console
    4. PocketDev served over HTTPS (Enable HTTPS via Tailscale Serve)
    5. Tailscale installed on your phone
    6. Key expiry disabled for this machine (recommended, under Machines), so it doesn't drop off your tailnet every 180 days
  • Same Wi-Fi only: pair right away using the computer's local address (for example 192.168.1.81). The app only connects while your phone is on that Wi-Fi. You can switch to Tailscale later, but you'll need to pair again.

Pair your phone

  1. Make sure Tailscale is installed and connected on your phone.
  2. In the console, go to the Pairing section. Once Tailscale Serve is on, the pairing code points at your machine's https://….ts.net address.
  3. Scan the QR code or paste the setup code in the PocketDev app. See Get Started for details.

If the app can't reach the computer, it tells you why. For a Tailscale address it asks whether Tailscale is on, with buttons to get the app and retry. For a local address it reminds you to join the same Wi-Fi.

Passkeys for the web console only work over HTTPS on a real domain name. Open the console at https://<your-machine>.<tailnet>.ts.net/PocketDev/console to register one. Passkeys are tied to that exact name, so renaming the machine or your tailnet means registering them again. Keep your password as a fallback.

Keeping a Mac mini always on

A home server is only useful if it's awake. The installer checks the following and warns about anything that's off:

  • Never sleep (display sleep is fine): sudo pmset -a sleep 0 disksleep 0 autorestart 1. autorestart powers the Mac back on after a power cut.
  • Automatic login: System Settings → Users & Groups → Automatically log in as…. The agent runs as your user, so it starts once you're logged in.
  • FileVault turns off automatic login. After a reboot the Mac waits at the unlock screen, and PocketDev stays offline until someone logs in. Turning FileVault off on a machine that never leaves the house is a security trade-off you'll have to weigh yourself.
  • Tailscale: turn on Start at login in the Tailscale app, and disable key expiry for the machine.
  • Folder permissions: macOS asks before any app reads Desktop, Documents, Downloads or iCloud Drive. Keep your projects somewhere like ~/code to avoid those prompts on a headless machine.

Linux home servers

A Linux machine at home works the same way. The agent detects when it has no public IP address and shows the Remote Access card in the console. Install Tailscale with Tailscale's Linux instructions, then follow the checklist in the console. The guided prompt inside the installer is currently macOS-only.

Useful commands (macOS)

  • Logs: tail -f ~/Library/Logs/PocketDev/agent.log
  • Restart: launchctl kickstart -k gui/$(id -u)/run.pocketdev.agent
  • Health check: curl http://localhost:4387/PocketDev/health
  • Tailscale Serve status: tailscale serve status
  • Turn Serve off: tailscale serve --https=443 off
  • Uninstall: curl -fsSL https://pocketdev.run/install-macos.sh | bash -s -- --uninstall

Troubleshooting

  • "Is Tailscale on?" in the app: open Tailscale on your phone, check that it's connected and signed into the same account as the computer, then tap Retry.
  • Serve won't turn on: enable MagicDNS and HTTPS Certificates on the DNS page of the admin console. The console shows a direct approval link when this is the problem.
  • "Already serves … on https :443": another app already uses Tailscale Serve on this machine, and PocketDev won't overwrite it. Remove it with tailscale serve --https=443 off if you don't need it.
  • The QR code says localhost: the phone can't use that. Set up Tailscale, or choose "Same Wi-Fi only" so the code uses the computer's local address.
  • Android won't pair over Wi-Fi: release builds of the Android app block plain HTTP. Use Tailscale Serve, which provides HTTPS.