Install on servers and headless machines

Install and sign in without a browser — Linux servers, Windows unattended installs, CI runners, golden images and Kubernetes nodes.

Updated · ·By Ivan Vyshniak

Showing Windows instructions.

This page changes with your operating system.

On machines nobody sits at, install the client from a script and sign it in with an auth key.

Linux in one line

  1. In the console, switch to the target network and open Devices → Add device → Linux server.

  2. Choose the options:

    • Auto-assign tags, so the server joins with the right access.
    • Ephemeral, for short-lived machines.
    • Reusable and Max uses, to enroll several servers with one key.
    • Expiry: 7 days by default.
  3. Click Generate install command and run the command it shows on the server:

    shell
    curl -fsSL https://pkgs.peerlify.net/install.sh | sh && \
      peerlify login --auth-key=pk_…

The key is shown only in that dialog. Run the command as root, or as a user with password-less sudo, so the installer never needs to prompt.

The key is passed on the command line, so other users on the server can see it in the process list while the command runs. Use single-use or short-lived keys.

Windows unattended

powershell
iwr https://pkgs.peerlify.net/client/stable/windows/PeerlifySetup.exe -OutFile PeerlifySetup.exe
Start-Process .\PeerlifySetup.exe -ArgumentList '/quiet','/norestart' -Verb RunAs -Wait
& 'C:\Program Files\Peerlify\peerlify.exe' login --auth-key=pk_…

The installer starts the service but doesn't wait for it. If login reports Unable to reach the daemon, wait a few seconds and run it again. The installer has no option for an auth key; sign in afterwards as above.

macOS

The background service is registered by the Peerlify app's setup assistant, which needs someone signed in at the Mac's screen to run it once and approve Allow in the Background. Installing the package over SSH alone leaves the service unregistered.

Device-management (MDM) profiles can pre-approve the background item, but the app must still be opened once in a user session.

CI runners and other short-lived machines

Create a reusable key with Ephemeral on. A machine that joins with it is removed from the network when it runs peerlify logout, or about 20 seconds after it goes offline in any other way: the VM is destroyed, the service stops, or the machine shuts down.

Because a reboot also takes the machine offline, an ephemeral machine that reboots is usually removed and stays offline until it signs in again. Use a non-ephemeral key for servers. See Ephemeral devices.

To give each machine a recognizable name, add --hostname, for example peerlify login --auth-key=<KEY> --hostname=ci-4821. For GitHub Actions, the Peerlify GitHub Action does all of this for you.

Golden images

The service creates the device's identity (its keys) the first time it starts. On Linux, the package starts the service as soon as it's installed, even with NO_START=1. An image captured after installing therefore contains an identity, and every machine cloned from it would be the same device.

Before capturing an image:

Linux
shell
sudo systemctl stop peerlify-daemon
sudo rm -rf /var/lib/peerlify/*
Windows
powershell
Stop-Service peerlify-daemon
Remove-Item -Recurse -Force C:\ProgramData\Peerlify\*
macOS

Not applicable: Macs need the setup assistant on each machine.

Each clone then creates its own identity on first start. Sign each one in with an auth key.

Kubernetes nodes

There is no Peerlify container image or DaemonSet. Install the client on each node (the host), then point your cluster's network at the Peerlify interface, for example --flannel-iface=Peerlify for k3s with flannel. The client already ignores common container and overlay interfaces when looking for direct paths; add your own with TapClient:Relay:ExcludedInterfaces. See Client configuration.

Next steps

Was this page helpful?