Fully automated OpenVPN AS installation, i.e scripted response to Initial Startup Questions

Business solution to host your own OpenVPN server with web management interface and bundled clients.
Post Reply
arickanderson
OpenVpn Newbie
Posts: 2
Joined: Tue Mar 30, 2021 5:35 pm

Fully automated OpenVPN AS installation, i.e scripted response to Initial Startup Questions

Post by arickanderson » Tue Mar 30, 2021 5:45 pm

We are in a Dev/Ops environment, so the creation of all of our servers has to be fully automated, including the initial server instantiation. If I use an OpenVPN Access Server AMI as my starting point, is this possible? (i.e. OpenVPN 3)

To put it another way, is there a way to script the responses to the OpenVPN Access Server initial startup questions, so that when the User-Data section of the Cloud-Init kicks in, the OpenVPN Access Server is already running?

I have read pages of the online documentation, and all of the examples that I have found, assume that a human being is logging in the first time that a server is created. That is a non-starter for us.

User avatar
openvpn_inc
OpenVPN Inc.
Posts: 88
Joined: Tue Feb 16, 2021 10:41 am

Re: Fully automated OpenVPN AS installation, i.e scripted response to Initial Startup Questions

Post by openvpn_inc » Tue Apr 13, 2021 6:24 am

Hello arickanderson,

I would recommend not worrying about ovpn-init's answers - it doesn't accept an 'answer file'. But you can still do what you want. I would recommend just running ovpn-init with the --batch option so that it sets up your AS with all default configuration. All those questions can be reconfigured afterwards on the command line interface.

To get your Access Server up and running with the necessary basic information you can run this command:
ovpn-init --batch

This indicates to ovpn-init that you want to do the first-time setup but not answer any questions. All the defaults will be assumed and your Access Server will be up and running. After this you can use sacli to reconfigure any setting. This script is capable of reconfiguring pretty much any setting of the Access Server from the command line.

Kind regards,
Johan
Image OpenVPN Inc.
Answers provided by OpenVPN Inc. staff members here are provided on a voluntary best-effort basis, and no rights can be claimed on the basis of answers posted in this public forum. If you wish to get official support from OpenVPN Inc. please use the official support ticket system: https://openvpn.nets/support

arickanderson
OpenVpn Newbie
Posts: 2
Joined: Tue Mar 30, 2021 5:35 pm

Re: Fully automated OpenVPN AS installation, i.e scripted response to Initial Startup Questions

Post by arickanderson » Thu Apr 15, 2021 5:21 pm

Umm, I thought that I had tried that. If so, I must have done something wrong. I will have to give this another go, the next time that I have some cycles. In the meantime, we have proceeded ahead with 2.5.

Thank-you for your response.

Post Reply