This manual explains step by step how to install and configure the OpenVPN client on a Linux server using a configuration file provided by SWPanel. It is designed for users who need to establish a secure connection to a virtual private network (VPN) managed from the SWPanel panel.
OpenVPN is open-source software that allows you to create secure, encrypted VPN connections between devices and networks. Its main advantage is the ability to connect remotely to a private network while maintaining the confidentiality and integrity of the data transmitted.
To begin, we need to access the SWPanel management environment with a user who has permissions for VPN connections.
Steps:

info_capture The screenshot is for illustrative purposes only. It was taken from version 2025.004.0005 dated 19/07/2025. It may differ from what is shown in the current version of SWPanel.
.ovpn configuration fileOnce inside the SWPanel environment, follow these steps:
.ovpn extension, which contains the parameters needed to establish the VPN connection (labelled as step 2).
info_capture The screenshot is for illustrative purposes only. It was taken from version 2025.004.0005 dated 19/07/2025. It may differ from what is shown in the current version of SWPanel.
Important note:
This .ovpn file must be transferred to the Linux device where the VPN connection will be run. If you do not have direct access to the device, we recommend using software such as WinSCP to send the file. It is essential to know the exact path where the file is stored, as this will be needed during configuration.
Once the .ovpn file has been transferred, access the Linux server where you want to establish the VPN connection. Then follow these steps:
Run the following command to update the system:
sudo apt update -y && sudo apt upgrade -y
To install the OpenVPN client, run the following command:
apt install openvpn -y

To confirm that OpenVPN has been installed correctly, run:
openvpn --version

Make sure the .ovpn file is in an accessible location. To establish the connection, run:
openvpn --config /ruta/a/tu/archivo.ovpn
Replace /ruta/a/tu/archivo.ovpn with the actual location of the .ovpn file.

During the process, you will be asked to enter your VPN credentials. These are the same credentials used to access SWPanel.

To verify that the VPN connection has been established correctly, run:
ifconfig
Look for an interface called tun0 or similar, which will indicate that the connection is active.

Discover the most powerful and flexible way to manage your servers. Leave us your email and we'll send you the steps to get started in minutes.
Already have an account? Log In