EmbarkStudios / wg-ui

WireGuard Web UI for self-serve client configurations, with optional auth.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Change the default port 8080

s9sa opened this issue · comments

commented

Describe the bug
I already have another service running on my vps on port 8080. I tried to change the port to 8888, 8889 during setup but it is still to running on port 8080 which is makes the installation stuck on starting server (refer below)

To Reproduce
root@xxxx:~# docker run --rm -it --privileged --entrypoint "/wireguard-ui" -v /tmp/wireguard-ui:/data -p 8888:8888 -p 8889:8889 embarkstudios/wireguard-ui:latest --data-dir=/data --log-level=debug
Unable to find image 'embarkstudios/wireguard-ui:latest' locally
latest: Pulling from embarkstudios/wireguard-ui
17e160adf81a: Pull complete
8c3b1b25e81f: Pull complete
87b9f3080fa8: Pull complete
Digest: sha256:3acb83ad30d760b567b9940e411e5c057aca0c88be7171964b4f2e26364083c1
Status: Downloaded newer image for embarkstudios/wireguard-ui:latest
INFO[0000] Starting
DEBU[0000] ipAddr: x.x.x.x ipNet: x.x.x.x/24
DEBU[0000] No config found. Creating new: /data/config.json
DEBU[0000] Configuration loaded with public key: pLlqgsbOh1rofWLUJv37h1PCeTklrinx7qWqAxmHZSk=
DEBU[0000] Server initialized: /data
DEBU[0000] Adding wireguard device: wg0
DEBU[0000] Adding ip address to wireguard device: x.x.x.x/24
DEBU[0000] Bringing up wireguard device: wg0
DEBU[0000] Adding NAT / IP masquerading using nftables
DEBU[0000] Flushing nftable rulesets
DEBU[0000] Setting up nftable rules for ip masquerading
DEBU[0000] Reconfiguring wireguard interface wg0
DEBU[0000] Adding wireguard private key
DEBU[0000] Serving static assets embedded in binary
INFO[0000] Starting server listenAddr=":8080"

Can you show me how to change the port during installation? Thanks

That's changed with --listen-address=":<port>" which you specify in startup of the wireguard-ui binary! The ports you changed are the ones forwarded to docker I believe!

commented

where to put this line? because I am new on Docker can you show how to set up with different port?

thanks again

In your case it cloud work with this: docker run --rm -it --privileged --entrypoint "/wireguard-ui" -v /tmp/wireguard-ui:/data -p 8888:8888 -p 8889:8889 embarkstudios/wireguard-ui:latest --data-dir=/data --log-level=debug --listen-address=":8888"

You can also host wg-ui without running docker. That you do by running the binary you can find under releases or build it from source yourself (documentation on this is found in README.md).

@s9sa did this end up working for you?

Screenshot_20201217_130539

Its working , but says Auth required.
How to configure auth and moreover how to allow all incoming peers/clients