Self-hosted WireGuard VPN · Open Source

wg-easy: the easiest way to run a WireGuard VPN with a Web UI

Deploy your own private WireGuard VPN server in minutes — with a clean browser dashboard for managing clients, scanning QR codes, and watching live traffic. No config files. No command-line headaches.

100% free & open source Docker-based QR code onboarding
Encrypted WireGuard tunnel from your devices to your wg-easy server laptop 10.8.0.2 phone 10.8.0.3 encrypted udp/51820 wg-easy server ▸ web ui :51821 ▸ wireguard :51820 docker container
Overview

What is wg-easy?

wg-easy (WireGuard Easy) is a free, open-source tool that bundles a full WireGuard VPN server together with a web-based admin dashboard in a single Docker container. WireGuard itself is one of the fastest and most modern VPN protocols available, but managing it by hand means editing config files, generating key pairs, and running terminal commands for every new device.

wg-easy removes all of that friction. Once it's running, you open a browser, log in to the dashboard, and manage everything visually: create a client, scan its QR code with your phone, and you're connected. It's the go-to choice for homelab users, developers, and small teams who want a private, self-hosted VPN without becoming networking experts.

Because you host it yourself — on a cheap VPS or even a Raspberry Pi at home — you control the server, the logs, and the exit IP. Common uses include securely accessing your home network while traveling, protecting traffic on public Wi-Fi, and connecting remote teammates to internal services.

Capabilities

wg-easy features at a glance

[ web ui ]

Browser dashboard

Create, edit, enable, disable, and delete VPN clients from a clean web interface — no terminal required after setup.

[ qr ]

QR code onboarding

Each client gets an instant QR code. Scan it with the WireGuard mobile app and your phone is connected in seconds.

[ stats ]

Live traffic stats

See which clients are connected right now, with transfer (Tx/Rx) charts and last-handshake times per device.

[ docker ]

One-container deploy

Ships as a single Docker image with WireGuard, the UI, and routing rules pre-configured. Works with Docker Compose and Podman.

[ config ]

Downloadable configs

Export a ready-made .conf file for any client to use on Windows, macOS, and Linux desktops.

[ oss ]

Free & open source

Actively maintained open-source project with a large worldwide community. Your only cost is the server you run it on.

Quick start

How to install wg-easy with Docker

The full setup takes about five minutes on any Linux server with a modern kernel (5.6+). Here's the standard path used by most self-hosters:

  1. Install Docker on your server

    Any VPS or home server running Linux works. Install Docker with the official convenience script, then log out and back in.

  2. Create a Docker Compose file

    Newer versions of wg-easy use a bcrypt-hashed admin password for the web UI instead of plain text — remember to double every $ sign in the hash inside your compose file.

    docker-compose.yml
    services:
      wg-easy:
        image: ghcr.io/wg-easy/wg-easy
        container_name: wg-easy
        environment:
          # Your server's public IP or domain
          - WG_HOST=YOUR_SERVER_IP
          # bcrypt hash of your admin password ($ doubled)
          - PASSWORD_HASH=YOUR_BCRYPT_HASH
        volumes:
          - etc_wireguard:/etc/wireguard
        ports:
          - "51820:51820/udp"  # WireGuard tunnel
          - "51821:51821/tcp"  # Web UI
        cap_add:
          - NET_ADMIN
          - SYS_MODULE
        sysctls:
          - net.ipv4.ip_forward=1
          - net.ipv4.conf.all.src_valid_mark=1
        restart: unless-stopped
    
    volumes:
      etc_wireguard:
  3. Start the container

    bash
    $ docker compose up -d
    $ docker compose logs -f wg-easy  # verify it's running
  4. Open the dashboard & add clients

    Visit http://YOUR_SERVER_IP:51821, log in, and click New Client. Scan the QR code with the WireGuard app or download the config file. Don't forget to forward UDP port 51820 on your router if hosting at home.

  5. Harden it (recommended)

    Put the web UI behind a reverse proxy (Caddy or Nginx) with HTTPS, use a strong admin password, and pull image updates regularly with docker compose pull.

Why wg-easy

wg-easy vs manual WireGuard vs commercial VPNs

Each approach has a place. This is how they compare for a typical self-hoster:

Aspectwg-easyManual WireGuardCommercial VPN
Setup time~5 minutes30–60 minutesInstant
Web admin UIYesNoApp only
You control the server & logsYesYesNo
Access your home/office LANYesYesNo
QR code client setupBuilt-inManualBuilt-in
Monthly costServer only (~$4+)Server only$3–12 subscription
Skill requiredBeginnerAdvancedNone
Get started

Download wg-easy resources

Everything you need to launch your own WireGuard VPN today. The starter files below are generated instantly in your browser — no sign-up required.

YAML · 1 KB

docker-compose.yml

Ready-to-use Compose file with WireGuard ports, kernel capabilities, and volume mapping pre-configured. Just add your server IP and password hash.

ENV · 1 KB

.env starter template

A commented environment template covering the most useful wg-easy variables: host, ports, DNS, allowed IPs, and language settings.

TXT · Checklist

Setup checklist

A printable pre-flight checklist: server requirements, port forwarding, security hardening, and post-install verification steps.

Real-world scenarios

What can you do with wg-easy?

Access your home network anywhere

Reach your NAS, smart-home dashboard, security cameras, or media server from anywhere in the world — as if you were sitting at home.

Stay safe on public Wi-Fi

Route your phone and laptop traffic through your own encrypted tunnel at airports, cafés, and hotels, keeping snoopers out of your data.

Connect a remote team

Give teammates secure access to internal tools, staging servers, and databases without exposing anything to the public internet.

Use your own trusted exit IP

Browse with the IP address of your own server instead of a shared commercial VPN — useful for consistent access and fewer captchas.

Guides & tutorials

Learn more on the wg-easy blog

Step-by-step tutorials covering installation, security hardening, Raspberry Pi setups, port forwarding, troubleshooting, and backups — everything you need to master your self-hosted VPN.

Ready to launch your own VPN?

Grab the starter files and have wg-easy running before your coffee gets cold.

Download starter files
Common questions

wg-easy FAQ

What is wg-easy used for?

wg-easy is used to self-host a private WireGuard VPN with an easy web dashboard. Popular use cases: secure remote access to a home network or NAS, safe browsing on public Wi-Fi, connecting remote team members to internal tools, and routing traffic through your own trusted server.

Is wg-easy free?

Yes — wg-easy is 100% free and open source. Your only cost is the server it runs on, which can be a $4/month VPS or hardware you already own, like a Raspberry Pi.

Do I need Docker to run wg-easy?

Docker (or Podman) is the recommended way. The official image bundles WireGuard, the web UI, and all networking rules, so a single docker compose up -d gets you a working VPN.

Is wg-easy secure?

The VPN tunnel uses WireGuard's modern cryptography, which is considered state of the art. The main thing to protect is the admin web UI: use a strong bcrypt-hashed password, serve it over HTTPS via a reverse proxy, avoid exposing it publicly if you don't need to, and keep the container updated.

wg-easy vs commercial VPN — which should I choose?

Choose a commercial VPN if you mainly want to change your apparent location with zero setup. Choose wg-easy if you want to reach your own network remotely, control your own logs and exit IP, or avoid monthly VPN subscriptions.

Can I run wg-easy on a Raspberry Pi or NAS?

Yes. wg-easy runs well on ARM devices like the Raspberry Pi and is available as a community app on NAS platforms such as TrueNAS. Anywhere Docker runs with a WireGuard-capable kernel, wg-easy can run.