error with start openVPN service

I trying to install openVPN on ubuntu from this tutorial How To Set Up an OpenVPN Server on Ubuntu 16.04

in Step 9: Start and Enable the OpenVPN Service

when I enter ``` sudo systemctl start openvpn@server

to start the service. the CLI shows me this error message

Job for openvpn@server.service failed because the control process exited with error code. See “systemctl status openvpn@server.service” and “journalctl -xe” for details.

so. please how I can fix it?


I got this to work through changing the dh.pem , ca.crt,, server.key in server.conf to show the full path, eg

ca /etc/openvpn/ca.crt cert /etc/openvpn/openvpnserver.crt key /etc/openvpn/server/openvpnserver.key # This file should be kept secret

Diffie hellman parameters.

Generate your own with:

openssl dhparam -out dh2048.pem 2048

dh /etc/openvpn/dh.pem

I also make sure that these files were set to my account as the owner and chmod 400 (I’m new to Linux so apologies if this terminology isn’t correct).

This comment has been deleted

Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Hello I’ve run into the same error and the solution for me was to :

systemctl enable openvpn-server@server.service

instead of “openvpn@server.servcice”

then start the service:

systemctl start openvpn-server@server.service

I assume your config file is server.conf and it’s under /ets/openvpn/server folder

hope it helps

Create the ta.key file by running: cd /etc/openvpn openvpn --genkey --secret ta.key systemctl start openvpn@server.service

Just comment out the LimitNPROC line in /lib/systemd/system/openvpn@.service. Reboor system after that. Enter again sudo systemctl start openvpn@server and the mistake have to disapear.


Can you run systemctl status openvpn@server.service and post the output?

And have a look in /etc/openvpn/server.conf and add log /var/log/openvpn.log if the log option doesn’t exist. Then try to start the service again, and do a tail -50 /var/log/openvpn.log

Hi guys,

Mine was resolved on Ubuntu 16.04 when I realised that the /etc/openvpn folder was missing the DH file. I opened the server.conf and took an openssl command from a comment there:

openssl dhparam -out dh2048.pem 2048

Once I run this I could run sucesfully

systemctl start openvpn@server


Doh! I forgot to copy the ta.key file to the /etc/openvpn directory. I discovered this by running the suggested command:

sudo journalctl -xe

Found this beauty: Options error: --tls-auth fails with ‘ta.key’: No such file or Options error: Please correct these errors.

Hope it helps.

First time since I can remember that I’ve setup a VPN and I’m still working on the final config. I got the same error (sorry ubuntu users I used Centos however the answer should fit) Since the error is not being able to locate the ta.key it’s fairly obvious that the file is missing and that a config file would have some information about the file.

my steps: Find the file that has info about ta.key – find /etc/openvpn -type f -exec grep -l “ta.key” {} ; File found: – server.conf Vi/vim the file – vim /etc/openvpn/server.conf search for ta.key in file using vim – :/ta.key Then found this: For extra security beyond that provided

by SSL/TLS, create an “HMAC firewall”

to help block DoS attacks and UDP port flooding.

Generate with:

openvpn --genkey --secret ta.key

The server and each client must have

a copy of this key.

The second parameter should be ‘0’

on the server and ‘1’ on the clients.

tls-auth ta.key 0 # This file is secret

the openvpn -genkey command was executed as stated in the conf file. re-executed systemctl command as stated in the DO guide with no errors.

Having similar problem hopefully this will get an answer soon. Running CentOS 7 on an HP Pavilion g7 laptop that I would like to setup as a VPN server. When I run the “systemctl start openvpn@server.service” I get the cryptic message: Job for openvpn@server.service failed because the control process exited with error code. See “systemctl status openvpn@server.service” and “journalctl -xe” for details.

I have output from systemctl status command, the journalctl -xe command and the OpenVPN.log The openvpn.log file output looks like it has the best information so I am only including that here. If you need the output from the other two I can post it. output from the openvpn.log:

root@RayGo openvpn]# tail -50 /var/log/openvpn.log
Sat May 20 14:30:56 2017 WARNING: cannot stat file ‘ta.key’: No such file or directory (errno=2)
Options error: --tls-auth fails with ‘ta.key’: No such file or directory
Options error: Please correct these errors.
Use --help for more information.

It is saying it can not find the file ta.key. where do i put this file and what goes in it?

Thank you in advance for your help.

i am having the same problem, i see there is a lot of people face same problem but not a single place where the solution is clearly specified.