NordVPN Help Center
One place for all the information you need

Linux - How to start OpenVPN on boot


This is a tutorial on how to start an OpenVPN connection when your Linux system boots.

Auto-connect OpenVPN via terminal
  • 1. Create auth.txt file inside /etc/openvpn directory via this command:

    sudo gedit /etc/openvpn/auth.txt

    Fill it with your NordVPN credentials:


    Save it.

  • 2. Then open the file which you are using to establish a connection:

    sudo gedit /etc/openvpn/

    And change this line:



    auth-user-pass auth.txt

    Save the file and change its name:

    sudo mv /etc/openvpn/ /etc/openvpn/de75.conf
  • 3. Then you will have to edit the startup on boot file via this command:

    sudo gedit /etc/default/openvpn

    When the text editor opens, add this line above #AUTOSTART="all":


    Save the file and reboot your Linux device.

  • 4. After the reboot - open the terminal and type in:

    sudo traceroute

    The first hop address should be and in you should see Germany 75 servers IP address.

Close ↑

Auto-connect OpenVPN via Network Manager (Ubuntu)

First, set up the VPN connection by following the "OpenVPN via Network Manager" section in this article:

Once the VPN connection is set up in the Network manager, edit your main network connection, and select "Automatically connect to VPN when using this connection". In the drop-down list, select the VPN connection you previously created.


Close ↑