WireGuard is a VPN protocol. It's fast, simple, and uses modern cryptography.
Requirements
- Linux VPS (KVM) - Required. WireGuard needs kernel access.
- Debian or Ubuntu - This guide covers these distributions.
Container VPS won't work. Use KVM.
Installation
We use a script that handles the setup:
curl -O https://raw.githubusercontent.com/angristan/wireguard-install/master/wireguard-install.sh chmod +x wireguard-install.sh ./wireguard-install.sh
Follow the prompts. The script will:
- Install WireGuard
- Generate keys
- Create initial configuration
- Generate client configs
Basic Usage
Start WireGuard:
wg-quick up wg0
Stop WireGuard:
wg-quick down wg0
Check status:
wg show
Enable at boot:
systemctl enable wg-quick@wg0
Adding Clients
Run the script again:
./wireguard-install.sh
Select "Add a new client" when prompted.
Important Notes
- Requires kernel module support (KVM only)
- Keep your system updated
- Save your private keys securely
- Client configs contain sensitive data
Troubleshooting
Check if WireGuard module is loaded:
lsmod | grep wireguard
View logs:
journalctl -u wg-quick@wg0
If you're on Container VPS, this won't work. Switch to Linux VPS (KVM).