Lightweight installer/manager for a personal WireGuard server with optional port forwarding for gaming and similar use-cases. This repository contains the original bash installer (in the legacy_script branch) and a rewritten Python package wg_gaming_installer (recommended).
- Quick Start
- Why the Python version
- Supported platforms
- Prerequisites
- Main menu
- Port forwarding
- Customization
- Troubleshooting
- Legacy installer
- License
Clone, create a venv, install, and run the installer (as root, sudo -i before running the following):
git clone https://github.com/xiahualiu/wg_gaming_installer.git
cd wg_gaming_installer
python3 -m venv .venv --system-site-packages
source .venv/bin/activate
pip install -e .
python -m wg_gaming_installer.install_scripts- Safer, clearer prompts and input validation.
- SQLite-backed config for persistent server & peer metadata.
- More portable across distributions using Python libraries.
Officially supported minimums:
| Distribution | Minimum | Notes |
|---|---|---|
ubuntu |
20.10 | 22.04 recommended |
debian |
11 | Bullseye |
Also commonly compatible: centos/rocky/almalinux (9), fedora (32), arch (rolling).
- Requires a Linux host with a public IP or correct NAT/public endpoint.
- On OpenVZ/LXC you may need TUN/TAP enabled and
wireguard-gowill be installed.
- Root privileges.
- Python 3.10+ and
python3-venv. - A non-production host is recommended; the installer modifies networking and firewall rules.
After installation, the interactive menu provides these actions:
- Stop/Start WireGuard service
- Uninstall and remove generated files
- List peers; show peer config + QR code
- Add / Remove / Edit peers
The installer can add nftables DNAT rules that forward chosen public ports to a peer's WireGuard IP (IPv4/IPv6 supported). This is useful to host game servers or fix client NAT.
Example: forward TCP 25565 to 10.66.66.2:25565 so SERVER_PUBLIC_IP:25565 reaches the peer.
Important: do not forward ports already used by server-local services (SSH, etc.).
Recommended safe workflow:
- Stop the service from the management menu.
- Edit
wg_gaming_installer/exec_scripts.pyto change what the installer generates. - Restart the service using the management menu.
- If the installer detects a non-public IP (e.g.
10.x.x.x), supply your public IP when prompted (common on cloud providers).
The original bash installer is in the legacy_script branch:
git switch legacy_script
./install.shNote: the legacy installer is not compatible with the Python version; choose one approach.
This project is licensed under the MIT License — see LICENSE for details.