# Wg Gen Web
Simple Web based configuration generator for [WireGuard](https://wireguard.com). [![pipeline status](https://gitlab.127-0-0-1.fr/vx3r/wg-gen-web/badges/master/pipeline.svg)](https://gitlab.127-0-0-1.fr/vx3r/wg-gen-web/commits/master) [![Go Report Card](https://goreportcard.com/badge/github.com/vx3r/wg-gen-web)](https://goreportcard.com/report/github.com/vx3r/wg-gen-web) ![Gitlab pipeline status (self-hosted)](https://img.shields.io/gitlab/pipeline/vx3r/wg-gen-web?gitlab_url=https%3A%2F%2Fgitlab.127-0-0-1.fr%2F) [![License: WTFPL](https://img.shields.io/badge/License-WTFPL-brightgreen.svg)](http://www.wtfpl.net/about/) ![Build multi-arch Docker Images via buildx](https://github.com/vx3r/wg-gen-web/workflows/Build%20multi-arch%20Docker%20Images%20via%20buildx/badge.svg) ![GitHub last commit](https://img.shields.io/github/last-commit/vx3r/wg-gen-web) ![Docker Pulls](https://img.shields.io/docker/pulls/vx3r/wg-gen-web) ![GitHub go.mod Go version](https://img.shields.io/github/go-mod/go-version/vx3r/wg-gen-web) ![GitHub code size in bytes](https://img.shields.io/github/languages/code-size/vx3r/wg-gen-web) ## Why another one ? All WireGuard UI implementations are trying to manage the service by applying configurations and creating network rules. This implementation only generates configuration and its up to you to create network rules and apply configuration to WireGuard. For example by monitoring generated directory with [inotifywait](https://github.com/inotify-tools/inotify-tools/wiki). The goal is to run Wg Gen Web in a container and WireGuard on host system. ## Features * Self-hosted and web based * Automatically select IP from the netowrk pool assigned to client * QR-Code for convenient mobile client configuration * Sent email to client with QR-code and client config * Enable / Disable client * Generation of `wg0.conf` after any modification * Dockerized * Pretty cool look ![Screenshot](wg-gen-web_screenshot.png) ## Running ### Docker The easiest way to run Wg Gen Web is using the container image ``` docker run --rm -it -v /tmp/wireguard:/data -p 8080:8080 -e "WG_CONF_DIR=/data" vx3r/wg-gen-web:latest ``` Docker compose snippet ``` version: '3.6' services: wg-gen-web: image: vx3r/wg-gen-web:latest container_name: wg-gen-web restart: unless-stopped expose: - "8080/tcp" environment: - WG_CONF_DIR=/data - WG_INTERFACE_NAME=wg0.conf - SMTP_HOST=smtp.gmail.com - SMTP_PORT=587 - SMTP_USERNAME=account@gmail.com - SMTP_PASSWORD="*************" - SMTP_FROM="Wg Gen Web