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
Copy file name to clipboardExpand all lines: README.md
+6-2Lines changed: 6 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -80,9 +80,9 @@ This can be run as a server or a client, based on the parameters used.
80
80
81
81
## Server Mode
82
82
83
-
If the environment variable `PEERS` is set to a number or a list of strings separated by comma, the container will run in server mode and the necessary server and peer/client confs will be generated. The peer/client config qr codes will be output in the docker log. They will also be saved in text and png format under `/config/peerX` in case `PEERS` is a variable and an integer or `/config/peer_X` in case a list of names was provided instead of an integer.
83
+
If the environment variable `PEERS` is set to a number or a list of strings separated by comma, the container will run in server mode and the necessary server and peer/client confs will be generated. The peer/client config qr codes will be output in the docker log if `LOG_CONFS` is set to `true`. They will also be saved in text and png format under `/config/peerX` in case `PEERS` is a variable and an integer or `/config/peer_X` in case a list of names was provided instead of an integer.
84
84
85
-
Variables `SERVERURL`, `SERVERPORT`, `INTERNAL_SUBNET`and `PEERDNS` are optional variables used for server mode. Any changes to these environment variables will trigger regeneration of server and peer confs. Peer/client confs will be recreated with existing private/public keys. Delete the peer folders for the keys to be recreated along with the confs.
85
+
Variables `SERVERURL`, `SERVERPORT`, `INTERNAL_SUBNET`, `PEERDNS`, `INTERFACE`, `ALLOWEDIPS`and `PERSISTENTKEEPALIVE_PEERS` are optional variables used for server mode. Any changes to these environment variables will trigger regeneration of server and peer confs. Peer/client confs will be recreated with existing private/public keys. Delete the peer folders for the keys to be recreated along with the confs.
86
86
87
87
To add more peers/clients later on, you increment the `PEERS` environment variable or add more elements to the list and recreate the container.
88
88
@@ -159,6 +159,7 @@ services:
159
159
- PEERDNS=auto #optional
160
160
- INTERNAL_SUBNET=10.13.13.0 #optional
161
161
- ALLOWEDIPS=0.0.0.0/0 #optional
162
+
- PERSISTENTKEEPALIVE_PEERS= #optional
162
163
- LOG_CONFS=true #optional
163
164
volumes:
164
165
- /path/to/appdata/config:/config
@@ -186,6 +187,7 @@ docker run -d \
186
187
-e PEERDNS=auto `#optional` \
187
188
-e INTERNAL_SUBNET=10.13.13.0 `#optional` \
188
189
-e ALLOWEDIPS=0.0.0.0/0 `#optional` \
190
+
-e PERSISTENTKEEPALIVE_PEERS= `#optional` \
189
191
-e LOG_CONFS=true `#optional` \
190
192
-p 51820:51820/udp \
191
193
-v /path/to/appdata/config:/config \
@@ -211,6 +213,7 @@ Container images are configured using parameters passed at runtime (such as thos
211
213
|`-e PEERDNS=auto`| DNS server set in peer/client configs (can be set as `8.8.8.8`). Used in server mode. Defaults to `auto`, which uses wireguard docker host's DNS via included CoreDNS forward. |
212
214
|`-e INTERNAL_SUBNET=10.13.13.0`| Internal subnet for the wireguard and server and peers (only change if it clashes). Used in server mode. |
213
215
|`-e ALLOWEDIPS=0.0.0.0/0`| The IPs/Ranges that the peers will be able to reach using the VPN connection. If not specified the default value is: '0.0.0.0/0, ::0/0' This will cause ALL traffic to route through the VPN, if you want split tunneling, set this to only the IPs you would like to use the tunnel AND the ip of the server's WG ip, such as 10.13.13.1. |
216
+
|`-e PERSISTENTKEEPALIVE_PEERS=`| Set to `all` or a list of comma separated peers (ie. `1,4,laptop`) for the wireguard server to send keepalive packets to listed peers every 25 seconds. Useful if server is accessed via domain name and has dynamic IP. Used only in server mode. |
214
217
|`-e LOG_CONFS=true`| Generated QR codes will be displayed in the docker log. Set to `false` to skip log output. |
215
218
|`-v /config`| Contains all relevant configuration files. |
216
219
|`-v /lib/modules`| Maps host's modules folder. Only required if compiling wireguard modules. |
@@ -329,6 +332,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64
329
332
330
333
## Versions
331
334
335
+
***10.01.23:** - Add new var to add `PersistentKeepalive` to server config for select peers to survive server IP changes when domain name is used.
Copy file name to clipboardExpand all lines: readme-vars.yml
+4-2Lines changed: 4 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -50,6 +50,7 @@ opt_param_env_vars:
50
50
- { env_var: "PEERDNS", env_value: "auto", desc: "DNS server set in peer/client configs (can be set as `8.8.8.8`). Used in server mode. Defaults to `auto`, which uses wireguard docker host's DNS via included CoreDNS forward."}
51
51
- { env_var: "INTERNAL_SUBNET", env_value: "10.13.13.0", desc: "Internal subnet for the wireguard and server and peers (only change if it clashes). Used in server mode."}
52
52
- { env_var: "ALLOWEDIPS", env_value: "0.0.0.0/0", desc: "The IPs/Ranges that the peers will be able to reach using the VPN connection. If not specified the default value is: '0.0.0.0/0, ::0/0' This will cause ALL traffic to route through the VPN, if you want split tunneling, set this to only the IPs you would like to use the tunnel AND the ip of the server's WG ip, such as 10.13.13.1."}
53
+
- { env_var: "PERSISTENTKEEPALIVE_PEERS", env_value: "", desc: "Set to `all` or a list of comma separated peers (ie. `1,4,laptop`) for the wireguard server to send keepalive packets to listed peers every 25 seconds. Useful if server is accessed via domain name and has dynamic IP. Used only in server mode."}
53
54
- { env_var: "LOG_CONFS", env_value: "true", desc: "Generated QR codes will be displayed in the docker log. Set to `false` to skip log output."}
54
55
55
56
optional_block_1: false
@@ -70,9 +71,9 @@ app_setup_block: |
70
71
71
72
## Server Mode
72
73
73
-
If the environment variable `PEERS` is set to a number or a list of strings separated by comma, the container will run in server mode and the necessary server and peer/client confs will be generated. The peer/client config qr codes will be output in the docker log. They will also be saved in text and png format under `/config/peerX` in case `PEERS` is a variable and an integer or `/config/peer_X` in case a list of names was provided instead of an integer.
74
+
If the environment variable `PEERS` is set to a number or a list of strings separated by comma, the container will run in server mode and the necessary server and peer/client confs will be generated. The peer/client config qr codes will be output in the docker log if `LOG_CONFS` is set to `true`. They will also be saved in text and png format under `/config/peerX` in case `PEERS` is a variable and an integer or `/config/peer_X` in case a list of names was provided instead of an integer.
74
75
75
-
Variables `SERVERURL`, `SERVERPORT`, `INTERNAL_SUBNET`and `PEERDNS` are optional variables used for server mode. Any changes to these environment variables will trigger regeneration of server and peer confs. Peer/client confs will be recreated with existing private/public keys. Delete the peer folders for the keys to be recreated along with the confs.
76
+
Variables `SERVERURL`, `SERVERPORT`, `INTERNAL_SUBNET`, `PEERDNS`, `INTERFACE`, `ALLOWEDIPS` and `PERSISTENTKEEPALIVE_PEERS` are optional variables used for server mode. Any changes to these environment variables will trigger regeneration of server and peer confs. Peer/client confs will be recreated with existing private/public keys. Delete the peer folders for the keys to be recreated along with the confs.
76
77
77
78
To add more peers/clients later on, you increment the `PEERS` environment variable or add more elements to the list and recreate the container.
78
79
@@ -126,6 +127,7 @@ app_setup_block: |
126
127
127
128
# changelog
128
129
changelogs:
130
+
- { date: "10.01.23:", desc: "Add new var to add `PersistentKeepalive` to server config for select peers to survive server IP changes when domain name is used." }
0 commit comments