Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

It seems this is a known bug/limitation in the design of the Systemd framework in combination with OpenVPN. Since OpenVPN supports multiple servers, each daemon requires a separate configuration file, which Systemd does not support "out of the box". The solution is to create a /etc/systemd/system/<server>.service file for each openvpn <server>.conf file.

Mine looks like:

Description=OpenVPN Robust And Highly Flexible Tunneling Application On <server>

ExecStart=/usr/sbin/openvpn --daemon --writepid /var/run/openvpn/<server>.pid --cd /etc/openvpn/ --config <server>.conf


Replace <server> with the name of your configuration file.

Then, I simply call:

sudo systemctl enable <server>.service
sudo systemctl start <server>.service

After I rebooted, the service was started automatically.