In this guide, you’ll learn how to install WireGuard VPN on Ubuntu 22.04 and 24.04 using a simple one-command script. This automated setup gets your VPN running in minutes, complete with client configuration and management tools.
WireGuard is a modern VPN protocol designed to be fast, secure, and lightweight. It’s easier to configure than traditional VPN solutions and is built directly into modern Linux kernels.
/root/client1.confadd-client.sh — add new clientsremove-client.sh — remove clients safelylist-clients.sh — view existing clientsrestart-wireguard.sh — restart the VPN serviceuninstall-wireguard.sh — fully remove WireGuardwget -O wireguard-vpn.sh https://cdn.xhosts.uk/scripts/wireguard-vpn.sh && chmod +x wireguard-vpn.sh && ./wireguard-vpn.sh
During setup, you’ll be asked whether you want QR code support enabled for quick mobile configuration. Choose yes if you want to connect easily using the WireGuard mobile app.
/root/client1.conf/root/wireguard/To add more clients later, run:
cd /root/wireguard
./add-client.sh
If QR code support was enabled during installation, you can scan the generated QR code directly using the WireGuard app on iOS or Android for instant setup.
For the best performance and stability, we recommend running WireGuard on a high-quality VPS. Low latency and reliable networking make a big difference for VPN performance.
This script provides a quick and efficient way to deploy a secure WireGuard VPN without dealing with manual configuration.
Built by admins, for admins.