Skip to content

Set Up WireGuard Easy on a Linux Server – Your Own VPN with a Web Interface

Set up WireGuard Easy on your Linux server: as a One-Click App with ready-made admin access, or manually with Docker Compose. Run your own VPN with a web interface and QR codes for your devices.

26 November 20265 min read1 Views0 helpful

Introduction

WireGuard Easy (wg-easy) combines the fast, lightweight WireGuard VPN protocol with a web interface on your server. Instead of managing keys and configuration files by hand, you can add your devices as clients in your browser and connect them using a QR code or configuration file. This lets you browse securely through your own server while on the go, or safely access services that should only be available over the VPN.

In this guide, we'll show you two ways to do this: the easy way using the One-Click Apps on your VPS, and manual installation using Docker Compose.

The easy way: WireGuard Easy as a One-Click App

The quickest way to get your own VPN is through the One-Click Apps on your VPS. The app sets itself up the first time it starts: it creates an admin account and sets your app's address as the server address for clients. You don't need to go through a setup wizard or use the console.

Requirements

  • A Linux VPS (Debian or Ubuntu) with One-Click Apps set up. See Set Up One-Click Apps for instructions.
  • At least 128 MB RAM for WireGuard Easy; 256 MB is recommended.
  • UDP port 51820 must be available. Since this port is fixed, only one WireGuard Easy installation can run on a VPS.

Install

  1. Open your VPS in the ZapX dashboard and go to the One-Click Apps tab.
  2. Search for WireGuard Easy in the App catalog and click Install app.
  3. Leave Use a custom subdomain or zap.cloud enabled and choose an address. You can use this address to access the web interface over HTTPS, and your clients will connect to it later.
  4. Under App configuration, you can keep all the default values: INSECURE is set to false, and DISABLE_IPV6 is set to true (IPv6 is disabled in the VPN).
  5. Click Queue installation. The app will be online in one to two minutes.
Info

Installing without a domain? Without a domain, the web interface is only available over HTTP. WireGuard Easy will then only let you log in if you set INSECURE to true. We recommend using a domain instead.

First login

The app creates the admin account during installation. You can find the credentials in the app settings (gear icon) under App environment > Automatically generated values: SERVICE_USER_ADMIN is the username (the default is zapx), and SERVICE_PASSWORD_ADMIN is the password. Click the eye icon to show the password, or the copy icon to copy it. Open the app's address and log in with these credentials.

After that, set your own password in WireGuard Easy by opening the profile in the top-right corner and selecting “Account.” You can also enable two-factor authentication there.

Add and connect clients

  1. In the web interface, click “New,” enter a name for the client, such as Laptop, and click “Create Client.” An expiration date is optional.
  2. Install the official WireGuard app on your device. It's available for Windows, macOS, Linux, Android, and iOS.
  3. On a smartphone, click the QR code icon for the client and scan the code with the WireGuard app. On a computer, use the download icon to download the configuration file, then import it into the app.
  4. Activate the tunnel. The web interface shows whether data is flowing for each client.

The configuration connects to <App address>:51820 over UDP and, by default, routes all of the device's internet traffic through the VPN. The DNS server is set to 1.1.1.1. Each client gets its own VPN address; the first client gets 10.8.0.2.

Warning

Treat configuration files like passwords The QR code and configuration file contain the client's private key. Anyone who has them can connect to your VPN. Create a separate client for each device, and disable or delete clients you no longer need.

Firewall, domain, and updates

  • Firewall: If you have enabled your VPS's Network firewall in the ZapX dashboard or a firewall on the server, UDP port 51820 must be open, or the connection won't work.
  • Change the domain: The app only sets the address for clients on its first startup. If you change the domain later under App actions, enter the new address in WireGuard Easy under “Admin Panel” > “Config” > “Host,” then redistribute the clients' configurations.
  • Updates: To check whether an update is available for your installation, go to the app settings (gear icon), select App update, and click Check for updates. If a new version is available, install it by clicking Apply update. Your clients will be kept.

Manual installation

The rest of this guide covers manual installation from the console using Docker Compose, for example, if you want to integrate WireGuard Easy into an existing server environment. This is based on the official wg-easy installation guide.

Requirements

  • A Linux server (x86_64 or arm64) running Debian or Ubuntu that you can access via SSH.
  • Docker with the Compose plugin. See our Set Up Docker guide for instructions on installing Docker.
  • A domain or the public IP address of your server for clients to connect to.

Start WireGuard Easy

Create a directory for the configuration, download the official Compose file, and start the container:

Code
sudo mkdir -p /etc/docker/containers/wg-easy
sudo curl -o /etc/docker/containers/wg-easy/docker-compose.yml https://raw.githubusercontent.com/wg-easy/wg-easy/master/docker-compose.yml
cd /etc/docker/containers/wg-easy
sudo docker compose up -d

The Compose file uses the ghcr.io/wg-easy/wg-easy:15 image and publishes two ports: 51820/UDP for WireGuard and 51821/TCP for the web interface. If a firewall is active on your server, open UDP port 51820; see Firewall Management on Linux.

Important

Web interface over HTTPS only The web interface is designed to run behind a reverse proxy with HTTPS. See Set Up a Reverse Proxy with nginx (destination: port 51821). For testing only on your own network, you can set the line INSECURE=true under environment in the Compose file. The developers warn that this is insecure.

Setup wizard

The first time you open the web interface, a wizard will guide you through the setup:

  1. Create a user with a username and password.
  2. Answer “No” to the question about an existing configuration. You only need to answer “Yes” if you want to import a configuration from version 14.
  3. Under “Host,” enter your domain or the public IP address of your server. Under “Port,” enter 51820.

After that, add clients as described above under Add and connect clients.

Update WireGuard Easy

The image with the 15 tag receives all version 15 updates that don't include incompatible changes. To update:

Code
cd /etc/docker/containers/wg-easy
sudo docker compose pull
sudo docker compose up -d

Always start and stop WireGuard Easy with docker compose up and docker compose down, not with start and stop. Otherwise, the container may be left in an inconsistent state the next time it starts.

Conclusion and further resources

Congratulations! Your own VPN with WireGuard Easy is now up and running. Find more information here:

Do you have questions that aren't answered here? Our support team is happy to help every day! 🙂

Free tools

Related tools for servers and developers

View all

Feedback

Was this article helpful?

Your feedback helps us prioritize and improve content.

0 of 0 people found this article helpful.

Personal support

Need more help than the guide provides?

Our ZAP-Hosting support team knows your product — briefly describe your issue and we'll help you personally.

Zappy knows this guide and answers you right in the chat.