Device security
How the client protects keys on disk, who on the computer can control it, what it listens on, and how updates are checked.
Updated · ·By Ivan Vyshniak
Nothing on this page changes with your selection.
This page covers the security of the Peerlify client on one computer. For the network as a whole, see Security model.
Who on the computer can control Peerlify
The service runs with full privileges (LocalSystem on Windows, root on macOS and Linux). The peerlify command and the desktop apps talk to it through a local channel:
| Platform | Channel | Who can use it |
|---|---|---|
| Windows | Named pipe \\.\pipe\peerlify-daemon | Any signed-in user |
| macOS | Socket /var/run/peerlify/daemon.sock | Any local user |
| Linux | Socket /run/peerlify/daemon.sock | Any local user |
The client doesn't limit commands to administrators: every user of the computer can change its Peerlify connection, and shadowing sessions started from the computer identify as this device. The only exception is installing updates, which needs an administrator or root (sudo) on every platform.
On computers shared by several people (terminal servers, lab machines, multi-user Linux servers), treat everyone who can sign in to the computer as able to control its Peerlify connection.
Keys and secrets on the device
The device's identity (node.secret) and its session token (session.secret) are stored in the state folder:
| Platform | Folder | Protection |
|---|---|---|
| Windows | C:\ProgramData\Peerlify\ | Encrypted with Windows DPAPI (machine scope), so a copied file can't be read on another computer. The folder is limited to SYSTEM and Administrators; any administrator or program running as SYSTEM on the computer can read the secrets. |
| macOS | /Library/Application Support/Peerlify/state/ | Not encrypted. Files readable only by root (0600, folder 0700). The Keychain isn't used. |
| Linux | /var/lib/peerlify/ | Not encrypted. Files readable only by root (0600, folder 0700). |
On macOS and Linux, use full-disk encryption, and treat backups and disk images that include the state folder as containing the device's credentials. Anyone with these files can act as the device until its session is revoked or expires. Removing the device from the network isn't enough on its own; see A device is lost or stolen.
If the identity file can't be read, the client creates a new one and the computer appears as a new device.
What the client listens on
- One UDP port, chosen at random when the service starts unless you set
TapClient:Relay:LocalUdpPort. It answers only packets authenticated with a session key of a known peer; anything else gets no reply. - Port mapping. By default, the client asks your router to forward that UDP port, using UPnP, NAT-PMP or PCP, where the router allows it. Turn this off with
TapClient:Relay:PortMapping:Enabledset tofalse. - No TCP ports on the network. All other channels are local (named pipes and sockets).
On the Windows Firewall, the installer adds rules allowing the service's traffic in and out.
Services on the computer itself become reachable from other devices in the network, as far as the access policy allows. A new network's policy allows everything.
Updates
| Platform | How updates are obtained and checked |
|---|---|
| Windows | The installer packages are signed with Peerlify's code-signing certificate. The automatic updater downloads them over HTTPS from pkgs.peerlify.net, or from Peerlify's Amazon S3 bucket if that fails, and runs them; it doesn't check the signature or checksum itself before installing. |
| macOS | The service checks each download's SHA-256 checksum, its code signature against Peerlify's Apple developer team, and macOS Gatekeeper before installing. The app's built-in updater checks an EdDSA signature on the update. |
| Linux | Your package manager installs packages from Peerlify's repository, whose metadata is signed with Peerlify's key. Tarball installs are checked against a SHA-256 checksum downloaded from the same server. |
Which version to install is read over HTTPS from files on pkgs.peerlify.net (or the same S3 bucket). Peerlify can publish a version that every device installs, including an older one.
Logs
- Windows: in
C:\ProgramData\Peerlify\logs\logs\, readable by administrators. - macOS: in
/Library/Application Support/Peerlify/logs/; the files are readable by all local users. - Linux: in the system journal.
Logs contain device names, network addresses and connection details. Detailed logging is on by default; see Find the logs.
Name entries in the hosts file
On Windows and macOS, the client writes the names of reachable peers into the system hosts file, including short single-word names. A peer's short name is chosen by whoever names that device. If you prefer not to have short names, set TapClient:Dns:EnableShortNames to false.