- Install Docker
If you haven't installed Docker yet, install it by running:
curl -sSL https://get.docker.com | sh
sudo usermod -aG docker $(whoami)
exit
And log in again.
- Run WireGuard Easy To automatically install & run wg-easy, simply run:
docker run --detach \
--name wg-easy \
--env LANG=de \
--env WG_HOST=<🚨YOUR_SERVER_IP> \
--env PASSWORD_HASH='<🚨YOUR_ADMIN_PASSWORD_HASH>' \
--env PORT=51821 \
--env WG_PORT=51820 \
--volume ~/.wg-easy:/etc/wireguard \
--publish 51820:51820/udp \
--publish 51821:51821/tcp \
--cap-add NET_ADMIN \
--cap-add SYS_MODULE \
--sysctl 'net.ipv4.conf.all.src_valid_mark=1' \
--sysctl 'net.ipv4.ip_forward=1' \
--restart unless-stopped \
ghcr.io/wg-easy/wg-easy
💡 Replace <🚨YOUR_SERVER_IP> with your WAN IP, or a Dynamic DNS hostname.
💡 Replace <🚨YOUR_ADMIN_PASSWORD_HASH> with a bcrypt password hash to log in on the Web UI. See How_to_generate_an_bcrypt_hash.md for instructions on how to generate a hashed password.
The Web UI will now be available on http://0.0.0.0:51821.
The Prometheus metrics will now be available on http://0.0.0.0:51821/metrics. Grafana dashboard 21733
💡 Your configuration files will be saved in ~/.wg-easy
WireGuard Easy can be launched with Docker Compose as well - just download docker-compose.yml, make necessary adjustments and execute docker compose up --detach.
客户端演示: