Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am developing a open source application wrapper over OpenVPN library for Android. For that I need to generate openvpn conf file.

I have followed OpenVPN how but did not understand how to generate .conf file on Android.

Is there any way to generate .conf/ .ovpn file locally on Android device ?

I could generate .cert and RSA private key and OpenVPN static key but I am still not clear about generating CA certificate for a particular client.

is there anything ( server side certificate /private key)I need to get from server.

I am still learning certificate based authentication for OpenVPN so my question can be a little naive so please bear with it :)

share|improve this question

2 Answers 2

up vote 1 down vote accepted

You have to write configuration files on your own. OpenVPN server administrator should provide client configuration file. Configuration file for client looks almost the same on Linux/Windows/Android/etc.. For client you have to generate "client certificate", not "CA certificate". Maybe you should read more about PKI (http://bit.ly/YP5dvZ). If you are using certificates for authentication, then client should have configuration file, DH file, CA certificate, private and public client keys to work.

share|improve this answer

I have installed hundreds of OpenVPN servers and I never needed a DH file on the Client.

Server needs:

  • dh
  • ca.crt
  • ca.key
  • servername.crt
  • servername.key
  • optional (recommended) ta.key
  • a config file


  • the same ca.crt
  • clientname.crt
  • clientname.key
  • ta.key (if used in the server)
  • client.conf


share|improve this answer

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.