Skip to content

Commit 27c9d7f

Browse files
authored
fix(gluetun): add OpenVPN process user and cleanup stale config (#13016)
- Add OPENVPN_PROCESS_USER=root, PUID=0, PGID=0 to default .env to prevent gluetun from injecting 'user' directive into target.ovpn which causes 'Unrecognized option' errors on Debian - Add ExecStartPre to remove stale /etc/openvpn/target.ovpn before start - Fixes #12988
1 parent c907e10 commit 27c9d7f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

install/gluetun-install.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,9 @@ VPN_TYPE=openvpn
4646
OPENVPN_CUSTOM_CONFIG=/opt/gluetun-data/custom.ovpn
4747
OPENVPN_USER=
4848
OPENVPN_PASSWORD=
49+
OPENVPN_PROCESS_USER=root
50+
PUID=0
51+
PGID=0
4952
HTTP_CONTROL_SERVER_ADDRESS=:8000
5053
HTTPPROXY=off
5154
SHADOWSOCKS=off
@@ -76,6 +79,7 @@ User=root
7679
WorkingDirectory=/opt/gluetun-data
7780
EnvironmentFile=/opt/gluetun-data/.env
7881
UnsetEnvironment=USER
82+
ExecStartPre=/bin/sh -c 'rm -f /etc/openvpn/target.ovpn'
7983
ExecStart=/usr/local/bin/gluetun
8084
Restart=on-failure
8185
RestartSec=5

0 commit comments

Comments
 (0)