Closed xgusto closed 7 months ago
latest Ubuntu version are the same. I think the have deprocated many python and flask dependencies which now need installed manually but it can be done i have it working but was a pain compared to before on the supported versions.
It's a pity. It is a very nice project. I've been looking for something similar for a long time, but I'm not interested in using older ver. debian.
Hi everyone, I'm sorry for all of you encountering this issue. Could you please let me know which Python version you're using? I've tested on newer Python 3.10 with virtual env:
git clone -b v3.0.6 https://github.com/donaldzou/WGDashboard.git wgdashboard
cd wgdashboard/src
python3 -m venv ./venv
source venv/bin/activate
chmod +x wgd.sh
./wgd.sh install
./wgd.sh start
Please let me know if this works for you too :)
I'm currently working on a newer version that is based on Python 3.12, and I'm planning to test it for all older version till 3.7 :)
donaldzou Thank you for your work
Here is the complete output from the terminal
git clone -b v3.0.6 https://github.com/donaldzou/WGDashboard.git wgdashboard
Cloning into 'wgdashboard'...
remote: Enumerating objects: 2331, done.
remote: Counting objects: 100% (1046/1046), done.
remote: Compressing objects: 100% (384/384), done.
remote: Total 2331 (delta 808), reused 788 (delta 645), pack-reused 1285
Receiving objects: 100% (2331/2331), 11.42 MiB | 20.13 MiB/s, done.
Resolving deltas: 100% (1479/1479), done.
Note: switching to 'd52cd2b17c4714fd6fae8de742ba7e49ad1cab5f'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
python3 -m venv ./venv
The virtual environment was not created successfully because ensurepip is not
available. On Debian/Ubuntu systems, you need to install the python3-venv
package using the following command.
apt install python3.11-venv
You may need to use sudo with that command. After installing the python3-venv
package, recreate your virtual environment.
Failing command: /home/jany/wgdashboard/src/venv/bin/python3
sudo apt install python3.11-venv
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
python3-pip-whl python3-setuptools-whl
The following NEW packages will be installed:
python3-pip-whl python3-setuptools-whl python3.11-venv
0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
Need to get 2,835 kB of archives.
After this operation, 3,164 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://deb.debian.org/debian bookworm/main amd64 python3-pip-whl all 23.0.1+dfsg-1 [1,717 kB]
Get:2 http://deb.debian.org/debian bookworm/main amd64 python3-setuptools-whl all 66.1.1-1 [1,111 kB]
Get:3 http://deb.debian.org/debian bookworm/main amd64 python3.11-venv amd64 3.11.2-6 [5,892 B]
Fetched 2,835 kB in 0s (11.5 MB/s)
Selecting previously unselected package python3-pip-whl.
(Reading database ... 35779 files and directories currently installed.)
Preparing to unpack .../python3-pip-whl_23.0.1+dfsg-1_all.deb ...
Unpacking python3-pip-whl (23.0.1+dfsg-1) ...
Selecting previously unselected package python3-setuptools-whl.
Preparing to unpack .../python3-setuptools-whl_66.1.1-1_all.deb ...
Unpacking python3-setuptools-whl (66.1.1-1) ...
Selecting previously unselected package python3.11-venv.
Preparing to unpack .../python3.11-venv_3.11.2-6_amd64.deb ...
Unpacking python3.11-venv (3.11.2-6) ...
Setting up python3-setuptools-whl (66.1.1-1) ...
Setting up python3-pip-whl (23.0.1+dfsg-1) ...
Setting up python3.11-venv (3.11.2-6) ...
python3 -m venv ./venv
source venv/bin/activate
chmod +x wgd.sh
./wgd.sh install
------------------------------------------------------------
| Starting to install WGDashboard |
| Upgrading pip |
| Installing latest Python dependencies |
| WGDashboard installed successfully! |
| Enter ./wgd.sh start to start the dashboard |
------------------------------------------------------------
./wgd.sh start
------------------------------------------------------------
| Starting WGDashboard with Gunicorn in the background. |
| Log files is under log/ |
------------------------------------------------------------
I will write in the url
192.168.1.116:10086
Log in
name: admin
Password: admin
Internal Server Error The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.
access.log
192.168.1.2 - - [28/Feb/2024:09:20:00 +0100] "GET / HTTP/1.1" 302 261 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36"
192.168.1.2 - - [28/Feb/2024:09:20:00 +0100] "GET /signin?redirect=192.168.1.116:10086/ HTTP/1.1" 200 6009 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36"
192.168.1.2 - - [28/Feb/2024:09:20:00 +0100] "GET /static/css/dashboard.css HTTP/1.1" 200 0 "http://192.168.1.116:10086/signin?redirect=192.168.1.116:10086/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36"
192.168.1.2 - - [28/Feb/2024:09:20:00 +0100] "GET /static/js/tools.min.js HTTP/1.1" 200 0 "http://192.168.1.116:10086/signin?redirect=192.168.1.116:10086/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36"
192.168.1.2 - - [28/Feb/2024:09:20:00 +0100] "GET /static/img/logo.png HTTP/1.1" 200 0 "http://192.168.1.116:10086/signin?redirect=192.168.1.116:10086/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36"
192.168.1.2 - - [28/Feb/2024:09:20:37 +0100] "POST /auth HTTP/1.1" 200 25 "http://192.168.1.116:10086/signin?redirect=192.168.1.116:10086/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36"
192.168.1.2 - - [28/Feb/2024:09:20:37 +0100] "GET / HTTP/1.1" 500 265 "http://192.168.1.116:10086/signin?redirect=192.168.1.116:10086/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36"
192.168.1.2 - - [28/Feb/2024:09:20:37 +0100] "GET /favicon.ico HTTP/1.1" 404 207 "http://192.168.1.116:10086/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36"
192.168.1.2 - - [28/Feb/2024:09:21:06 +0100] "GET / HTTP/1.1" 500 265 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36"
error.log
[2024-02-28 09:18:01 +0100] [598] [INFO] Starting gunicorn 21.2.0
[2024-02-28 09:18:01 +0100] [598] [INFO] Listening at: http://0.0.0.0:10086 (598)
[2024-02-28 09:18:01 +0100] [598] [INFO] Using worker: gthread
[2024-02-28 09:18:01 +0100] [599] [INFO] Booting worker with pid: 599
[2024-02-28 09:18:01 +0100] [600] [INFO] Booting worker with pid: 600
[2024-02-28 09:18:01 +0100] [601] [INFO] Booting worker with pid: 601
[2024-02-28 09:20:37,805] ERROR in app: Exception on / [GET]
Traceback (most recent call last):
File "/home/xgusto/wgdashboard/src/venv/lib/python3.11/site-packages/flask/app.py", line 1463, in wsgi_app
response = self.full_dispatch_request()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/xgusto/wgdashboard/src/venv/lib/python3.11/site-packages/flask/app.py", line 872, in full_dispatch_request
rv = self.handle_user_exception(e)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/xgusto/wgdashboard/src/venv/lib/python3.11/site-packages/flask/app.py", line 870, in full_dispatch_request
rv = self.dispatch_request()
^^^^^^^^^^^^^^^^^^^^^^^
File "/home/xgusto/wgdashboard/src/venv/lib/python3.11/site-packages/flask/app.py", line 855, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/xgusto/wgdashboard/src/dashboard.py", line 734, in index
return render_template('index.html', conf=get_conf_list(), msg=msg)
^^^^^^^^^^^^^^^
File "/home/xgusto/wgdashboard/src/dashboard.py", line 487, in get_conf_list
for i in os.listdir(WG_CONF_PATH):
^^^^^^^^^^^^^^^^^^^^^^^^
PermissionError: [Errno 13] Permission denied: '/etc/wireguard'
[2024-02-28 09:21:06,919] ERROR in app: Exception on / [GET]
Traceback (most recent call last):
File "/home/xgusto/wgdashboard/src/venv/lib/python3.11/site-packages/flask/app.py", line 1463, in wsgi_app
response = self.full_dispatch_request()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/xgusto/wgdashboard/src/venv/lib/python3.11/site-packages/flask/app.py", line 872, in full_dispatch_request
rv = self.handle_user_exception(e)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/xgusto/wgdashboard/src/venv/lib/python3.11/site-packages/flask/app.py", line 870, in full_dispatch_request
rv = self.dispatch_request()
^^^^^^^^^^^^^^^^^^^^^^^
File "/home/xgusto/wgdashboard/src/venv/lib/python3.11/site-packages/flask/app.py", line 855, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/xgusto/wgdashboard/src/dashboard.py", line 734, in index
return render_template('index.html', conf=get_conf_list(), msg=msg)
^^^^^^^^^^^^^^^
File "/home/xgusto/wgdashboard/src/dashboard.py", line 487, in get_conf_list
for i in os.listdir(WG_CONF_PATH):
^^^^^^^^^^^^^^^^^^^^^^^^
PermissionError: [Errno 13] Permission denied: '/etc/wireguard'
It is quite likely that I will have to run it under sudo or as root. However, I have definitely moved on
.....
PermissionError: [Errno 13] Permission denied: '/etc/wireguard' It is quite likely that I will have to run it under sudo or as root. However, I have definitely moved on.
uhhh... moved on to what, if you dont mind? Looking for smooth webgui for wireguard vpn server. You too?
donaldzou Thank you for your work
Here is the complete output from the terminal
git clone -b v3.0.6 https://github.com/donaldzou/WGDashboard.git wgdashboard
Cloning into 'wgdashboard'... remote: Enumerating objects: 2331, done. remote: Counting objects: 100% (1046/1046), done. remote: Compressing objects: 100% (384/384), done. remote: Total 2331 (delta 808), reused 788 (delta 645), pack-reused 1285 Receiving objects: 100% (2331/2331), 11.42 MiB | 20.13 MiB/s, done. Resolving deltas: 100% (1479/1479), done. Note: switching to 'd52cd2b17c4714fd6fae8de742ba7e49ad1cab5f'. You are in 'detached HEAD' state. You can look around, make experimental changes and commit them, and you can discard any commits you make in this state without impacting any branches by switching back to a branch. If you want to create a new branch to retain commits you create, you may do so (now or later) by using -c with the switch command. Example: git switch -c <new-branch-name> Or undo this operation with: git switch - Turn off this advice by setting config variable advice.detachedHead to false
python3 -m venv ./venv
The virtual environment was not created successfully because ensurepip is not available. On Debian/Ubuntu systems, you need to install the python3-venv package using the following command. apt install python3.11-venv You may need to use sudo with that command. After installing the python3-venv package, recreate your virtual environment. Failing command: /home/jany/wgdashboard/src/venv/bin/python3
sudo apt install python3.11-venv
Reading package lists... Done Building dependency tree... Done Reading state information... Done The following additional packages will be installed: python3-pip-whl python3-setuptools-whl The following NEW packages will be installed: python3-pip-whl python3-setuptools-whl python3.11-venv 0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded. Need to get 2,835 kB of archives. After this operation, 3,164 kB of additional disk space will be used. Do you want to continue? [Y/n] y Get:1 http://deb.debian.org/debian bookworm/main amd64 python3-pip-whl all 23.0.1+dfsg-1 [1,717 kB] Get:2 http://deb.debian.org/debian bookworm/main amd64 python3-setuptools-whl all 66.1.1-1 [1,111 kB] Get:3 http://deb.debian.org/debian bookworm/main amd64 python3.11-venv amd64 3.11.2-6 [5,892 B] Fetched 2,835 kB in 0s (11.5 MB/s) Selecting previously unselected package python3-pip-whl. (Reading database ... 35779 files and directories currently installed.) Preparing to unpack .../python3-pip-whl_23.0.1+dfsg-1_all.deb ... Unpacking python3-pip-whl (23.0.1+dfsg-1) ... Selecting previously unselected package python3-setuptools-whl. Preparing to unpack .../python3-setuptools-whl_66.1.1-1_all.deb ... Unpacking python3-setuptools-whl (66.1.1-1) ... Selecting previously unselected package python3.11-venv. Preparing to unpack .../python3.11-venv_3.11.2-6_amd64.deb ... Unpacking python3.11-venv (3.11.2-6) ... Setting up python3-setuptools-whl (66.1.1-1) ... Setting up python3-pip-whl (23.0.1+dfsg-1) ... Setting up python3.11-venv (3.11.2-6) ...
python3 -m venv ./venv source venv/bin/activate chmod +x wgd.sh ./wgd.sh install
------------------------------------------------------------ | Starting to install WGDashboard | | Upgrading pip | | Installing latest Python dependencies | | WGDashboard installed successfully! | | Enter ./wgd.sh start to start the dashboard | ------------------------------------------------------------
./wgd.sh start
------------------------------------------------------------ | Starting WGDashboard with Gunicorn in the background. | | Log files is under log/ | ------------------------------------------------------------
I will write in the url
192.168.1.116:10086
Log in
name: admin Password: admin
Internal Server Error The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.
access.log
192.168.1.2 - - [28/Feb/2024:09:20:00 +0100] "GET / HTTP/1.1" 302 261 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36" 192.168.1.2 - - [28/Feb/2024:09:20:00 +0100] "GET /signin?redirect=192.168.1.116:10086/ HTTP/1.1" 200 6009 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36" 192.168.1.2 - - [28/Feb/2024:09:20:00 +0100] "GET /static/css/dashboard.css HTTP/1.1" 200 0 "http://192.168.1.116:10086/signin?redirect=192.168.1.116:10086/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36" 192.168.1.2 - - [28/Feb/2024:09:20:00 +0100] "GET /static/js/tools.min.js HTTP/1.1" 200 0 "http://192.168.1.116:10086/signin?redirect=192.168.1.116:10086/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36" 192.168.1.2 - - [28/Feb/2024:09:20:00 +0100] "GET /static/img/logo.png HTTP/1.1" 200 0 "http://192.168.1.116:10086/signin?redirect=192.168.1.116:10086/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36" 192.168.1.2 - - [28/Feb/2024:09:20:37 +0100] "POST /auth HTTP/1.1" 200 25 "http://192.168.1.116:10086/signin?redirect=192.168.1.116:10086/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36" 192.168.1.2 - - [28/Feb/2024:09:20:37 +0100] "GET / HTTP/1.1" 500 265 "http://192.168.1.116:10086/signin?redirect=192.168.1.116:10086/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36" 192.168.1.2 - - [28/Feb/2024:09:20:37 +0100] "GET /favicon.ico HTTP/1.1" 404 207 "http://192.168.1.116:10086/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36" 192.168.1.2 - - [28/Feb/2024:09:21:06 +0100] "GET / HTTP/1.1" 500 265 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36"
error.log
[2024-02-28 09:18:01 +0100] [598] [INFO] Starting gunicorn 21.2.0 [2024-02-28 09:18:01 +0100] [598] [INFO] Listening at: http://0.0.0.0:10086 (598) [2024-02-28 09:18:01 +0100] [598] [INFO] Using worker: gthread [2024-02-28 09:18:01 +0100] [599] [INFO] Booting worker with pid: 599 [2024-02-28 09:18:01 +0100] [600] [INFO] Booting worker with pid: 600 [2024-02-28 09:18:01 +0100] [601] [INFO] Booting worker with pid: 601 [2024-02-28 09:20:37,805] ERROR in app: Exception on / [GET] Traceback (most recent call last): File "/home/xgusto/wgdashboard/src/venv/lib/python3.11/site-packages/flask/app.py", line 1463, in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/xgusto/wgdashboard/src/venv/lib/python3.11/site-packages/flask/app.py", line 872, in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/xgusto/wgdashboard/src/venv/lib/python3.11/site-packages/flask/app.py", line 870, in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ File "/home/xgusto/wgdashboard/src/venv/lib/python3.11/site-packages/flask/app.py", line 855, in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/xgusto/wgdashboard/src/dashboard.py", line 734, in index return render_template('index.html', conf=get_conf_list(), msg=msg) ^^^^^^^^^^^^^^^ File "/home/xgusto/wgdashboard/src/dashboard.py", line 487, in get_conf_list for i in os.listdir(WG_CONF_PATH): ^^^^^^^^^^^^^^^^^^^^^^^^ PermissionError: [Errno 13] Permission denied: '/etc/wireguard' [2024-02-28 09:21:06,919] ERROR in app: Exception on / [GET] Traceback (most recent call last): File "/home/xgusto/wgdashboard/src/venv/lib/python3.11/site-packages/flask/app.py", line 1463, in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/xgusto/wgdashboard/src/venv/lib/python3.11/site-packages/flask/app.py", line 872, in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/xgusto/wgdashboard/src/venv/lib/python3.11/site-packages/flask/app.py", line 870, in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ File "/home/xgusto/wgdashboard/src/venv/lib/python3.11/site-packages/flask/app.py", line 855, in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/xgusto/wgdashboard/src/dashboard.py", line 734, in index return render_template('index.html', conf=get_conf_list(), msg=msg) ^^^^^^^^^^^^^^^ File "/home/xgusto/wgdashboard/src/dashboard.py", line 487, in get_conf_list for i in os.listdir(WG_CONF_PATH): ^^^^^^^^^^^^^^^^^^^^^^^^ PermissionError: [Errno 13] Permission denied: '/etc/wireguard'
It is quite likely that I will have to run it under sudo or as root. However, I have definitely moved on
Hi, I'm sorry that you decided to move on. Unfortunately, accessing the WireGuard folder require root access. If you don't want that, you can permission your account with sudo chown -R username:username /etc/wireguard
, but you still need root access to permission.
Closing the issue now :(
Describe The Problem The installation is without problems, but after starting I can see
Expected Error / Traceback
OS Information:
I'm proceeding
Has anyone managed to install WG Dashboard on Debian 12? This guide is intended for Debian 10. I tried to solve it here and here, but without success