Skip to content
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

[Feature Request] Restart Wireguard from the docker container #263

Closed
mojothemonkey2 opened this issue Dec 4, 2022 · 2 comments
Closed

Comments

@mojothemonkey2
Copy link
Contributor

Firstly, awesome UI. Makes Wireguard config a breeze!

I think it would be really great, if we could get the docker container to manage the restart of wireguard interface too.
So that users would not have to manually create the systemd files for this, and make their lives even easier.

There looks to be a fork of this project, that is doing this already https://gitlab.com/jarylc/docker-wireguard-ui
(but they are behind with their builds).
So the entrypoint is a script, using inotifyd to watch the config, and call wg-quick to restart the interface (which is how wireguard systemd service restarts the interface too).
This works, since NET_ADMIN priviledge will allow the container to restart the wireguard interface that is outside the container.
The only other change required, would be to include wireguard-tools package in the image, for the wg-quick script.

Maybe this should be an optional feature, for those that would prefer to restart wireguard separately.
(I'm happy to put in a PR if the idea is accepted).

@mojothemonkey2
Copy link
Contributor Author

I've submitted a PR for this - #267
The main aim is to make it easier for novice users to setup a fully functioning Wireguard server, without the need for more advanced tasks, like managing and creating services.
With the features enabled in docker compose, all that should be need on the host is to install wireguard package.
(And maybe even that would not be required, for newer kernels, since wireguard included aftet 5.6. I've not been able to test this).

@ngoduykhanh
Copy link
Owner

Closing as PR got merged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants