I want to create systemd unit nordvpnconnect.service to autoconnect my vpn after boot. Nordvpnd daemon starts first, and I have my unit file:

Description=NordVPN connector 
After=nordvpnd.service nordvpnd.socket

ExecStart=/usr/bin/nordvpn connect Estonia


It doesn't work, and when cchecking journalctl -u nordvpnconnect -f I see:

Started NordVPN connector.
lis 09 01:01:56 maciexhome nordvpn[7872]: [38B blob data]
lis 09 01:01:56 maciexhome nordvpn[7872]: Stdin/Stdout should be terminal
lis 09 01:01:56 maciexhome systemd[1]: nordvpnconnect.service: Main process exited, code=exited, status=1/FAILURE
lis 09 01:01:56 maciexhome systemd[1]: nordvpnconnect.service: Failed with result 'exit-code'.

I tried:

ExecStart=/usr/bin/nordvpn c 'Estonia'
ExecStart=/usr/bin/'nordvpn c Estonia'
ExecStart=/usr/bin/"nordvpn c Estonia"

There were different logs in journal, but nothing works. Could someone point out my mistake?


As I can see on their support page, you should just use openvpn not any sort of nordvpn command. And I would be strongly surprised with any construct of this type: /usr/bin/"nordvpn c Estonia", as it means the command name in /usr/bin would be nordvpn c Estonia, which is very, very non-standard. They rather just give you their certificate and let you use it with your openvpn. Here's an example from their site:

sudo openvpn /etc/openvpn/ovpn_udp/us2957.nordvpn.com.udp.ovpn
  • I will try, thanks. The point is, why my command doesn't work via systemd unit. When you use this command in terminal, it works properly. It connects and run without problem. So I don't understand what is wrong with my systemd unit. – Maciek Nov 10 '19 at 19:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.