This commit is contained in:
Shahrad Elahi 2024-04-27 02:51:29 +03:30
parent 494cdd5f80
commit 118db7f8d5

View File

@ -1,4 +1,7 @@
# WireGuard GUI (Easy Admin UI)
# WireGuard (Easy Admin UI)
[![CI](https://github.com/shahradelahi/wireadmin/actions/workflows/ci.yml/badge.svg)](https://github.com/shahradelahi/wireadmin/actions/workflows/ci.yml)
[![GPL-3.0 Licensed](https://img.shields.io/badge/License-GPL3.0-blue.svg?style=flat)](https://opensource.org/licenses/GPL-3.0)
![Screenshot](assets/screenshot-1.png)
@ -8,11 +11,14 @@
## Features
- Easy-to-use web-based admin UI
- Simple and friendly UI
- Support for multiple users and servers
- Support for **Tor for anonymized connections**
- Server connection statistics
- List, create, delete, or modify any server or user
- Scan QR codes or easily download the client configurations.
- Create QR codes
- Easily download the client configurations.
- Automatic Light/Dark Mode
## Installation
@ -22,20 +28,20 @@
### 2. Docker Image
#### Build from source
#### Build from source (recommended)
```bash
git clone https://github.com/shahradelahi/wireadmin
docker buildx build --tag litehex/wireadmin ./wireadmin
```
#### Pull from Docker Hub (recommended)
#### Pull from Docker Hub
```bash
docker pull litehex/wireadmin
docker pull litehex/wireadmin # OR ghcr.io/shahradelahi/wireadmin
```
### 4. Persistent Data
### 3. Persistent Data
WireAdmin store configurations at `/data`. It's important to mount a volume at this location to ensure that
your data is not lost during container restarts or updates.
@ -46,18 +52,19 @@ your data is not lost during container restarts or updates.
docker volume create wireadmin-data --driver local
```
### 4. Run
### 4. Run WireAdmin
When creating each server, ensure that you add the port exposure through Docker. In the below command, the port `51820`
is added for the WireGuard server.
**NOTE:** The port `3000` is for the WebUI, and can be changed with `PORT` environment variable, but for security
reasons, it's recommended to NOT expose **_any kind of WebUI_** to the public. It's up to you to remove it after
configuring
the Servers/Peers.
> 💡 The port `3000` is for the WebUI, and can be changed with `PORT` environment variable, but for security
> reasons, it's recommended to NOT expose **_any kind of WebUI_** to the public. It's up to you to remove it after
> configuring
> the Servers/Peers.
```bash
docker run --rm \
```shell
docker run --detach \
--name wireadmin \
-e WG_HOST=<YOUR_SERVER_IP> \
-e UI_PASSWORD=<ADMIN_PASSWORD> \
-p "3000:3000/tcp" \
@ -70,18 +77,24 @@ docker run --rm \
litehex/wireadmin
```
## Environment Options
> 💡 Replace `<YOUR_SERVER_IP>` with the IP address of your server.
> 💡 Replace `<ADMIN_PASSWORD>` with the password for the admin UI.
The Web UI will now be available on `http://0.0.0.0:3000`.
## Options
These options can be configured by setting environment variables using `-e KEY="VALUE"` in the `docker run` command.
| Option | Description | Optional |
| ----------------- | ------------------------------------------------------------------------------- | -------- |
| `WG_HOST` | The public IP address of the WireGuard server. | |
| `UI_PASSWORD` | The password for the admin UI. | |
| `HOST` | The hostname for the WebUI. (default: `127.0.0.1`) | ✔️ |
| `PORT` | The port for the WebUI. (default: `3000`) | ✔️ |
| `TOR_USE_BRIDGES` | Set this to `1` and then mount the bridges file at `/etc/torrc.d/bridges.conf`. | ✔️ |
| `TOR_*` | The `Torrc` proxy configuration. (e.g. `SocksPort` as `TOR_SOCKSPORT="9050"`) | ✔️ |
| Option | Description | Default | Optional |
| ----------------- | ------------------------------------------------------------------------------- | ------------------- | -------- |
| `WG_HOST` | The public IP address of the WireGuard server. | - | |
| `UI_PASSWORD` | The password for the admin UI. | `insecure-password` | |
| `HOST` | The hostname for the WebUI. | `127.0.0.1` | ✔️ |
| `PORT` | The port for the WebUI. | `3000` | ✔️ |
| `TOR_USE_BRIDGES` | Set this to `1` and then mount the bridges file at `/etc/torrc.d/bridges.conf`. | - | ✔️ |
| `TOR_*` | The `Torrc` proxy configuration. (e.g. `SocksPort` as `TOR_SOCKS_PORT="9050"`) | - | ✔️ |
## Reporting