WireGuard is the fastest, simplest modern VPN protocol — kernel-integrated, sub-100 line audit surface, and much faster than OpenVPN. Hostiger offers pre-configured WireGuard VPS plans from $15/mo. This guide covers both the pre-configured path and manual setup on any Linux VPS.
Fastest path: order a Hostiger WireGuard VPS from $15/mo. WireGuard is pre-installed, IP-forward is enabled, and firewall rules are set up. Skip to step 5 if you use this path.
On any Ubuntu 22.04/24.04 VPS, run apt update && apt install wireguard-tools -y. Verify with wg --version.
Run wg genkey | tee privatekey | wg pubkey > publickey. This creates the server's key pair. Copy privatekey and publickey content to a safe place — you'll need both.
Create the config with an internal subnet (10.8.0.0/24), the server's private key, and a listen port (51820). Add PostUp and PostDown rules for NAT masquerading on your public interface.
Set net.ipv4.ip_forward=1 in /etc/sysctl.conf, then sysctl -p. Start the tunnel with systemctl enable --now wg-quick@wg0.
Generate a client key pair on your laptop. Add a [Peer] block to wg0.conf with the client's public key and its AllowedIPs (e.g., 10.8.0.2/32). Restart the tunnel: systemctl restart wg-quick@wg0.
Create a config file for the client with the client's private key, the server's public key, endpoint (server-ip:51820) and DNS (1.1.1.1). Import into the WireGuard app on iOS/Android/macOS/Windows/Linux.
Activate the tunnel on the client. Visit ipleak.net — you should see the Hostiger VPS IP as your public IP. Run wg show on the server to confirm the handshake.
Deploy a Hostiger VPS in under 60 seconds and put this guide into action.
Get a WireGuard VPS