06Templates (apps on your server)
WireGuard VPN with a management page (template)
Set up your own WireGuard VPN on your VPS using a template: add devices, scan the QR code, manage over HTTPS or an SSH tunnel, fix connection problems.
In short
The template installs wg-easy in Docker: WireGuard plus a management page where you add devices and get the QR code for the WireGuard app. The management page is never open to the internet – with a domain only over HTTPS, without a domain only through an SSH tunnel.
Requirements
Section titled “Requirements”- at least 768 MB RAM, 3 GB free storage
- a free UDP port for the VPN (default 51820). If your server is in the Server Hub’s private network, that already uses 51820 – use something like 51830 then.
- with a domain: A record pointing to your server’s IP, ports 80 and 443 free
Installation
Section titled “Installation”- Server Hub → your server → Templates → WireGuard VPN → Install.
- Optionally enter a domain for the management page and the VPN port.
- Start installation. After about 4 minutes, you get the user
adminand a password.
Opening the management page
Section titled “Opening the management page”- With a domain: open
https://your-domainin the browser. - Without a domain: on your PC, run
ssh -L 51821:127.0.0.1:51821 root@YOUR-SERVER-IP, stay logged in and openhttp://127.0.0.1:51821in the browser.
Connecting devices
Section titled “Connecting devices”On the management page, create an access for each device. On a phone, you scan the QR code with the WireGuard app; on a PC, you download the configuration file and import it into WireGuard.
Files and commands
Section titled “Files and commands”| What | Where |
|---|---|
| Keys and devices | /opt/nh-apps/wireguard/data |
| Restart | docker restart nh-wireguard |