wgpeer
Manage WireGuard peers.
Installation
uv tool install wgpeer
Or run without installing:
uvx wgpeer --help
Usage
Must be run as root with WireGuard installed.
On first use, run init to create the config file:
sudo wgpeer init
This detects your server's public IP from ip a and writes /etc/wgpeer/config.toml. You'll be prompted to confirm or enter the IP manually if none is detected.
sudo wgpeer add <name> # Add a new peer (auto-assigns IP, shows QR code)
sudo wgpeer remove <name> # Remove an existing peer
sudo wgpeer list # List all peers with IPs and public keys
sudo wgpeer qr <name> # Display QR code for an existing peer
Configuration
Server settings are stored in /etc/wgpeer/config.toml (created by wgpeer init). All fields except server_ip have defaults:
server_ip = "1.2.3.4"
server_port = 51820
wg_interface = "wg0"
wg_dir = "/etc/wireguard"
subnet = "10.0.0.0/24"
dns = "10.0.0.1"
keepalive = 25
Template Override
To customise the client config template, place a Jinja2 template at /etc/wgpeer/client.conf.j2. Available variables: private_key, ip, dns, server_pub, server_ip, port, keepalive.
Building and Publishing
uv build
uv publish
Metadata
Release files for wgpeer 0.6.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| wgpeer-0.6.1.tar.gz | 31.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| wgpeer-0.6.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 42.0 kB
Release files / wgpeer-0.6.1.tar.gz
| Download URL | wgpeer-0.6.1.tar.gz |
|---|---|
| Size | 31.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
69719b2aec99445d38951b838d100ff80b9d7703a05fde62b4a5db731f1a5751
|
|
BLAKE2b-256 checksum How to use checksums |
4251efd49ab46b0c94d221943da0e67bb0f02f1085dea4fb804f14f258ee5d4d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 25, 2026.
Transparency logRelease files / wgpeer-0.6.1-py3-none-any.whl
| Download URL | wgpeer-0.6.1-py3-none-any.whl |
|---|---|
| Size | 10.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ac7982cd4026356837bb603e117d5413cb5541c064c41f9686a1beed486703d0
|
|
BLAKE2b-256 checksum How to use checksums |
ae2c5c3a538393ec8299938b6bb17aec6bee56e4b0202447e03f77d175ed45d9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 25, 2026.
Transparency log