Skip to content

Deployment Overview of OpenVPN on Server

Prerequisites and Basic Requirements

To ensure a successful deployment, the following requirements must be met:

  • Operating System: Ubuntu

  • Privileges: Root or sudo access is required to execute installation scripts and manage system packages.

  • Network Access: The server must have outbound internet access to download the installation script from GitHub.

  • Package Manager: apt and dpkg must be available and in a consistent state.

FQDN of the final panel on the hostkey.in domain

Parameter Value
Prefix OpenVPN
Domain hostkey.in
Full template OpenVPN{Server_ID_from_Invapi}.hostkey.in

Application installation process

The application is installed using a specialized installation script via the command line. The following steps are performed:

  1. Script Acquisition: The installation script is downloaded from the official repository to /root/openvpn-install.sh.

  2. System Preparation: The system ensures that no other package management processes (such as unattended-upgrades) are holding locks on dpkg or apt. Any existing configuration states are repaired using dpkg --configure -a.

  3. Automated Installation: The installation script is executed with the following parameters:

  4. Command: /root/openvpn-install.sh install

  5. Client Name: client_hk

  6. Automatic Mode: Enabled (AUTO_INSTALL="y")

Access Rights and Security

  • Script Permissions: The installation script is assigned execution permissions with mode 0700.

  • Package Management: The system ensures all package locks are released before attempting to modify the system state to prevent corruption.

Custom Scripts and Additional Setup

The deployment process includes several automated actions beyond the core application installation:

  • Installation Script: A script located at /root/openvpn-install.sh is used to configure the OpenVPN service and generate client credentials.

  • System Notifications: The system sends status updates regarding the installation progress (start, stages, and completion) to a remote management API.

  • Cleanup: Post-installation tasks are executed to manage task locks and finalize the server environment.

Application Update Instructions

To update the OpenVPN application, you must re-run the installation script:

  1. Execute the installer again using the same parameters used during the initial setup to ensure configuration consistency.

  2. Ensure that no other package management operations are running before starting the update.

Location of configuration files and data

The primary configuration and client assets are managed by the OpenVPN installation script. While specific sub-directories depend on the script's internal logic, standard locations for OpenVPN include:

  • Configuration Directory: Typically /etc/openvpn

  • Client Credentials: Generated during the installation process in the directory specified by the installer.

Available ports for connection

The application utilizes standard VPN protocols. While specific port assignments are determined during the script execution, common defaults include:

  • UDP/TCP Port 1194 (Standard OpenVPN default)
question_mark
Is there anything I can help you with?
question_mark
AI Assistant ×