Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Hi i have bought vpn access form a vpn provider, i have all of thees .ovpn files inn /tmp/astrill. Yes i have made thoes folders.

How can i get openvpn to startup one of thees .opvn files under start/boot up?

I would like to, not have to run openvpn --config VPNservername.ovpn evry time i have to do a reboot. I'm running ubuntu 12.04 no gui.

Yes i have installed openvpn

Thaks -- new vpn user

share|improve this question
up vote 3 down vote accepted

When you have installed openvpn from the repo, everything is already prepared for you.

Place the whatever.conf file in /etc/openvpn/ and a daemon will be started for it at boot.


Please note that *.opvn will not work, *.conf will.

share|improve this answer
I did a fresh reinstall of openpvn apt-get purge openvpn The copied the file as you sad, but no resault after a reboot :( einar@Download:/etc/openvpn$ dir 86-Netherlands-1.ovpn update-resolv-conf – starR Feb 25 '14 at 22:51
@staR I don't know if that was really necessary. But anyway, please try to copy whatever.ovpn to /etc/openvpn/. You'll have to have root rights for this and rename it to whatever.conf. Good luck! – Klaus Warzecha Feb 25 '14 at 22:56
rename til .conf worked great thanks:)) – starR Feb 26 '14 at 0:01
My pleasure :-) – Klaus Warzecha Feb 26 '14 at 0:04

Note, that /etc/default/openvpn file contain AUTOSTART option. You can add there all your configs without .conf at the end you want to autostart. But don't forget to do:

systemctl daemon-reload

after editing it.

share|improve this answer
This is irrelevant to this question as it was asked a long time ago and the OP is running Ubuntu 12.04. And it dosen't seem the OP is going to accept - he hasn't been on for 3 months. – ubashu yesterday

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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