-
-
Notifications
You must be signed in to change notification settings - Fork 254
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Docker Solution of WGDashboard #272
Comments
https://hub.docker.com/r/donaldzou/wgdashboard/ Is this not what you mean? I will also try to make one with the new version of WGDash. |
If possible please assign me |
Hi all! Thank you for bringing this up. Not gonna lie I'm not a Docker user or an expert at all (i tried but failed) lol. If you have a good solution please let me know. I'm happy to provide help as I can :) |
Yes this is what I meant i tried lol. Everytime when it restart, everything will just be gone, I couldn't figure out how to preserve data from previous session. |
Please can you provide the information: Where is the data regarding matching peers from the wg0.conf to actual readable names stored by WireGuard Dashboard? Other than that, I have a functioning container. Doing some more devving. Persistency seems to work now. |
Hi!👋🏻
So usually WireGuard will read the configuration at /etc/wireguard and it will use the file name as the configuration name. In some rare case it will generate a config name. So the dashboard will just read those file directly to get the data.
Best,
Donald
Get Outlook for iOS<https://aka.ms/o0ukef>
…________________________________
From: dselen ***@***.***>
Sent: Wednesday, June 5, 2024 4:44:40 AM
To: donaldzou/WGDashboard ***@***.***>
Cc: Donald Zou ***@***.***>; Comment ***@***.***>
Subject: Re: [donaldzou/WGDashboard] Docker image (Issue #272)
https://hub.docker.com/r/donaldzou/wgdashboard/
Is this not what you mean? I will also try to make one with the new version of WGDash.
Yes this is what I meant i tried lol. Everytime when it restart, everything will just be gone, I couldn't figure out how to preserve data from previous session.
Please can you provide the information: Where is the data regarding matching peers from the wg0.conf to actual readable names stored by WireGuard Dashboard? Other than that, I have a functioning container. Doing some more devving.
—
Reply to this email directly, view it on GitHub<#272 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AGARNUMKGHTDFCKHFDULPJ3ZFYRLRAVCNFSM6AAAAABIIAGXTOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNBYGM4DKNZRGI>.
You are receiving this because you commented.Message ID: ***@***.***>
|
What I meant, is WGDash seems to store the public key to readable name somewhere. Wireguard configs do not store that by default. Either WGDash comments it in the wg0.conf or there is a file somewhere that keeps track of the names of the public keys, correct? Right now I just did it through persisting the /src directory. For current state of the container; https://github.com/DaanSelen/WGDashboard-dockerized/tree/main/docker |
Hello everyone! I have been working on the docker image and I feel good about releasing or at least making known its docker pull-able from my own registry. For now, please refer to the compose.yaml file for instructions. I will be working on the markdown file in that directory soon. More info (such as the compose.yaml/docker-compose.yaml) and source-code here: If you want to pull the image, use (for now) Anyone willing to use or test the image, please give me feedback if you encounter something. You can always submit an issue on my forked repository or comment here. @donaldzou I am curious to what your opinion will be. Persistency works through Docker Volumes, which remembers the state of the application after restarts AND recreations of the entire container, as long as the volumes are references correctly. Kind regards, Daan Selen. |
Ahhh I see, currently everything is stored in a SQLite database under src/db/wgdashboard.db |
Hi @DaanSelen ! Thank you for working on the docker image. I will test it in few days and get back to you. I'm not familiar with Docker, but in my imagination, the image should create a Linux system, install it somewhere that won't remove after pausing the image.. kinda like a VM but running in Docker? correct me if i'm wrong lol. |
Hi there, some help to get everyone started: If you have Docker and Docker Compose installed, skip to step: 4. Here are the instructions:
Hopefully you can manage with these instructions! And if you like the result, I'd love to help contribute my knowledge to this project! For other willing to test the image, everyone can follow these above instructions. |
I will see what I can do for trimming down the used space. |
Image can be closed, right @enriluis ? |
Hi, I tried to run v4 in the docker for personal purposes and testing. Link is docker-wgdashboard |
@shuricksumy hi! Thanks for providing this. If I understand correctly, the dockerfile will only expose port 10086(dashboard) and 51820(wg)? So if I want to create a new wg config with port 51821, do I need to manually change the dockerfile? |
Good point,
So it will allow having some range of open ports for new wg_.conf configurations, |
Hey just to clarify, I made the image to have a template and work out of the box. You can add multiple configs by openings ports and adding the config using docker cp or placing it into the var/lib/docker/volumes. |
Hey there, lookz very good and interesting! Can you explain why you did the changes you did? |
Hi, I did not much to just run it
It looks like these are all changes I did. But also I looking to easy way to add prefix for web endpoint to easy use proxy forwarding |
And the easy way to add the prefix is with the added build stage I assume. I saw some changes to the bash script yeah. I am not familiar with why the symlink is needed but if it does not hurt why not. I also looked through the changes and it looks good! I see you used a couple different ways of getting variables but if it works and is practical then sure. |
It was just quick fix Dockerfile
entrypoint.sh
|
Hi, @DaanSelen |
@shuricksumy to let your Docker compose works, I had to change this:
to this:
Otherwise I had error "IsADirectoryError: [Errno 21] Is a directory: './wg-dashboard.ini'". I hope this helps. |
This error is due to no empty file (wg-dashboard.ini) before docker compose run first time. Need to creare it firstly. (# touch ./ini/wg-dashboard.ini) As to your idea to mount direcotory ini, I will check it. Before ini file was located in src directory. So I will try to create some workaround in start script to handle this case automatically. |
@Luca1996O So it will be created automatically. There are ini file and DB folder there. |
Thank you very much! How can I let it detect my public IP automatically (using ifconfig.me)? Because I tried to put 0.0.0.0 in Public IP (in Docker compose code) but it doesn't work. I tried the same in the dashboard, but it still doesn't detect it. I need it because I've got a dynamic IP and I'd like to make sure that it changes it automatically in case the connection drops, without using any DNS. P.S. Plus, after rebooting container dashboard being unaccessible, saying "Unauthorized - 401". Same on a new installation. |
Hi, Public IP here is a part of config, and it's setup first time when you deploy docker and if you not set it in env vars predefined. So in case of dynamic IP, it's a good question)) just because server endpoints to connect peers are listening on this IP and in case it changed you need new peers configuration on client side - just let them know where they should connect. May be here can be used host name with dynamic IP like for example noip.com provides. But I haven't test or uesd it. The idea to have VPN for personal usage is just brilliant when you have some tiny virtual machine on Amazon or DigitalOcean. They provide static IP and it can be reachable from any your devices and this devices can communicate each other even over the NAT or grey IP of providers. It costs about 7$ per month to have this virtual machine in cloud. |
Hi there, if I may ask, which docker solution are you using? I think we have 2 versions, and I dont know if the versions process the information differently? |
I am using and testing my own one: here https://github.com/shuricksumy/docker-wgdashboard |
I have created a new fork for Version 4 of WGDashboard here: https://github.com/DaanSelen/WGDashboard and working through a couple of the features you suggested or made in your own repository, please provide me some feedback if you have time. |
Is your feature request related to a problem? Please describe.
This project should have a Docker image and be able to be deployed in Docker. docker pull wgdashboard and pass env mount vol integrate with wireguard container
Describe the solution you'd like
A clear and concise description of what you want to happen.
The text was updated successfully, but these errors were encountered: