CloudLinux.ro
Applications

How to install WireGuard VPN (wg-easy) on a Cloud VPS

Updated 7/18/2026

WireGuard with wg-easy gives you a modern, fast VPN server with a simple web UI for managing devices and configurations.

Running the network service on your own VPS keeps traffic inside your infrastructure, with a dedicated IP and no third-party restrictions.

One-click install on cloudlinux.ro

The fastest way: WireGuard VPN (wg-easy) installs automatically at the first boot of a new server.

  1. Create a Cloud VPS from the control panel.
  2. In the configuration step, pick WireGuard VPN (wg-easy) from the app catalog.
  3. Start the server. The install runs in the background for a few minutes and its status shows on the server page.
  4. Access details and generated passwords are saved on the server in /root/app-credentials.txt. The app will be available on port 51821.

Manual install on any Ubuntu server

If you prefer doing it yourself, below is the exact script our automatic install runs. Execute it as root on a fresh Ubuntu server (24.04 recommended). It stops at the first error, and when it finishes you will find the access details in /root/app-credentials.txt.

export DEBIAN_FRONTEND=noninteractive
curl -fsSL https://get.docker.com | sh
printf 'net.ipv4.ip_forward=1\n' > /etc/sysctl.d/99-wireguard.conf
sysctl -p /etc/sysctl.d/99-wireguard.conf
IP=$(hostname -I | awk '{print $1}')
docker volume create wg_data
docker run -d --name wg-easy --restart=always \
  --cap-add NET_ADMIN --cap-add SYS_MODULE \
  --sysctl net.ipv4.conf.all.src_valid_mark=1 --sysctl net.ipv4.ip_forward=1 \
  -e WG_HOST="$IP" -e INSECURE=true \
  -p 51820:51820/udp -p 51821:51821/tcp \
  -v wg_data:/etc/wireguard ghcr.io/wg-easy/wg-easy:latest
printf 'WireGuard (wg-easy): http://%s:51821\nSeteaza parola de administrator la prima accesare, apoi adauga clientii VPN din interfata.\n' "$IP" > /root/app-credentials.txt

You can also save this script as a recipe in your account and reuse it on any new server.

Put this guide into practice on your own VPS

EU cloud servers, billed hourly, ready in minutes, with one-click installs for dozens of apps.

See pricing

Related tutorials