Linux

Install PortPilot on x86_64 systemd hosts, including headless servers, service control, upgrade, and uninstall.

Prerequisites

  • x86_64 Linux with systemd
  • Root (sudo) to install
  • Outbound HTTPS to https://api.portpilot.app if you will pair

There is no .deb, .rpm, AppImage, Flatpak, or Snap. The same install.sh is used on every distro we test: Ubuntu 24.04 (desktop and server), Debian 13, Fedora, and Arch.

If Download does not list Linux binaries yet, you must build them from the repository (cargo build --release for agent, helper, and CLI) before running install.sh.

Install

Copy the release binaries from Download onto the host, then:

sudo ./install.sh ./portpilot-agent ./portpilot-helper ./portpilot

A fourth argument is the optional desktop app (GUI machines only).

Default PREFIX=/usr/local. The installer creates system user portpilot, data dir /var/lib/portpilot, env file /etc/portpilot/agent.env, enables portpilot-helper (if the helper binary was passed) and portpilot-agent, and installs /etc/profile.d/portpilot.sh so portpilot is on PATH.

Open a new shell, then:

portpilot --version
systemctl status portpilot-agent
portpilot pair

The agent keeps running after you disconnect. After reboot, systemd starts the services again.

Headless servers

No desktop environment is required.

Headless pairing
Headless pairing
  1. SSH into the server.
  2. Install as above (omit the desktop binary).
  3. systemctl status portpilot-agent — expect active (running).
  4. On your laptop, open https://portpilot.app → Machines → Add machine → Generate pairing code. Keep it visible.
  5. On the server: portpilot pair and type the code, or portpilot pair XXXX-XXXX.
  6. Confirm the machine is online in the dashboard.

If portpilot status cannot find the token, open a new SSH session or:

export PORTPILOT_DATA_DIR=/var/lib/portpilot

systemd

ActionCommand
Statussystemctl status portpilot-agent
Helper statussystemctl status portpilot-helper
Startsudo systemctl start portpilot-agent
Stopsudo systemctl stop portpilot-agent
Restartsudo systemctl restart portpilot-agent
Enable on bootsudo systemctl enable portpilot-agent (installer already does this)
Disablesudo systemctl disable portpilot-agent
Logssudo journalctl -u portpilot-agent.service -n 80 --no-pager
Follow logssudo journalctl -u portpilot-agent.service -f

Restarting the agent from Desktop as a normal user often fails (no polkit rule). Use sudo systemctl restart portpilot-agent on the host.

Upgrade

Run install.sh again with the new binaries. Data in /var/lib/portpilot is kept. /etc/portpilot/agent.env is not overwritten if it already exists.

Uninstall

sudo ./uninstall.sh

Stops services and removes binaries. Keeps /var/lib/portpilot.

sudo PURGE_DATA=1 ./uninstall.sh

Also deletes data, /etc/portpilot, and the portpilot user.

Expected result

Active: active (running) for portpilot-agent; portpilot status in a new shell; pairing succeeds while the dashboard code is still valid.

Common problems

SymptomCauseResolution
CLI not foundSame SSH session as installNew login, or export PATH=/usr/local/bin:$PATH
Agent inactiveBinary arch, hardening, data dirjournalctl -u portpilot-agent.service -n 80; confirm x86_64
Docker emptyAgent user cannot use the engine socketPorts still list; add the portpilot user to the docker group only if you accept that risk
Firewall mutate failsNot UFW (common on Fedora/firewalld)Inspect still works; mutate needs UFW. See Firewall
Pairing fails after SSH idleCode expired (about 3 minutes)Generate a new code, keep the site tab open, pair immediately

Do not send local.token or pairing codes to support.

Download PortPilot · FAQ · Support