WGDashboard/README.md

421 lines
26 KiB
Markdown
Raw Normal View History

2021-04-13 11:18:57 +08:00
<p align="center">
2024-08-15 12:49:21 +08:00
<img alt="WGDashboard" src="./src/static/img/logo.png" width="128">
2021-04-13 11:18:57 +08:00
</p>
<h1 align="center">WGDashboard</h1>
2021-04-13 10:28:30 +08:00
2022-01-09 04:26:17 +08:00
2021-04-08 00:15:45 +08:00
<p align="center">
2024-08-15 12:53:23 +08:00
<img src="https://forthebadge.com/images/badges/made-with-python.svg">
<img src="https://forthebadge.com/images/badges/made-with-javascript.svg">
<img src="https://forthebadge.com/images/badges/license-mit.svg">
2024-08-15 12:56:28 +08:00
</p>
<p align="center">
2024-08-15 12:53:38 +08:00
<img src="https://forthebadge.com/images/badges/built-with-love.svg">
2021-04-08 00:15:45 +08:00
</p>
<p align="center">
2021-04-08 00:19:23 +08:00
<a href="https://github.com/donaldzou/wireguard-dashboard/releases/latest"><img src="https://img.shields.io/github/v/release/donaldzou/wireguard-dashboard"></a>
2021-12-07 03:15:22 +08:00
<a href="https://wakatime.com/badge/user/45f53c7c-9da9-4cb0-85d6-17bd38cc748b/project/5334ae20-e9a6-4c55-9fea-52d4eb9dfba6"><img src="https://wakatime.com/badge/user/45f53c7c-9da9-4cb0-85d6-17bd38cc748b/project/5334ae20-e9a6-4c55-9fea-52d4eb9dfba6.svg" alt="wakatime"></a>
2022-02-28 04:50:55 +08:00
<a href="https://hits.seeyoufarm.com"><img src="https://hits.seeyoufarm.com/api/count/incr/badge.svg?url=https%3A%2F%2Fgithub.com%2Fdonaldzou%2FWGDashboard&count_bg=%2379C83D&title_bg=%23555555&icon=github.svg&icon_color=%23E7E7E7&title=Visitor&edge_flat=false"/></a>
2021-04-08 00:15:45 +08:00
</p>
2024-08-03 05:27:28 +08:00
<p align="center">Monitoring WireGuard is not convenient, need to login into server and type <code>wg show</code>. That's why this project is being created, to view all configurations and manage them in a easy way.</p>
<p align="center"><small><i>This project is not affiliate to the official WireGuard Project</i></small></p>
2021-05-05 09:26:40 +08:00
2024-08-03 05:27:28 +08:00
## 📣 What's New: v4.0
- 🎉 **New Features**
2024-08-03 05:27:28 +08:00
- **Updated dashboard design**: Re-designed some of the section with more modern style and layout, the UI is faster and more responsive, it also uses less memory. But overall is still the same dashboard you're familiarized.
2024-08-15 11:57:45 +08:00
- **Docker Solution**: We now have 2 docker solutions! Thanks to @DaanSelen & @shuricksumy for providing them. For more information, please see the [Docker](#-docker-solutions) section below.
2024-08-03 05:27:28 +08:00
- **Peer Job Scheduler**: Now you can schedule jobs for each peer to either **restrict** or **delete** the peer if the peer's total / upload / download data usage exceeded a limit, or you can set a specific datetime to restrict or delete the peer.
2024-08-15 10:45:36 +08:00
- **Share Peer's QR Code with Public Link**: You can share a peer's QR code and `.conf` file without the need to loging in.
2024-08-15 12:48:27 +08:00
- **WGDashboard's REST API**: You can now request all the api endpoint used in the dashboard. For more details please review the [API Documentation](./docs/api-documents.md).
2024-08-03 05:27:28 +08:00
- **Logging**: Dashboard will now log all activity on the dashboard and API requests.
- **Time-Based One-Time Password (TOTP)**: You can enable this function to add one more layer of security, and generate the TOTP with your choice of authenticator.
- **Designs**
- **Real-time Graphs**: You can view real-time data changes with graphs in each configuration.
- **Night mode**: You know what that means, it avoids bugs ;)
- **Enforce Python Virtual Environment**: I noticed newer Python version (3.12) does not allow to install packages globally, and plus I think is a good idea to use venv.
2021-08-15 05:13:16 +08:00
- **🧐 Other Changes**
2024-08-15 11:52:14 +08:00
- **Deprecated jQuery from the project, and migrated and rewrote the whole front-end with Vue.js. This allows the dashboard is future proofed, and potential cross server access with a desktop app.**
2024-08-03 05:27:28 +08:00
- Rewrote the backend into a REST API structure
- Improved SQL query efficient
- Removed all templates, except for `index.html` where it will load the Vue.js app.
2021-09-04 05:32:51 +08:00
2024-08-15 10:45:36 +08:00
- **🥘 New Experimental Features**
- **Cross-Server Access**: Now you can access other servers that installed `v4` of WGDashboard through API key.
- **Desktop App**: Thanks to **Cross-Server Access**, you can now download an ElectronJS based desktop app of WGDashboard, and use that to access WGDashboard on different servers.
- > For more information, please scroll down to [🥘 Experimental Functions](#-experimental-functions)
2021-09-04 05:32:51 +08:00
2024-08-15 10:45:36 +08:00
> I can't thank enough for all of you who wait for this release, and for those who are new to this project, welcome :)
2024-08-15 11:53:28 +08:00
> Also, huge thanks to who contributed to this major release:
2024-08-15 10:45:36 +08:00
> @bolgovrussia, @eduardorosabales, @Profik, @airgapper, @tokon2000, @bkeenke, @kontorskiy777, @bugsse, @Johnnykson, @DaanSelen, @shuricksumy and many others!
2022-01-18 23:42:23 +08:00
2021-05-14 06:00:40 +08:00
<hr>
2022-01-18 23:42:23 +08:00
2021-08-04 06:06:22 +08:00
## Table of Content
2022-01-18 23:42:23 +08:00
2021-08-05 13:21:44 +08:00
- [💡 Features](#-features)
- [📝 Requirement](#-requirement)
- [🛠 Install](#-install)
- [🪜 Usage](#-usage)
2021-09-10 00:43:49 +08:00
- [Start/Stop/Restart WGDashboard](#startstoprestart-wgdashboard)
2021-09-10 00:45:09 +08:00
- [Autostart WGDashboard on boot](#autostart-wgdashboard-on-boot--v22)
2021-08-05 13:21:44 +08:00
- [✂️ Dashboard Configuration](#%EF%B8%8F-dashboard-configuration)
- [Dashboard Configuration file](#dashboard-configuration-file)
2021-08-06 12:08:30 +08:00
- [Generating QR code and peer configuration file (.conf)](#generating-qr-code-and-peer-configuration-file-conf)
2021-08-05 13:21:44 +08:00
- [❓ How to update the dashboard?](#-how-to-update-the-dashboard)
2024-08-15 11:52:14 +08:00
- [🐬 Docker Solutions](#-docker-solutions)
2024-08-15 12:48:27 +08:00
- [📖 How to use API Key & API Document](./docs/api-documents.md)
2022-01-19 01:33:21 +08:00
- [🥘 Experimental Functions](#-experimental-functions)
2021-08-05 13:21:44 +08:00
- [🔍 Screenshot](#-screenshot)
2024-08-15 11:52:14 +08:00
- [⏰ Changelog](./docs/api-documents.md)
2021-04-08 05:25:21 +08:00
## 💡 Features
2021-04-03 09:12:46 +08:00
2024-08-03 05:27:28 +08:00
- Automatically look for existing WireGuard configuration under `/etc/wireguard`
- Easy to use interface, provided credential and TOTP protection to the dashboard
- Manage peers and configuration
- Add Peers or by bulk with auto-generated information
- Edit peer information
- Delete peers with ease
- Restrict peers
2024-08-15 10:45:36 +08:00
- Generate QR Code and `.conf` file for peers, share it through a public link
2024-08-03 05:27:28 +08:00
- Schedule jobs to delete / restrict peer when conditions are met
- View real time peer status
- Testing tool: Ping and Traceroute to your peer
2021-04-03 09:12:46 +08:00
2021-05-06 02:38:10 +08:00
2021-04-08 05:25:21 +08:00
## 📝 Requirement
2021-04-03 09:12:46 +08:00
2021-08-06 12:00:32 +08:00
- Recommend the following OS, tested by our beloved users:
2024-08-15 10:45:36 +08:00
- [x] Ubuntu 18.04.1 LTS, 20.04.1 LTS, 22.04.4 LTS, 24.02 LTS, Fedora 38 [@Me]
2021-08-04 06:45:40 +08:00
- [x] Debian GNU/Linux 10 (buster) [❤️ @[robchez](https://github.com/robchez)]
- [x] AlmaLinux 8.4 (Electric Cheetah) [❤️ @[barry-smithjr](https://github.com/)]
- [x] CentOS 7 [❤️ @[PrzemekSkw](https://github.com/PrzemekSkw)]
2021-08-15 05:13:16 +08:00
> **If you have tested on other OS and it works perfectly please provide it to me in [#31](https://github.com/donaldzou/wireguard-dashboard/issues/31). Thank you!**
- **WireGuard** and **WireGuard-Tools (`wg-quick`)** are installed.
2021-08-15 05:13:16 +08:00
> Don't know how? Check this <a href="https://www.wireguard.com/install/">official documentation</a>
- Configuration files under **`/etc/wireguard`**, but please note the following sample
```ini
[Interface]
...
SaveConfig = true
2021-08-17 00:23:56 +08:00
# Need to include this line to allow WireGuard Tool to save your configuration,
# or if you just want it to monitor your WireGuard Interface and don't need to
# make any changes with the dashboard, you can set it to false.
2021-08-04 06:45:40 +08:00
2021-08-15 05:13:16 +08:00
[Peer]
PublicKey = abcd1234
AllowedIPs = 1.2.3.4/32
# Must have for each peer
```
2021-04-08 05:25:21 +08:00
2024-08-04 05:03:39 +08:00
- **Python 3.10** for v4.0+, **Python 3.7 - 3.9** for v2.0 - v3.0.6.2
2022-01-13 22:37:23 +08:00
2021-04-08 05:25:21 +08:00
## 🛠 Install
1. Download WGDashboard
2021-07-12 00:49:58 +08:00
2021-07-12 01:07:27 +08:00
```shell
2024-08-03 05:27:28 +08:00
git clone -b v4.0 https://github.com/donaldzou/WGDashboard.git wgdashboard
2021-08-15 05:13:16 +08:00
2. Open the WGDashboard folder
2021-04-03 09:12:46 +08:00
2021-07-12 01:07:27 +08:00
```shell
2021-09-10 00:43:49 +08:00
cd wgdashboard/src
2021-07-12 01:07:27 +08:00
```
2021-08-15 05:13:16 +08:00
3. Install WGDashboard
2021-04-03 09:12:46 +08:00
2021-08-15 05:13:16 +08:00
```shell
2021-09-04 05:32:51 +08:00
sudo chmod u+x wgd.sh
sudo ./wgd.sh install
2021-08-15 05:13:16 +08:00
```
2021-09-04 05:32:51 +08:00
4. Give read and execute permission to root of the WireGuard configuration folder, you can change the path if your configuration files are not stored in `/etc/wireguard`
2021-05-06 02:38:10 +08:00
2021-07-12 01:07:27 +08:00
```shell
2021-09-04 05:32:51 +08:00
sudo chmod -R 755 /etc/wireguard
2021-08-15 05:13:16 +08:00
```
5. Run WGDashboard
2021-08-15 05:13:16 +08:00
```shell
2024-08-03 05:27:28 +08:00
sudo ./wgd.sh start
2021-07-12 01:07:27 +08:00
```
2021-09-04 05:32:51 +08:00
2021-07-12 01:07:27 +08:00
**Note**:
> For [`pivpn`](https://github.com/pivpn/pivpn) user, please use `sudo ./wgd.sh start` to run if your current account does not have the permission to run `wg show` and `wg-quick`.
2021-09-04 05:32:51 +08:00
6. Access dashboard
2021-07-12 01:07:27 +08:00
Access your server with port `10086` (e.g. http://your_server_ip:10086), using username `admin` and password `admin`. See below how to change port and ip that the dashboard is running with.
2021-05-06 02:38:10 +08:00
2021-05-05 09:26:40 +08:00
## 🪜 Usage
#### Start/Stop/Restart WGDashboard
2021-04-03 09:12:46 +08:00
2021-07-03 01:28:29 +08:00
2021-05-14 06:00:40 +08:00
```shell
2021-09-10 00:43:49 +08:00
cd wgdashboard/src
2021-07-03 22:30:54 +08:00
-----------------------------
2021-08-15 05:13:16 +08:00
./wgd.sh start # Start the dashboard in background
2021-07-03 22:30:54 +08:00
-----------------------------
2021-08-15 05:13:16 +08:00
./wgd.sh debug # Start the dashboard in foreground (debug mode)
2021-07-03 22:30:54 +08:00
-----------------------------
2021-08-15 05:13:16 +08:00
./wgd.sh stop # Stop the dashboard
2021-07-03 22:30:54 +08:00
-----------------------------
2021-08-15 05:13:16 +08:00
./wgd.sh restart # Restart the dasboard
2021-07-03 02:31:33 +08:00
```
2020-10-18 14:09:14 +08:00
#### Autostart WGDashboard on boot (>= v2.2)
2021-08-04 06:45:40 +08:00
2021-08-15 05:13:16 +08:00
In the `src` folder, it contained a file called `wg-dashboard.service`, we can use this file to let our system to autostart the dashboard after reboot. The following guide has tested on **Ubuntu**, most **Debian** based OS might be the same, but some might not. Please don't hesitate to provide your system if you have tested the autostart on another system.
2021-08-04 06:45:40 +08:00
2021-08-15 05:13:16 +08:00
1. Changing the directory to the dashboard's directory
2021-08-04 06:45:40 +08:00
2021-08-15 05:13:16 +08:00
```shell
2021-09-10 00:43:49 +08:00
cd wgdashboard/src
2021-08-04 06:45:40 +08:00
```
2021-08-15 05:13:16 +08:00
2. Get the full path of the dashboard's directory
2021-08-04 06:45:40 +08:00
2021-08-15 05:13:16 +08:00
```shell
pwd
2021-09-10 00:43:49 +08:00
#Output: /root/wgdashboard/src
2021-08-04 06:45:40 +08:00
```
2021-08-15 05:13:16 +08:00
For this example, the output is `/root/wireguard-dashboard/src`, your path might be different since it depends on where you downloaded the dashboard in the first place. **Copy the the output to somewhere, we will need this in the next step.**
2021-08-04 06:45:40 +08:00
2021-08-15 05:13:16 +08:00
3. Edit the service file, the service file is located in `wireguard-dashboard/src`, you can use other editor you like, here will be using `nano`
2021-08-04 06:45:40 +08:00
2021-08-15 05:13:16 +08:00
```shell
nano wg-dashboard.service
2021-08-04 06:45:40 +08:00
```
You will see something like this:
2021-08-15 05:13:16 +08:00
```ini
2021-08-04 06:45:40 +08:00
[Unit]
2024-08-15 10:45:36 +08:00
After=syslog.target network-online.target
Wants=wg-quick.target
ConditionPathIsDirectory=/etc/wireguard
2021-08-04 06:45:40 +08:00
[Service]
2024-08-15 10:45:36 +08:00
Type=forking
PIDFile=<absolute_path_of_wgdashboard_src>/gunicorn.pid
WorkingDirectory=<absolute_path_of_wgdashboard_src>
ExecStart=<absolute_path_of_wgdashboard_src>/wgd.sh start
ExecStop=<absolute_path_of_wgdashboard_src>/wgd.sh stop
ExecReload=<absolute_path_of_wgdashboard_src>/wgd.sh restart
TimeoutSec=120
PrivateTmp=yes
2021-08-04 06:45:40 +08:00
Restart=always
[Install]
2024-08-15 10:45:36 +08:00
WantedBy=multi-user.target
2021-08-04 06:45:40 +08:00
```
2024-08-15 10:45:36 +08:00
Now, we need to replace all `<absolute_path_of_wgdashboard_src>` to the one you just copied from step 2. After doing this, the file will become something like this, your file might be different:
2021-08-04 06:45:40 +08:00
2021-08-15 05:13:16 +08:00
**Be aware that after the value of `WorkingDirectory`, it does not have a `/` (slash).** And then save the file after you edited it
2021-08-04 06:45:40 +08:00
2021-08-15 05:13:16 +08:00
4. Copy the service file to systemd folder
2021-08-04 06:45:40 +08:00
```bash
2024-08-15 10:45:36 +08:00
$ sudo cp wg-dashboard.service /etc/systemd/system/wg-dashboard.service
2021-08-04 06:45:40 +08:00
```
To make sure you copy the file successfully, you can use this command `cat /etc/systemd/system/wg-dashboard.service` to see if it will output the file you just edited.
2021-08-15 05:13:16 +08:00
5. Enable the service
2021-08-04 06:45:40 +08:00
```bash
$ sudo chmod 664 /etc/systemd/system/wg-dashboard.service
$ sudo systemctl daemon-reload
$ sudo systemctl enable wg-dashboard.service
$ sudo systemctl start wg-dashboard.service # <-- To start the service
```
2021-08-15 05:13:16 +08:00
6. Check if the service run correctly
2021-08-04 06:45:40 +08:00
```bash
$ sudo systemctl status wg-dashboard.service
```
And you should see something like this
2021-08-15 05:13:16 +08:00
```shell
2024-08-15 10:45:36 +08:00
● wg-dashboard.service
Loaded: loaded (/etc/systemd/system/wg-dashboard.service; enabled; vendor preset: enabled)
Active: active (running) since Wed 2024-08-14 22:21:47 EDT; 55s ago
Process: 494968 ExecStart=/home/donaldzou/Wireguard-Dashboard/src/wgd.sh start (code=exited, status=0/SUCCESS)
Main PID: 495005 (gunicorn)
Tasks: 5 (limit: 4523)
Memory: 36.8M
CPU: 789ms
CGroup: /system.slice/wg-dashboard.service
├─495005 /home/donaldzou/Wireguard-Dashboard/src/venv/bin/python3 ./venv/bin/gunicorn --config ./gunicorn.conf.py
└─495007 /home/donaldzou/Wireguard-Dashboard/src/venv/bin/python3 ./venv/bin/gunicorn --config ./gunicorn.conf.py
Aug 14 22:21:40 wg sudo[494978]: root : PWD=/home/donaldzou/Wireguard-Dashboard/src ; USER=root ; COMMAND=./venv/bin/gunicorn --config ./gunicorn.conf.py
Aug 14 22:21:40 wg sudo[494978]: pam_unix(sudo:session): session opened for user root(uid=0) by (uid=0)
Aug 14 22:21:40 wg wgd.sh[494979]: [WGDashboard] WGDashboard w/ Gunicorn will be running on 0.0.0.0:10086
Aug 14 22:21:40 wg wgd.sh[494979]: [WGDashboard] Access log file is at ./log/access_2024_08_14_22_21_40.log
Aug 14 22:21:40 wg wgd.sh[494979]: [WGDashboard] Error log file is at ./log/error_2024_08_14_22_21_40.log
Aug 14 22:21:40 wg sudo[494978]: pam_unix(sudo:session): session closed for user root
Aug 14 22:21:45 wg wgd.sh[494968]: [WGDashboard] Checking if WGDashboard w/ Gunicorn started successfully
Aug 14 22:21:47 wg wgd.sh[494968]: [WGDashboard] WGDashboard w/ Gunicorn started successfully
Aug 14 22:21:47 wg wgd.sh[494968]: ------------------------------------------------------------
Aug 14 22:21:47 wg systemd[1]: Started wg-dashboard.service.
2021-08-04 06:45:40 +08:00
```
2021-08-15 05:13:16 +08:00
If you see `Active:` followed by `active (running) since...` then it means it run correctly.
2021-08-04 06:45:40 +08:00
2021-08-15 05:13:16 +08:00
7. Stop/Start/Restart the service
2021-08-04 06:45:40 +08:00
```bash
2021-08-15 05:13:16 +08:00
sudo systemctl stop wg-dashboard.service # <-- To stop the service
sudo systemctl start wg-dashboard.service # <-- To start the service
sudo systemctl restart wg-dashboard.service # <-- To restart the service
2021-08-04 06:45:40 +08:00
```
2021-08-15 05:13:16 +08:00
8. **And now you can reboot your system, and use the command at step 6 to see if it will auto start after the reboot, or just simply access the dashboard through your browser. If you have any questions or problem, please report it in the issue page.**
2021-05-06 02:38:10 +08:00
2021-05-05 09:26:40 +08:00
## ✂️ Dashboard Configuration
2021-08-05 13:07:10 +08:00
#### Dashboard Configuration file
2022-01-13 22:37:23 +08:00
Since version 2.0, WGDashboard 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 configurations:
2024-08-15 11:52:14 +08:00
| | Description | Default | Edit Available |
|------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------|----------------|
| **`[Account]`** | *Configuration on account* | | |
| `username` | Dashboard login username | `admin` | Yes |
| `password` | Password, will be hash with SHA256 | `admin` hashed in SHA256 | Yes |
| | | | |
| **`[Server]`** | *Configuration on dashboard* | | |
| `wg_conf_path` | The path of all the Wireguard configurations | `/etc/wireguard` | Yes |
| `app_ip` | IP address the dashboard will run with | `0.0.0.0` | Yes |
| `app_port` | Port the the dashboard will run with | `10086` | Yes |
2022-01-13 22:37:23 +08:00
| `auth_req` | Does the dashboard need authentication to access, if `auth_req = false` , user will not be access the **Setting** tab due to security consideration. **User can only edit the file directly in system**. | `true` | **No** |
2024-08-15 11:52:14 +08:00
| `version` | Dashboard Version | `v4.0` | **No** |
| `dashboard_refresh_interval` | How frequent the dashboard will refresh on the configuration page | `60000ms` | Yes |
| `dashboard_sort` | How configuration is sorting | `status` | Yes |
| `dashboard_theme` | Dashboard Theme | `dark` | Yes |
| | | | |
| **`[Peers]`** | *Default Settings on a new peer* | | |
| `peer_global_dns` | DNS Server | `1.1.1.1` | Yes |
| `peer_endpoint_allowed_ip` | Endpoint Allowed IP | `0.0.0.0/0` | Yes |
| `peer_display_mode` | How peer will display | `grid` | Yes |
| `remote_endpoint` | Remote Endpoint (i.e where your peers will connect to) | *depends on your server's default network interface* | Yes |
| `peer_mtu` | Maximum Transmit Unit | `1420` | |
| `peer_keep_alive` | Keep Alive | `21` | Yes |
2021-05-05 09:26:40 +08:00
#### Generating QR code and peer configuration file (.conf)
2021-08-05 13:07:10 +08:00
Starting version 2.2, dashboard can now generate QR code and configuration file for each peer. Here is a template of what each QR code encoded with and the same content will be inside the file:
2021-08-05 13:07:10 +08:00
2021-08-15 05:13:16 +08:00
```ini
2021-08-05 13:07:10 +08:00
[Interface]
PrivateKey = QWERTYUIOPO234567890YUSDAKFH10E1B12JE129U21=
Address = 0.0.0.0/32
DNS = 1.1.1.1
[Peer]
PublicKey = QWERTYUIOPO234567890YUSDAKFH10E1B12JE129U21=
AllowedIPs = 0.0.0.0/0
Endpoint = 0.0.0.0:51820
```
2021-08-15 05:13:16 +08:00
| | Description | Default Value | Available in Peer setting |
| ----------------- | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------- |
| **`[Interface]`** | | | |
| `PrivateKey` | The private key of this peer | Private key generated by WireGuard (`wg genkey`) or provided by user | Yes |
| `Address` | The `allowed_ips` of your peer | N/A | Yes |
| `DNS` | The DNS server your peer will use | `1.1.1.1` - Cloud flare DNS, you can change it when you adding the peer or in the peer setting. | Yes |
| **`[Peer]`** | | | |
| `PublicKey` | The public key of your server | N/A | No |
2021-08-15 14:23:35 +08:00
| `AllowedIPs` | IP ranges for which a peer will route traffic | `0.0.0.0/0` - Indicated a default route to send all internet and VPN traffic through that peer. | Yes |
| `Endpoint` | Your wireguard server ip and port, the dashboard will search for your server's default interface's ip. | `<your server default interface ip>:<listen port>` | Yes |
2021-08-05 13:07:10 +08:00
2021-05-05 09:26:40 +08:00
## ❓ How to update the dashboard?
2024-08-15 10:45:36 +08:00
#### **Please note for users who are using `v3 - v3.0.6` want to update to `v4.0`**
- Although theoretically updating through `wgd.sh` should work, but I still suggest you to update the dashboard manually.
2022-01-18 23:42:23 +08:00
2024-08-15 10:45:36 +08:00
#### **Please note for users who are using `v2.3.1` or below**
2022-01-18 23:42:23 +08:00
2024-08-15 10:45:36 +08:00
- For user who is using `v2.3.1` or below, please notice that all data that stored in the current database will **not** transfer to the new database. This is hard decision to move from TinyDB to SQLite. But SQLite does provide a thread-safe access and TinyDB doesn't. I couldn't find a safe way to transfer the data, so you need to do them manually... Sorry about that :pensive:。 But I guess this would be a great start for future development :sunglasses:.
2022-01-25 09:11:35 +08:00
2022-01-18 23:42:23 +08:00
2022-01-13 22:37:23 +08:00
1. Change your directory to `wgdashboard`
2022-01-19 01:43:11 +08:00
2021-08-15 05:13:16 +08:00
```shell
2022-01-25 09:11:35 +08:00
cd wgdashboard/src
2021-07-03 01:23:04 +08:00
```
2022-01-18 23:42:23 +08:00
2021-09-04 05:32:51 +08:00
2. Update the dashboard
2021-08-15 05:13:16 +08:00
```shell
2024-08-15 10:45:36 +08:00
git pull https://github.com/donaldzou/WGDashboard.git v4.0 --force
2021-07-03 01:23:04 +08:00
```
2022-01-13 22:37:23 +08:00
2022-01-19 02:04:00 +08:00
3. Install
```shell
2024-08-15 10:45:36 +08:00
sudo ./wgd.sh install
2022-01-19 02:04:00 +08:00
```
2024-08-15 10:45:36 +08:00
Starting with `v3.0`, you can simply do `sudo ./wgd.sh update` !! (I hope)
2022-01-13 22:37:23 +08:00
2024-08-15 11:52:14 +08:00
## 🐬 Docker Solutions
2021-05-05 09:26:40 +08:00
2024-08-15 11:52:14 +08:00
Current, we have 2 beloved contributors provided solutions for hosting WGDashboard with Docker
2021-05-05 09:26:40 +08:00
2024-08-15 11:52:14 +08:00
### Solution 1 from @DaanSelen
2021-08-06 12:00:32 +08:00
2024-08-15 11:55:52 +08:00
Please visit [Docker-explain.md](./docker/Docker-explain.md)
2021-08-06 12:00:32 +08:00
2024-08-15 11:52:14 +08:00
### Solution 2 from @shuricksumy
2021-08-06 12:00:32 +08:00
2024-08-15 11:52:14 +08:00
Please visit [shuricksumy/docker-wgdashboard](https://github.com/shuricksumy/docker-wgdashboard)
2021-08-06 12:00:32 +08:00
2024-08-15 11:59:50 +08:00
> For questions or issues related to Docker, please visit [#272](https://github.com/donaldzou/WGDashboard/issues/272)
2021-08-06 12:00:32 +08:00
2021-05-05 09:26:40 +08:00
2024-08-15 11:52:14 +08:00
## 🥘 Experimental Functions
2021-08-05 13:15:17 +08:00
2024-08-15 11:52:14 +08:00
### Cross-Server Access
2021-05-14 06:00:40 +08:00
2024-08-15 11:52:14 +08:00
Starting with `v4.0`, you can access WGDashboards on other server through one WGDashboard with API Keys
2021-05-14 06:00:40 +08:00
2024-08-15 11:52:14 +08:00
![Cross Server Example](https://donaldzou.nyc3.cdn.digitaloceanspaces.com/wgdashboard-images/cross-server.gif)
2021-04-13 10:26:55 +08:00
2024-08-15 11:52:14 +08:00
### Desktop App
2021-04-13 10:28:30 +08:00
2024-08-15 11:52:14 +08:00
Since the major changes for `v4.0` is to move the whole front-end code to Vue.js. And with this change, we can take the
advantage of combining ElectronJS and Vue.js to create a Desktop version of WGDashboard. Currently, we provide an Universal macOS app and a Windows app.
2021-04-13 10:26:55 +08:00
2024-08-15 11:52:14 +08:00
To download the app, please visit the [latest release](https://github.com/donaldzou/WGDashboard/releases).
2021-04-13 10:26:55 +08:00
2024-08-15 11:52:14 +08:00
![ElectronJS App Demo](https://donaldzou.nyc3.cdn.digitaloceanspaces.com/wgdashboard-images/electronjs-app.gif)
2021-04-13 10:26:55 +08:00
2024-08-15 11:52:14 +08:00
## 🔍 Screenshot
2021-04-13 10:26:55 +08:00
2024-08-15 11:52:14 +08:00
![Sign In](https://donaldzou.nyc3.cdn.digitaloceanspaces.com/wgdashboard-images/sign-in.png)
![Cross Server](https://donaldzou.nyc3.cdn.digitaloceanspaces.com/wgdashboard-images/cross-server.png)
![Index](https://donaldzou.nyc3.cdn.digitaloceanspaces.com/wgdashboard-images/index.png)
![New Configuration](https://donaldzou.nyc3.cdn.digitaloceanspaces.com/wgdashboard-images/new-configuration.png)
![Settings](https://donaldzou.nyc3.cdn.digitaloceanspaces.com/wgdashboard-images/settings.png)
![Light-Dark Mode](https://donaldzou.nyc3.cdn.digitaloceanspaces.com/wgdashboard-images/light-dark.png)
![Configuration](https://donaldzou.nyc3.cdn.digitaloceanspaces.com/wgdashboard-images/configuration.png)
![Add Peers](https://donaldzou.nyc3.cdn.digitaloceanspaces.com/wgdashboard-images/add-peers.png)
![Ping](https://donaldzou.nyc3.cdn.digitaloceanspaces.com/wgdashboard-images/ping.png)
2024-08-15 11:53:28 +08:00
![Traceroute](https://donaldzou.nyc3.cdn.digitaloceanspaces.com/wgdashboard-images/traceroute.png)