From f28f801b69565f3af3419f37a1f12b1743c499c4 Mon Sep 17 00:00:00 2001 From: MickLesk Date: Tue, 17 Mar 2026 20:43:15 +0100 Subject: [PATCH] fix(gluetun): add OpenVPN process user and cleanup stale config - 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 --- install/gluetun-install.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/install/gluetun-install.sh b/install/gluetun-install.sh index 9ba623d46..68e841d93 100644 --- a/install/gluetun-install.sh +++ b/install/gluetun-install.sh @@ -46,6 +46,9 @@ VPN_TYPE=openvpn OPENVPN_CUSTOM_CONFIG=/opt/gluetun-data/custom.ovpn OPENVPN_USER= OPENVPN_PASSWORD= +OPENVPN_PROCESS_USER=root +PUID=0 +PGID=0 HTTP_CONTROL_SERVER_ADDRESS=:8000 HTTPPROXY=off SHADOWSOCKS=off @@ -76,6 +79,7 @@ User=root WorkingDirectory=/opt/gluetun-data EnvironmentFile=/opt/gluetun-data/.env UnsetEnvironment=USER +ExecStartPre=/bin/sh -c 'rm -f /etc/openvpn/target.ovpn' ExecStart=/usr/local/bin/gluetun Restart=on-failure RestartSec=5