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

[App Request] Wireguard-UI #120

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

[App Request] Wireguard-UI #120

mojothemonkey2 opened this issue Dec 4, 2022 · 3 comments
Labels
help wanted Extra attention is needed

Comments

@mojothemonkey2
Copy link

App Information

Why do you want this app?

Helps users easily manage Wireguard config.
Does a very similar job the the helper script https://github.com/angristan/wireguard-install
But all through a nice WebUI.

Note: this is NOT running wireguard itself, it just manages the config (for both server and clients).
You would want to install wireguard directly on the host.
And there is suggestion how to create a service to watch & restart wireguard service on config changes.

Additional information?

Working docker compose:

version: "3"
services:
  wgui:
    image: ngoduykhanh/wireguard-ui:latest
    container_name: Wireguard-UI
    cap_add:
      - NET_ADMIN
    network_mode: host
    environment:
      - WGUI_USERNAME=casaos
      - WGUI_PASSWORD=casaos
    volumes:
      - /DATA/AppData/WireguardUI:/app/db
      - /etc/wireguard:/etc/wireguard  #we modify the host config

Port is fixed to 5000.
It does work in briged mode, apart from the "Status" page, for connected peer info. As this needs host network + NET_ADMIN.

There is also an arm version of the image: ngoduykhanh/wireguard-ui:latest-arm64
(not sure if we can make this a selectable / automated option from CasaOS appstore).

@mojothemonkey2
Copy link
Author

I've submitted a feature to wireguard-ui repo - so that it can manage Wireguard interface restarts automatically.
Which has been built and pushed in latest image.
So this can be used with updated docker compose, to make life even easier:

version: "3"
services:
  wgui:
    image: ngoduykhanh/wireguard-ui:latest
    container_name: Wireguard-UI
    cap_add:
      - NET_ADMIN
    network_mode: host
    environment:
      - WGUI_USERNAME=casaos
      - WGUI_PASSWORD=casaos
      - WGUI_MANAGE_START=true
      - WGUI_MANAGE_RESTART=true
    volumes:
      - /DATA/AppData/WireguardUI:/app/db
      - /etc/wireguard:/etc/wireguard
    restart: unless-stopped

@mojothemonkey2
Copy link
Author

or, an alternative wireguard UI..

wg-easy
https://github.com/WeeJeWel/wg-easy

this UI has all the detail nicely shown on one page. I prefer it over wireguard-ui above.
it also does automatic restart of wireguard on changes.
but it lacks UI for configuring server-side settings that wireguard-ui has. instead you have to add as docker envs, which requires a bit of knowledge.
in particular the WG_HOST (for public ip). needs to be set. whilst wireguard-ui figures out your public ip automatically.
so hard to say which is ultimately the best option.

version: "3.8"
services:
  wg-easy:
    environment:
      - WG_HOST=<my public ip>
      - WG_PORT=51820 # public port, for clients
    image: weejewel/wg-easy
    container_name: wg-easy
    volumes:
      - /DATA/AppData/wg-easy:/etc/wireguard
    ports:
      - "51820:51820/udp"  # wireguard
      - "31000:51821/tcp"  # web ui
    restart: unless-stopped
    cap_add:
      - NET_ADMIN
      - SYS_MODULE
    sysctls:
      - net.ipv4.ip_forward=1
      - net.ipv4.conf.all.src_valid_mark=1

@tigerinus tigerinus transferred this issue from IceWhaleTech/CasaOS May 10, 2023
@tigerinus tigerinus added the help wanted Extra attention is needed label May 10, 2023
@kd9lsv
Copy link
Contributor

kd9lsv commented Oct 8, 2023

@tigerinus I believe this can be closed.

@github-project-automation github-project-automation bot moved this from Todo to Done in CasaOS AppStore Oct 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
Archived in project
Development

No branches or pull requests

3 participants