Skip to content

WireGuard on a VPS

VPN server in the Linux kernel

Category
VPN / Proxy
Hosting
VPN server
Author
Jason A. Donenfeld; installer by angristan
License
GPL-2.0

The script is free · VPS from $2.79 per month · installs in about 60 seconds

Install over SSH

root@vps:~# curl -O https://raw.githubusercontent.com/angristan/wireguard-install/master/wireguard-install.sh && chmod +x wireguard-install.sh && sudo ./wireguard-install.sh

  • SystemUbuntu 24.04 · x86_64ok
  • Sourcegithub.com/angristan/wireguard-installok
  • Port51820/udplisten

✓ WireGuard installed · about 60 seconds

root@vps:~#

Install command from the library. Output is shortened and may differ on your server.

What it is

  • VPN
  • UDP
  • Personal VPN
  • QR code

WireGuard is a modern VPN protocol built into the Linux kernel. It is faster than OpenVPN and IPsec, uses modern cryptography and fits into a few thousand lines of code, which makes it easy to audit.

Your own WireGuard on a VPS is a personal VPN for yourself, your family or your team: no third-party logs, a dedicated IP and the server's full bandwidth. Clients are available for Windows, macOS, Linux, Android and iOS.

Installation is handled by the popular angristan/wireguard-install script (MIT): it installs the packages, configures NAT and the firewall, and creates the first client with a QR code.

  • Runs in the Linux kernel with minimal CPU load
  • Fast reconnection when your phone switches networks
  • IPv4 and IPv6 support
  • Client config as a single file or QR code
  • Script menu: add, list and revoke clients

Recommended plan

For WireGuard: at least 1 vCPU, 2 GB RAM and 10 GB NVMe.

Minimum to run
1 vCPU · 1 GB RAM · 10 GB disk
Systems
Ubuntu 22.04 · Ubuntu 24.04 · Debian 11 · Debian 12 · AlmaLinux 9

How to install

Three steps in the bot or one command over SSH; installation takes about 60 seconds.

  1. 01

    Choose a plan in the bot

    Open @ExpressHost_bot and pay for a VPS. The server will be ready in about 60 seconds.

  2. 02

    Add WireGuard

    At the “Add-ons” step pick the script from the library, or run it later: Server settings → Scripts.

  3. 03

    Finish the setup

    Answer the script's prompts (IP, port, DNS) and enter a name for the first client

Manually over SSH

Connect to the server as root and run the command. Supported systems: Ubuntu 22.04, Ubuntu 24.04, Debian 11, Debian 12, AlmaLinux 9.

Install command
curl -O https://raw.githubusercontent.com/angristan/wireguard-install/master/wireguard-install.sh && chmod +x wireguard-install.sh && sudo ./wireguard-install.sh

Ports

WireGuard ports
PortProtocolPurpose
51820udpWireGuard tunnel (the script suggests a random port 49152–65535; you can set any)

After installation

  1. 1.Answer the script's prompts (IP, port, DNS) and enter a name for the first client
  2. 2.Scan the QR code in the WireGuard app or download /root/wg0-client-NAME.conf
  3. 3.To add or revoke a client, run ./wireguard-install.sh again
  4. 4.Check connections with wg show

WireGuard FAQ

Didn’t find an answer? Message @ExpressHost_SupportBot.

How many clients can I connect?

The limit is set by the subnet, not the plan: up to 253 clients in the default /24. CPU load is minimal; the bottleneck is usually the server's bandwidth.

How do I update WireGuard?

The module is part of the kernel and the tools come from the distribution repository, so updating is a regular apt update && apt upgrade.

Where are the configs?

The server config is /etc/wireguard/wg0.conf, the script parameters are in /etc/wireguard/params, and client configs are in the home directory of the user who ran the script.

WireGuard is blocked. What can I do?

Plain WireGuard is easy to detect by its traffic. If connections are being cut, try AmneziaWG or Xray panels with VLESS REALITY.

WireGuard installs at checkout — in the bot.