1
0
mirror of https://github.com/donaldzou/WGDashboard.git synced 2024-11-22 07:10:09 +01:00
Simplest dashboard for WireGuard VPN written in Python w/ Flask
Go to file
2021-05-08 12:35:22 -04:00
.github/ISSUE_TEMPLATE Update issue templates 2021-04-10 12:49:34 -04:00
img Push Logo 2021-04-12 23:16:12 -04:00
src v2.0-beta-6 Commit 2021-05-05 15:16:32 -04:00
.all-contributorsrc docs: update .all-contributorsrc [skip ci] 2021-04-13 02:29:48 +00:00
.gitignore Commit 2021-05-04 21:26:40 -04:00
LICENSE Initial commit 2020-10-18 01:08:59 -04:00
README.md Update README.md 2021-05-08 12:35:22 -04:00


I'm looking for someone that have experiences on migrating this project to a Docker app, with a complete solution ;) If you know how please comment in here.


Wireguard Dashboard

Monitoring WireGuard is not convinient, need to login into server and type wg show. That's why this platform is being created, to view all configurations and manage them in a easier way.

📣 What's New: Version 2.0

⚠️ Update from v1.x.x

  1. Stop the dashboard if it is running.
  2. You can use git pull https://github.com/donaldzou/Wireguard-Dashboard.git v2.0 to get the new update inside Wireguard-Dashboard directory.
  3. Proceed Step 2 & 3 in the Install step down below.

  • Added login function to dashboard

    • I'm not using the most ideal way to store the username and password, feel free to provide a better way to do this if you any good idea!
  • Added a config file to the dashboard

  • Dashboard config can be change within the Setting tab on the side bar

  • Adjusted UI

  • And much more!

💡 Features

  • Add peers for each WireGuard configuration

  • Manage peer

  • Delete peers

  • And many more coming up! Welcome to contribute to this project!

📝 Requirement

  • Ubuntu or Debian based OS, other might work, but haven't test yet. Tested on the following OS:

    • Ubuntu 18.04.1 LTS
    • If you have tested on other OS and it works perfectly please provide it to me!
  • ‼️ Make sure you have Wireguard and Wireguard-Tools (wg-quick) installed.‼️ How to install?

  • Configuration files under /etc/wireguard

    • Note: For peers, PublicKey & AllowedIPs is required.
  • Python 3.7+ & Pip3

    $ sudo apt-get install python3 python3-pip
    

🛠 Install

1. Download Wireguard Dashboard

$ git clone -b v2.0 https://github.com/donaldzou/Wireguard-Dashboard.git

2. Install Python Dependencies

$ cd Wireguard-Dashboard/src
$ python3 -m pip install -r requirements.txt

3. Install & run Wireguard Dashboard

$ sudo sh wgd.sh start

Access your server with port 10086 ! e.g (http://your_server_ip:10086), continue to read to on how to change port and ip that dashboard is running with.

🪜 Usage

1. Start/Stop/Restart Wireguard Dashboard

$ cd Wireguard-Dashboard/src
$ sudo sh wgd.sh start    # Start the dashboard in background
$ sudo sh wgd.sh debug    # Start the dashboard in foreground (debug mode)
$ sudo sh wgd.sh stop     # Stop the dashboard
$ sudo sh wgd.sh restart  # Restart the dasboard
$ sudo sh wgd.sh update   # Update the dashboard

⚠️ For first time user please also read the next section.

✂️ Dashboard Configuration

Since version 2.0, Wireguard Dashboard will be using a configuration file called wg-dashboard.ini, (It will generate automatically after first time running the dashboard). More options will include in future versions, and for now it included the following config:

[Account]

username - Username (Default: admin)

password - Password, will be hash with SHA256 (Default: admin).

[Server]

wg_conf_path - The path of all the Wireguard configurations (Default: /etc/wireguard)

app_ip - IP address the flask will run with (Default: 0.0.0.0)

app_port - Port the flask will run with (Default: 10086)

auth_req - Does the dashboard need authentication (Default: true)

  • If auth_req = false , user will not be access the Setting tab due to security consideration. User can only change the file directly in system.

version - Dashboard Version

All these settings will be able to configure within the dashboard in Settings on the sidebar, without changing the actual file. Except version and auth_req due to security consideration.

How to update the dashboard?

$ cd wireguard-dashboard
$ sudo sh wgd.sh update  # Perform update
$ sudo sh wgd.sh start   # Start dashboard

🔍 Screenshot

Index Image

Index Page

Signin Image

Signin Page

Configuration Image

Configuration Page

Settings Image

Settings Page

Contributors

All Contributors

Thanks goes to these wonderful people (emoji key):


antonioag95

⚠️ 💻

tonjo

💻

This project follows the all-contributors specification. Contributions of any kind welcome!