Client configuration
The client's appsettings.json file — where it lives on each platform, how to change it safely, and every setting it offers.
Updated · ·By Ivan Vyshniak
This page changes with your operating system.
The Peerlify service reads its settings from appsettings.json at startup. Most people never need to change it. The settings below are for specific situations: a firewall that needs a fixed port, a machine that also runs a container network, or turning off hosts-file names.
Which file to edit
C:\Program Files\Peerlify\appsettings.json. Edit it as an administrator.
Upgrades replace this file, so changes you make may be lost when the client updates. Check your settings after each update.
/Library/Application Support/Peerlify/appsettings.json, as root. Create it if it doesn't exist.
This file holds only the settings you change; the defaults ship inside the app and are read first. Your file survives upgrades. Delete it to return to the defaults. Don't edit the copy inside Peerlify.app.
{
"TapClient": {
"Dns": { "EnableShortNames": false }
}
}/etc/peerlify/appsettings.json, as root. Package upgrades keep your edits.
After editing, restart the service (see Restart the service) and check its log. If the file isn't valid JSON, the service doesn't start. Keep it strict JSON, with no comments or trailing commas: peerlify configure can't update a file that has them. Individual settings that don't parse are ignored.
peerlify configure changes two settings without a restart: TapClient:Diagnostics:EnableDebugLogs and TapClient:Update:Channel. See the CLI reference.
Settings
The file lists only these settings. Everything else, including the control-plane address, the adapter's MTU and the name suffix, is built into the client and isn't meant to be changed. Don't add other settings to the file: some values outside this list stop the service or the network adapter from starting. To allow the control plane in a firewall, see Firewall and network requirements.
All settings are under TapClient. In this reference, Relay:LocalUdpPort means {"TapClient": {"Relay": {"LocalUdpPort": …}}}.
Direct connections
| Setting | Type | Default | Description |
|---|---|---|---|
Relay:LocalUdpPort | number | 0 | The local UDP port for direct connections. 0 picks a random port at each start. Set a fixed port if you want to forward it on your router or allow it in a firewall. |
Relay:LocalAnnouncedEndpoints | list of "ip:port" | [] | Extra public addresses to offer to peers, for example a port you forward by hand. Invalid entries are ignored. |
Relay:PortMapping:Enabled | boolean | true | Ask the router to forward the UDP port with UPnP, NAT-PMP or PCP. |
Excluding interfaces
When a computer also runs a container or virtual network, its addresses must not be used as Peerlify paths. The client already ignores interfaces named flannel*, cni*, cali*, vxlan*, cilium*, kube-*, weave*, docker*, br-*, virbr*, veth*, lxc*, lxd*, wg*, tun*, tap* and utun*.
| Setting | Type | Default | Description |
|---|---|---|---|
Relay:ExcludedInterfaces | list of strings | [] | More interface names to ignore. * is a wildcard; matching is case-sensitive. |
Relay:ExcludedAddressRanges | list of strings | [] | Address ranges (10.42.0.0/16) or single addresses never offered to peers or used to reach them. Invalid entries are ignored. |
Excluded addresses appear on the Excluded local line of peerlify telemetry.
{
"TapClient": {
"Relay": {
"ExcludedInterfaces": ["ens9*"],
"ExcludedAddressRanges": ["10.42.0.0/16", "10.43.0.0/16"]
}
}
}Names
| Setting | Type | Default | Description |
|---|---|---|---|
Dns:EnableHostsInjection | boolean | true | Write peers' names into the hosts file. Windows and macOS only; ignored on Linux. |
Dns:EnableShortNames | boolean | true | Also write each peer's short name, without the network ID and domain. |
Device
| Setting | Type | Default | Description |
|---|---|---|---|
ControlPlane:ComputerName | string | "" | The name sent to the control plane. Empty uses the computer's hostname. |
Logging and updates
| Setting | Type | Default | Description |
|---|---|---|---|
Diagnostics:EnableDebugLogs | boolean | true | Detailed logging. |
Update:Channel | stable or unstable | stable | The release channel. Used on macOS only. |