Minimal repo to install WireGuard on a single Ubuntu instance and rotate server keys.
- Launch an Ubuntu 22.04 or 20.04 EC2 instance (t2.micro / t3.micro) with a security group that allows:
- SSH from your IP (port 22)
- UDP 51820 from clients (or restrict to known IP ranges)
-
Copy
scripts/install-wireguard.shto the instance and run: sudo bash install-wireguard.sh -
Note the server public key printed by the script. Generate client configs on the server (example shown in the script) or use
wglocally. -
To rotate server keys later, copy
scripts/wg-rotate.shto the instance and run: sudo bash wg-rotate.sh