How can I make OpenVPN remember my username and password?

It is possible to have OpenVPN (not our VPN software, but the other OpenVPN setups we offer), remember your username and password so it is not necessary to type it in each time you connect. The method varies depending on your operating system.


For Windows

To save your username and password, first, right click on the icon for OpenVPN as if you were going to connect to a server. Go to the server you want to connect to, but instead of clicking connect, click Edit Config. This will open the config file for the server you chose. In it, add the following line:

auth-user-pass pass.txt

Save the changes. Now, click on File in Notepad, and click New. In the new Notepad window, you will type your username and password. On the very first line, type your username. Then press Enter, and on the second line, type your password. It should look similar to this when completed:

p1234567
topsecretpassword

But with your own username and password instead of the examples I have provided. Save the document as pass.txt to the following location: C:\Program Files (x86)\OpenVPN\config , and in the future, it shouldn't prompt you for your username or password again.

Note: Windows may not allow you to save the file here. In this case, save it to your desktop as pass.txt, and then drag it into the OpenVPN config folder here: C:\Program Files (x86)\OpenVPN\config


For MacOS

Saving your username and password in Viscosity and Tunnelblick is as simple as checking the option to Save your username and password when connecting to the server. You will likely have to do this once for each server, but after it has been done once you should not have to do it a second time.

Have more questions? Submit a request