Page 1 of 1

Autostart on Windows Server 2012

Posted: Thu Nov 18, 2021 4:07 pm
by goodfred

I have installed OpenVPN on a Windows Server 2012 R2 Standard a long time ago.
It is working. The client can connect if I start the service with the gui on the server.
But I have to start manualy the OpenVPN server in the OpenVPN GUI from time to time.

My problem: Autostart
I found this ressource: ... m-startup/

Now my questions are:

1. Do I need a sheduled task that for the VPN service starts or is it enough to set the start-type of "OpenVPN Interactive Service" and "OpenVPNService" to automatic? I want that the service is always running that for the client can connect at every time. (and I want that it runs, too, when no one is logged in)

2. Do I need to close the OpenVPN GUI that for the service(s) can start/run? There is an open connection in the GUI. (I have started manualy this connection in the GUI with the normal /config folder) I hope on a reboot/etc I dont need to open the connection manualy again. I hope it starts automaticly.

3. I have copied the .ovpn configuration file to C:\Program Files\OpenVPN\config-auto. Do I have to copy .crt/.key Files to the config-auto folder? In the configuration file all files are linked with the complete path. Thats why I think I dont have to. But only the ta.key file is linked without complete path. (here is the line: "tls-auth ta.key 0 # This file is secret") I've copied it to the config-auto folder. Can I delete it from the config-auto folder?

Im very thankful for answers! And I wish a good week!


P.S.: In the past I've set the start-type of the services to automatic. Today I found out that I need a .ovpn file in the config-auto folder. I hope that it works now.

Re: Autostart on Windows Server 2012

Posted: Thu Nov 18, 2021 4:45 pm
by TinCanTech
See C:|Program File\Openvpn\config-auto

Re: Autostart on Windows Server 2012

Posted: Fri Nov 19, 2021 7:41 am
by goodfred
This means that it should work properly if the start-type of the services "OpenVPN Interactive Service" and "OpenVPNService" are set to automatic and the .ovpn file is in the "config-auto" folder without additional configuration?

I hope so.

Thank you.

Re: Autostart on Windows Server 2012

Posted: Mon Nov 29, 2021 7:43 am
by goodfred
It is working without problems.
Service is set to autostart.
Config file is copied into config-auto.
I tried it with a newstart of the server without problems.

Thank you! :)