Skip to content

Guide · Open source

How to use openvpn-install: set up your own OpenVPN server

Updated · written with AI from the project's own documentation and checked against our catalogue data

openvpn-install is a shell script by Nyr that installs and configures an OpenVPN server on a supported Linux distribution, for a 'road warrior' setup where you connect your own devices to the VPN from anywhere. This guide is for people who want a VPN server on a Linux machine they control and have not set up OpenVPN before. By the end you will know what you need, how to run the script, and how to add or remove users later.

openvpn-installNyr/openvpn-install · ★ 20.7k · MIT

Quick start

  1. 1Get a Linux server. Use a machine you control running a supported distribution, such as Ubuntu, Debian, Rocky Linux or Fedora. A VPS is an option if you do not have one.
  2. 2Confirm root or sudo access. The script needs root or sudo access on the server before you run it.
  3. 3Download and run the script. Run the README command: wget https://git.io/vpn -O openvpn-install.sh && bash openvpn-install.sh.
  4. 4Follow the assistant. The README says to run the script and follow the assistant. Complete the prompts to set up the server.
  5. 5Add a user. Run the script again and choose to add a user for each device that will connect.
  6. 6Remove a user or uninstall when needed. Run the script again to remove a user or to completely uninstall OpenVPN.

What you need before you start

The script must run on a Linux server you control. The README suggests renting a VPS if you do not have one, and lists AlphaVPS as an example provider.

The supported distributions named in the README are Ubuntu, Debian, AlmaLinux, Rocky Linux, CentOS and Fedora. The script is not documented for other systems.

  • A supported Linux distribution (Ubuntu, Debian, AlmaLinux, Rocky Linux, CentOS or Fedora)
  • Root or sudo access on the server

Install OpenVPN with the installer script

Log in to your server and run the download-and-run command from the README. It downloads openvpn-install.sh and starts it with bash. Then follow the prompts the script shows you.

The README says the script can set up a VPN server in no more than a minute, even if you have not used OpenVPN before.

wget https://git.io/vpn -O openvpn-install.sh && bash openvpn-install.sh

Add, remove or uninstall users later

Once the first setup ends, you can run the same script again. According to the README, this lets you add more users, remove some of them, or completely uninstall OpenVPN.

Use the same script for all of these tasks so you do not need a separate tool for user management.

  • Run the script again to add a user
  • Run it again to remove a user
  • Run it again to uninstall OpenVPN
bash openvpn-install.sh

Choosing between OpenVPN and WireGuard

The README points to wireguard-install, a separate Nyr project, for a WireGuard setup. If you want WireGuard rather than OpenVPN, use that project instead of this one.

Other comparable projects the source names are Algo VPN and PiVPN. The source does not compare their features, so check each project's documentation before choosing.

What people use it for

  • Setting up a personal VPN on a VPS you rent so your own devices connect to it from anywhere
  • Creating separate VPN access for each of your devices by adding users with the script
  • Removing a user's access later by running the same script again
  • Uninstalling OpenVPN from the server by re-running the script

Frequently asked questions

Is openvpn-install free?

The project is released under the MIT licence, according to the source. The README also mentions a VPS provider and donation links, but it does not state a price for the script itself.

What operating systems does openvpn-install support?

The README names Ubuntu, Debian, AlmaLinux, Rocky Linux, CentOS and Fedora. The README lists only these distributions, so other systems are not documented as supported.

Do I need a server to use openvpn-install?

Yes. The script installs OpenVPN on a Linux machine, so you need a server you control. The README suggests renting a VPS if you do not have one.

How do I add a user to my OpenVPN server?

Run the same openvpn-install.sh script again after the first setup. The README says re-running it lets you add users, remove them, or uninstall OpenVPN.

Is there a WireGuard version of openvpn-install?

The README points to a separate project, wireguard-install, by the same author for WireGuard. openvpn-install itself is for OpenVPN.

What are alternatives to openvpn-install?

The source lists wireguard-install, Algo VPN and PiVPN as comparable projects. The source does not describe how they differ in detail.

New agent skills, repos and AI tools — every week

The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.

Our verdict

Choose openvpn-install if you have a Linux server on a supported distribution and want a guided OpenVPN setup that also handles adding and removing users. If you have no server, or want WireGuard, or run an unsupported system, pick another option such as wireguard-install.

Install options & downloads