Guide

WireGuard one-command install script (beta)

Last updated: 1 December 2026

This free script turns a fresh Ubuntu or Debian server into your own WireGuard VPN and shows a QR code for your phone. It is new (beta): use it on a fresh server, read it first, and tell us if something fails.

Source on GitHub

Instant VPS from $7.99 a month

See Instant VPS plansHow ordering works

What you need

A server with Ubuntu 22.04 or 24.04, or Debian 12 or 13, and root access. It works on any provider; use it lawfully and within your provider's rules.

Install

Download it, compare the checksum, read it, then run it:

wget https://phantomvps.com/blog/wireguard.sh
sha256sum wireguard.sh
less wireguard.sh
sudo bash wireguard.sh

The SHA-256 of the current version is e7fca35617e007990902c028938aba1b3778e14e865714971dac9bb6c602e269. At the end, open the WireGuard app on your phone and scan the code.

What it changes

Add or remove devices

Give every device its own client:

sudo bash wireguard.sh add laptop
sudo bash wireguard.sh list
sudo bash wireguard.sh remove laptop

Good to know

Where to run it

If you need a server, see our Instant VPS plans: no ID documents, and you can pay with Monero or Bitcoin. Use them within our acceptable use policy.

Pay privately: Monero VPS and no-KYC VPS hosting, with no ID documents.

Questions and answers

Is it tested?
It is a beta. Please report problems to support@phantomvps.com.

Does it work on other providers?
Yes, on any server with a supported system and root access.

Does it collect anything?
No. It only downloads packages from your distribution.

How do I change the port?
Run it with WG_PORT set, for example: sudo WG_PORT=443 bash wireguard.sh

Related guides

Ready to try it? Instant VPS from $7.99 a month

See Instant VPS plansHow ordering works