You are not logged in.

#1 2025-06-12 06:20:12

arti946
Member
Registered: 2025-06-12
Posts: 3

[SOLVED] Start OpenVPN on boot error

I recently set up a VPN using OpenVPN and want it to run on system boot. The Wiki tells me to enable the service using

systemctl enable openvpn-client@client.service

While this did enable the service, the VPN doesn't start on boot. Attempting to manually start the service using systemctl doesn't work either, it just gives an error opening the configuration file:

Jun 12 00:06:54 archlinux systemd[1]: Starting OpenVPN tunnel for proton...
Jun 12 00:06:54 archlinux openvpn[4379]: Options error: In [CMD-LINE]:1: Error opening configuration file: proton.conf
Jun 12 00:06:54 archlinux openvpn[4379]: Use --help for more information.
Jun 12 00:06:54 archlinux systemd[1]: openvpn-client@proton.service: Main process exited, code=exited, status=1/FAILURE
Jun 12 00:06:54 archlinux systemd[1]: openvpn-client@proton.service: Failed with result 'exit-code'.
Jun 12 00:06:54 archlinux systemd[1]: Failed to start OpenVPN tunnel for proton. 

The only way I've been able to start the VPN is with

sudo openvpn /etc/openvpn/client/config.ovpn

which works nicely but doesn't help me start on boot.

Any ideas as to what's happening here and how I could fix it?

Last edited by arti946 (Today 04:02:47)

Offline

#2 2025-06-12 13:11:05

Caloway
Member
Registered: 2025-06-04
Posts: 2

Re: [SOLVED] Start OpenVPN on boot error

It seems like a configuration path error

 Jun 12 00:06:54 archlinux openvpn[4379]: Options error: In [CMD-LINE]:1: Error opening configuration file: proton.conf 

Are you sure where the proton.conf file is located?

ls /etc/openvpn/client/

Offline

#3 2025-06-12 17:56:27

arti946
Member
Registered: 2025-06-12
Posts: 3

Re: [SOLVED] Start OpenVPN on boot error

Yes I am certain that the .ovpn configuration file is in the proper place, and the VPN will start no problem if I do it manually with the openvpn command. When I double-checked just now I did notice that I needed root permissions to even view /etc/openvpn/client, and I had to run ls with sudo in order to view the files I had in there. Is it possible that OpenVPN doesn't have the permissions it needs to read the config file?

Offline

#4 Today 04:00:44

arti946
Member
Registered: 2025-06-12
Posts: 3

Re: [SOLVED] Start OpenVPN on boot error

Update: This is more of a workaround than a fix, but I got everything working (though I'm not totally sure why it worked). I uninstalled OpenVPN and switched to WireGuard, still using config files from ProtonVPN. I then enabled WireGuard using systemctl:

systemctl enable wg-quick@<CONFIG>.service

I also had to disable the systemd-networkd-wait-online service, though I'm not sure why:

systemctl disable systemd-networkd-wait-online.service

Disabling this service did not fix the issue with OpenVPN, which gave me the same error I posted about above.

It isn't quite perfect. My desktop takes notably longer to boot now, but my laptop (where I repeated the process) doesn't, although the laptop isn't actually connected to a vpn despite the program actively running. However, since the core issue I was having has been resolved, I'm going to mark the thread as solved.

Offline

Board footer

Powered by FluxBB