Manage WireGuard peers
Project description
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
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file wgpeer-0.6.1.tar.gz.
File metadata
- Download URL: wgpeer-0.6.1.tar.gz
- Upload date:
- Size: 31.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
69719b2aec99445d38951b838d100ff80b9d7703a05fde62b4a5db731f1a5751
|
|
| MD5 |
102a27d67e83fa2bab838f661df5a1b1
|
|
| BLAKE2b-256 |
4251efd49ab46b0c94d221943da0e67bb0f02f1085dea4fb804f14f258ee5d4d
|
Provenance
The following attestation bundles were made for wgpeer-0.6.1.tar.gz:
Publisher:
publish.yml on danohn/wgpeer
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
wgpeer-0.6.1.tar.gz -
Subject digest:
69719b2aec99445d38951b838d100ff80b9d7703a05fde62b4a5db731f1a5751 - Sigstore transparency entry: 1179441097
- Sigstore integration time:
-
Permalink:
danohn/wgpeer@9124dd699f2c2d6d68dd5a9450de0d190f7a8cd0 -
Branch / Tag:
refs/tags/v0.6.1 - Owner: https://github.com/danohn
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@9124dd699f2c2d6d68dd5a9450de0d190f7a8cd0 -
Trigger Event:
push
-
Statement type:
File details
Details for the file wgpeer-0.6.1-py3-none-any.whl.
File metadata
- Download URL: wgpeer-0.6.1-py3-none-any.whl
- Upload date:
- Size: 10.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ac7982cd4026356837bb603e117d5413cb5541c064c41f9686a1beed486703d0
|
|
| MD5 |
554376608ab88e2a214c0445aec6e5bc
|
|
| BLAKE2b-256 |
ae2c5c3a538393ec8299938b6bb17aec6bee56e4b0202447e03f77d175ed45d9
|
Provenance
The following attestation bundles were made for wgpeer-0.6.1-py3-none-any.whl:
Publisher:
publish.yml on danohn/wgpeer
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
wgpeer-0.6.1-py3-none-any.whl -
Subject digest:
ac7982cd4026356837bb603e117d5413cb5541c064c41f9686a1beed486703d0 - Sigstore transparency entry: 1179441118
- Sigstore integration time:
-
Permalink:
danohn/wgpeer@9124dd699f2c2d6d68dd5a9450de0d190f7a8cd0 -
Branch / Tag:
refs/tags/v0.6.1 - Owner: https://github.com/danohn
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@9124dd699f2c2d6d68dd5a9450de0d190f7a8cd0 -
Trigger Event:
push
-
Statement type: