Coder Social home page Coder Social logo

snowzach / wg-ui Goto Github PK

View Code? Open in Web Editor NEW

This project forked from embarkstudios/wg-ui

0.0 1.0 0.0 2.98 MB

WireGuard Web UI for self-serve client configurations, with optional auth.

License: Apache License 2.0

Go 43.71% Dockerfile 2.09% JavaScript 19.01% Makefile 1.97% Shell 2.42% Svelte 28.83% SCSS 0.78% EJS 1.20%

wg-ui's Introduction

WG UI

Build Status Embark Contributor Covenant

A basic, self-contained management service for WireGuard with a self-serve web UI.
Current stable release: v1.3.0

Features

  • Self-serve and web based
  • QR-Code for convenient mobile client configuration
  • Optional multi-user support behind an authenticating proxy
  • Zero external dependencies - just a single binary using the wireguard kernel module
  • Binary and container deployment

Screenshot

Running

The easiest way to run wg-ui is using the container image. To test it, run:

docker run --rm -it --privileged --entrypoint "/wireguard-ui" -v /tmp/wireguard-ui:/data -p 8080:8080 embarkstudios/wireguard-ui:latest --data-dir=/data --log-level=debug

When running in production, we recommend using the latest release as opposed to latest.

Important to know is that you need to have WireGuard installed on the machine in order for this to work, as this is 'just' a UI to manage WireGuard configs.

Configuration

You can configure wg-ui using commandline flags or environment variables. To see all available flags run:

docker run --rm -it embarkstudios/wireguard-ui:latest -h
./wireguard-ui -h

You can alternatively specify each flag through an environment variable of the form WIREGUARD_UI_<FLAG_NAME>, where <FLAG_NAME> is replaced with the flag name transformed to CONSTANT_CASE, e.g.

docker run --rm -it embarkstudios/wireguard-ui:latest --log-level=debug

and

docker run --rm -it -e WIREGUARD_UI_LOG_LEVEL=debug embarkstudios/wireguard-ui:latest

are the same.

Docker images

There are two ways to run wg-ui today, you can run it with kernel module installed on your host which is the best way to do it if you want performance.

docker pull embarkstudios/wireguard-ui:latest

If you however do not have the possibility or interest in having kernel module loaded on your host, there is now a solution for that using a docker image based on wireguard-go. Keep in mind that this runs in userspace and not in kernel module.

docker pull embarkstudios/wireguard-ui:userspace

Both images are built for linux/amd64, linux/arm64 and linux/arm/v7. If you would need it for any other platform you can build wg-ui binaries with help from the documentation.

Install without Docker

You need to have WireGuard installed on the machine running wg-ui.

Unless you use the userspace version with docker you're required to have WireGuard installed on your host machine.

A few installation guides:
Ubuntu 20.04 LTS
CentOS 8
Debian 10

Go installation (Debian)

Install latest version of Go from (https://golang.org/dl/)

sudo tar -C /usr/local -xzf go$VERSION.$OS-$ARCH.tar.gz

Setup environment

Bash: ~/.bash_profile
ZSH: ~/.zshrc

export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin
export GOPATH=$HOME/go

Install LTS version of nodejs for frontend.

sudo apt-get install curl software-properties-common
curl -sL https://deb.nodesource.com/setup_12.x | sudo bash -
sudo apt-get install nodejs

Fetch wg-ui

git clone https://github.com/EmbarkStudios/wg-ui.git && cd wg-ui

Build binary with ui

make build

Crosscompiling

make build-amd64
make build-armv5
make build-armv6
make build-armv7

Build step by step

make ui
make build

Developing

Start frontend server

npm install --prefix=ui
npm run --prefix=ui dev

Use frontend server when running the server

make build
sudo ./bin/wireguard-ui --log-level=debug --dev-ui-server http://localhost:5000

Contributing

We welcome community contributions to this project.

Please read our Contributor Guide for more information on how to get started.

License

Licensed under either of

at your option.

wg-ui's People

Contributors

suom1 avatar dln avatar dependabot[bot] avatar sohalt avatar spetzreborn avatar gertdreyer avatar freddd avatar lpil avatar sclem avatar phil535 avatar justnom avatar ilya-zlobintsev avatar fossabot avatar ikaruswill avatar thomasf avatar eest avatar luna-duclos avatar theseal avatar condemil avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.