Applies to: LifeinCloud Cloud VPS • Ubuntu 22.04 LTS

WireGuard is a fast, modern VPN protocol that is simple to configure. While LifeinCloud provides a 1-click WireGuard image, this guide shows you how to set it up manually.

Requirements

  • LifeinCloud VPS running Ubuntu 22.04
  • Root SSH access

Step 1 — Update the VPS

ssh root@YOUR_SERVER_IP
apt update && apt upgrade -y

Step 2 — Install WireGuard

apt install -y wireguard qrencode

Step 3 — Generate Keys

umask 077
wg genkey | tee /etc/wireguard/privatekey | wg pubkey > /etc/wireguard/publickey

Step 4 — Create Configuration File

nano /etc/wireguard/wg0.conf
[Interface]
Address = 10.0.0.1/24
PrivateKey = (contents of /etc/wireguard/privatekey)
ListenPort = 51820
SaveConfig = true

[Peer]
PublicKey = CLIENT_PUBLIC_KEY
AllowedIPs = 10.0.0.2/32

Step 5 — Enable and Start WireGuard

systemctl enable wg-quick@wg0
systemctl start wg-quick@wg0

Step 6 — Firewall Rules

ufw allow 51820/udp
Note: To avoid manual setup, you can deploy the 1-click WireGuard VPN image directly from the LifeinCloud control panel.
Was this answer helpful? 0 Users Found This Useful (0 Votes)