How to Install OpenVPN or WireGuard on Your VPS with One-Click Script Print

  • vpn, ubuntu, wireguard, centos, bash script, openvpn, vpn installer, linux vpn, hosteons, almalinux, one click vpn, vps setup, debian
  • 0

If you’re looking to set up a VPN server on your VPS, Hosteons provides a free and open-source Bash script that allows you to install either OpenVPN or WireGuard with a single command. The script supports most popular Linux distributions and is compatible with all KVM VPS from Hosteons.

 


 

 

Supported Operating Systems

 

 

  • Ubuntu 20.04 / 22.04

  • Debian 11 and above

  • AlmaLinux 8 / 9

  • CentOS 7 / 8

 

 


 

 

Features

 

 

  • Install either OpenVPN or WireGuard by choosing from a simple menu

  • Fully automated installation process

  • Secure configuration with encryption best practices

  • Client configuration file automatically generated

 

 


 

 

How to Use the Script

 

 

  1. SSH into your VPS as root

  2. Run the following commands:

 

wget https://raw.githubusercontent.com/hosteons/vpn-oneclick-installer/main/vpn_installer.sh
chmod +x vpn_installer.sh
./vpn_installer.sh

 

  1. Follow the on-screen prompt to select either OpenVPN or WireGuard.

 

 


 

 

Output

 

 

  • If you select OpenVPN, the client config will be saved as:

 

/root/client.ovpn

 

  •  

  • If you select WireGuard, the client config will be saved as:

 

/root/client.conf

 

 

You can then download and import the config into a compatible VPN client like OpenVPN Connect or WireGuard.

 


 

 

Additional Notes

 

 

  • On some systems (e.g., AlmaLinux), OpenVPN may not auto-start with systemd. In that case, start it manually with:

 

openvpn --config /etc/openvpn/server.conf

 

 


 

 

GitHub Repository

 

 

Source Code and Documentation:

https://github.com/hosteons/vpn-oneclick-installer

 


 

 


Was this answer helpful?

« Back