You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 25, 2023. It is now read-only.
When running in production, we recommend using the latest release as opposed to `latest`.
26
-
27
-
Important to know is that you need to have WireGuard installed on the machine in order for this to work, as this is 'just' a UI to manage WireGuard configs.
28
-
29
21
### Configuration
30
22
31
23
You can configure wg-ui using commandline flags or environment variables.
32
24
To see all available flags run:
33
25
34
26
```
35
-
docker run --rm -it embarkstudios/wireguard-ui:latest -h
36
27
./wireguard-ui -h
37
28
```
38
29
39
-
You can alternatively specify each flag through an environment variable of the form `WIREGUARD_UI_<FLAG_NAME>`, where `<FLAG_NAME>` is replaced with the flag name transformed to `CONSTANT_CASE`, e.g.
40
-
41
-
```docker run --rm -it embarkstudios/wireguard-ui:latest --log-level=debug```
42
-
43
-
and
44
-
45
-
```docker run --rm -it -e WIREGUARD_UI_LOG_LEVEL=debug embarkstudios/wireguard-ui:latest```
46
-
47
-
are the same.
48
-
49
-
## Docker images
50
-
51
-
There are two ways to run wg-ui today, you can run it with kernel module installed on your host which is the best way to do it if you want performance.
52
-
53
-
```
54
-
docker pull embarkstudios/wireguard-ui:latest
55
-
```
56
-
57
-
If you however do not have the possibility or interest in having kernel module loaded on your host, there is now a solution for that using a docker image based on wireguard-go. Keep in mind that this runs in userspace and not in kernel module.
58
-
59
-
```
60
-
docker pull embarkstudios/wireguard-ui:userspace
61
-
```
62
-
63
-
Both images are built for `linux/amd64`, `linux/arm64` and `linux/arm/v7`. If you would need it for any other platform you can build wg-ui binaries with help from the documentation.
64
-
65
-
66
30
## Install without Docker
67
31
68
32
You need to have WireGuard installed on the machine running `wg-ui`.
69
33
70
34
Unless you use the userspace version with docker you're required to have WireGuard installed on your host machine.
## Setting up Nginx as reverse proxy, and oauth2-proxy as authenticator with Google as provider
99
+
100
+
Note: This example is running Wireguard-ui on port 8080.
101
+
102
+
Edit the `/etc/nginx/sites-enables/default` or create a new config with these settings. Note: the ssl certificate and key are both located in `/etc/nginx`:
103
+
```
104
+
server {
105
+
listen [::]:443 ssl;
106
+
listen 443 ssl;
107
+
server_name server-name;
108
+
ssl on;
109
+
ssl_certificate ssl/ssl_certificate.cer
110
+
ssl_certificate_key ssl/ssl_key.key;
111
+
112
+
location / {
113
+
proxy_pass http://127.0.0.1:4180;
114
+
proxy_set_header Host $host;
115
+
proxy_set_header X-Real-IP $remote_addr;
116
+
proxy_set_header X-Scheme $scheme;
117
+
proxy_connect_timeout 1;
118
+
proxy_send_timeout 30;
119
+
proxy_read_timeout 30;
120
+
}
121
+
}
122
+
123
+
server {
124
+
listen 80;
125
+
listen [::]:80;
126
+
server_name server-name;
127
+
128
+
129
+
location / {
130
+
if ($host = vpn.ascendntnu.no) {
131
+
return 301 https://$host$request_uri;
132
+
}
133
+
}
134
+
}
135
+
```
136
+
To set up [oauth2-proxy](https://github.com/oauth2-proxy/oauth2-proxy), you have to install the latest version from their GitHub.
137
+
Then follow this [guide](https://oauth2-proxy.github.io/oauth2-proxy/docs/configuration/oauth_provider#google-auth-provider) to get your client ID and secret from Google.
138
+
After you have installed it, create a config (for example `/etc/oauth2-proxy.cfg`):
I recommend checking out the official oauth2-proxy [documentation](https://oauth2-proxy.github.io/oauth2-proxy/docs/configuration/overview) for more settings and configs. It also shows how you can generate your cookie seed.
165
+
166
+
To run oauth2-proxy, just run `oauth2-proxy --config=/etc/oauth2-proxy.cfg`.
167
+
153
168
## Contributing
154
169
155
170
We welcome community contributions to this project.
0 commit comments