WireGuard on Ubuntu 24.04

The WireGuard image turns a server into your own VPN in minutes: Ubuntu 24.04, the WireGuard kernel module, IP forwarding and NAT already set up, plus a small web UI where you create a peer and scan its QR code with the phone app. It runs well on the smallest plan, P1 at $3.95 a month.

Image facts

Image
WireGuard on Ubuntu 24.04
Type
App image (Ubuntu 24.04 with the app set up)
Architectures
x86-64 and Arm64 (all four families)
Price
Free on every plan
Login
root over SSH with your key, or a one-time root password
Locations
All 15

Sizes that suit it

PlanWhySizePer monthOrder from
P1Personal or family VPN in any of the 15 cities1 vCPU, 1 GB RAM, 20 GB NVMe$3.95$47.40 for 12 months
P2More peers and extra services next to the VPN1 vCPU, 2 GB RAM, 40 GB NVMe$6.95$41.70 for 6 months
S4A VPN plus small services, Europe only2 vCPU, 4 GB RAM, 40 GB NVMe$4.25$51.00 for 12 months

What does the WireGuard image set up?

WireGuard is part of the Linux kernel that Ubuntu 24.04 ships, so the VPN itself needs no extra daemon. The image adds what turns a kernel module into a working server: an interface with its key pair, IPv4 forwarding enabled in sysctl, NAT rules so connected devices reach the internet through the server's public IP, and a web UI that writes peer entries for you.

The web UI is the part people value most. Creating a peer gives you a ready .conf file to import on a laptop and a QR code for the WireGuard apps on iOS and Android. You can disable a peer when a phone is lost, without touching the others.

The VPN listens on a single UDP port. Since WireGuard does not answer packets that are not signed with a known key, a port scan of the server shows nothing on it.

How do I log in and add the first device?

Log in over SSH first. The message of the day shows where the web UI is reached and the login details the image generated for it, together with the UDP port the VPN uses. Then open the web UI in a browser, sign in, and create a peer named after the device.

On a phone, install the official WireGuard app, choose to add a tunnel from a QR code and scan the code from the web UI. On a laptop, download the config and import it in the WireGuard client. Switch the tunnel on and open any IP-check site: it should show the server's address and the city you deployed in.

If the tunnel connects but nothing loads, check wg show on the server. A handshake time next to the peer means the keys are fine and the problem is DNS or routing on the device.

How much CPU and memory does a WireGuard server use?

Very little. WireGuard runs in the kernel and uses modern, fast cryptography, so one vCPU can push several hundred megabits per second of encrypted traffic. The web UI and Ubuntu together stay well under 300 MB of memory. For a person or a family with up to ten devices, 1 vCPU, 1 GB RAM, 20 GB NVMe is all the hardware it takes.

Bandwidth is the thing to size for. Whatever your devices download through the VPN leaves the server again toward the device, so a month of streaming on two phones can add up to hundreds of GB. Every plan in Europe includes 20 TB of outgoing traffic. In North America, Asia-Pacific and Sao Paulo the allowance follows the plan: 0.5 TB on P1, 1 TB on P4. Extra outgoing traffic costs $0.72 per TB in Europe and North America and $4.98 in Asia-Pacific and Sao Paulo. Incoming traffic is always free.

How do I keep the web UI safe?

The VPN port is safe to leave open; the web UI is the part to protect, because anyone who logs in there can create a peer for themselves. Pick one of these setups:

  • Reach the UI only through the tunnel: once your own device is connected, allow the UI port only from the VPN subnet with ufw.
  • Use an SSH tunnel: ssh -L 8080:127.0.0.1:<ui-port> root@your-server-ip, then browse to http://localhost:8080.
  • Put it on a domain behind Nginx with a Let's Encrypt certificate and a strong password, if several admins need it.

A minimal ufw set is ufw allow OpenSSH, ufw allow <vpn-port>/udp and ufw enable. Keep the NAT rules the image created when you edit firewall settings, or connected devices lose internet access. Our SSH hardening guide covers keys-only login for port 22.

What should I back up on a VPN server?

Almost nothing changes on a WireGuard server, which makes backups easy. The important data is the server key pair and the peer list; with those, every existing device keeps working after a restore. Copy the WireGuard configuration directory and the data folder of the web UI (the message of the day names it) to your own computer after you add or remove devices.

If you lose them, the fallback is quick too: rebuild the server with this image from the console (the IP addresses stay the same), create new peers and rescan the QR codes on each device. For a VPN used by a handful of devices this takes ten minutes, which is why many owners skip the backup add-on here. If you want it anyway, it costs $0.79 a month on P1.

How do I update WireGuard and the web UI?

WireGuard updates with the kernel: apt update && apt upgrade installs the newest Ubuntu kernel, and a reboot loads it. Turn on unattended-upgrades for security fixes and reboot once a month, or when /var/run/reboot-required appears.

The web UI is a separate component and follows its own update path, shown in the message of the day for the image. Update it the same day you update the system so both stay current. Existing tunnels keep working through a web UI update; only the admin page is unavailable for a moment.

After a kernel reboot, confirm the interface is back with wg show. The server starts the tunnel automatically, and devices reconnect on their own within a minute.

Which plan and city should I pick for a VPN?

Choose the city first, since a VPN exits to the internet where the server stands. All 15 locations can run the WireGuard image, from Frankfurt and London to Ashburn, Toronto, Sao Paulo, Singapore, Tokyo, Mumbai and Sydney, at the same monthly price.

P1 at $3.95 a month ($47.40 for 12 months) is the right plan for nearly everyone; it is the cheapest server we sell and runs in every city. Move up only for traffic or many users: P2 doubles the memory, and in Europe a Shared vCPU plan such as S4 gives 2 vCPU, 4 GB RAM, 40 GB NVMe for a VPN that also runs a few other small services. The VPN use case compares the cities for streaming and remote work.

WireGuard on Ubuntu 24.04 questions

Is WireGuard faster than OpenVPN on a small server?

Usually yes. It runs in the kernel with lightweight cryptography, so the smallest plan reaches speeds that would need more CPU with OpenVPN.

How many devices can one server handle?

Dozens on P1. CPU is rarely the limit; the monthly outgoing traffic of the plan is.

Does the VPN support IPv6?

Every server has an IPv6 /64. The image routes IPv4 through the tunnel; IPv6 for peers can be added by giving the interface an IPv6 range and adding the matching NAT or routing rules.

Can I change the city of my VPN later?

Order a server in the new city with this image and add your devices again. A server cannot be moved between locations.

Is the web UI required?

No. You can manage peers with wg and the config files by hand; the UI only saves time and creates the QR codes.

Start a WireGuard server

Choose WireGuard on Ubuntu 24.04 when you create the server, or rebuild an existing one with it.