Guide · Open source
How to use openvpn-install: set up an OpenVPN server
Updated · written with AI from the project's own documentation and checked against our catalogue data
openvpn-install is an open-source shell script that installs and configures an OpenVPN server on a Linux machine you control, such as a VPS, a dedicated server or a computer at home. It is for people who want their own VPN server and are comfortable running a root script on it. After this guide you will know how to download the script, run the interactive menu, create client configuration files and manage clients from the command line.
Quick start
- 1Check your server. Confirm you have root access, a supported Linux distribution, systemd and the TUN module enabled.
- 2Download the script. Run curl to fetch openvpn-install.sh from the official GitHub repository and make it executable with chmod +x.
- 3Launch the interactive menu. Run ./openvpn-install.sh interactive to install and configure the OpenVPN server.
- 4Add a client. Run ./openvpn-install.sh client add with a name to create a client configuration file.
- 5Download the .ovpn file. Copy the .ovpn file from your home directory to your device, for example with scp, and import it into an OpenVPN client.
- 6Check status. Use client list and server status to confirm certificates are valid and see who is connected.
What you need before you install openvpn-install
The script is meant to run on a server you own. The README lists Debian, Ubuntu, Fedora, openSUSE, CentOS, Amazon Linux, Arch Linux, Oracle Linux, Rocky Linux and AlmaLinux as supported distributions, with specific minimum versions. It requires systemd and is only tested on amd64.
- A Linux server with systemd and a supported distribution
- Root access
- The TUN module enabled
- Note: the README says the script is only regularly tested on the distributions marked as tested, and only on amd64
Download and launch the openvpn-install script
Log in to your server, download the script and make it executable. Then start the interactive menu, which guides you through installation and client management.
curl -O https://raw.githubusercontent.com/angristan/openvpn-install/master/openvpn-install.sh
chmod +x openvpn-install.sh
./openvpn-install.sh interactiveCreate client configuration files
Once the server is set up, you generate a client configuration file for each device you want to connect. Client files are saved as .ovpn files in your home directory. Download them with a tool such as scp and import them into your favourite OpenVPN client. A password-protected client can be created with an extra flag.
- Add a client: ./openvpn-install.sh client add alice
- Add a password-protected client: ./openvpn-install.sh client add bob --password
./openvpn-install.sh client add alice
./openvpn-install.sh client add bob --passwordManage clients: list, renew and revoke
The client subcommands let you check certificate status, extend a certificate and cut off access. Revoking a client immediately disconnects it if it is connected. The list command shows each client's status and remaining days, and it can output JSON for scripts.
- List clients: ./openvpn-install.sh client list
- Revoke a client: ./openvpn-install.sh client revoke alice
- Renew a client certificate: ./openvpn-install.sh client renew bob --cert-days 365
- JSON output: add --format json and pipe to jq
./openvpn-install.sh client list --format json | jqCheck connected clients and renew the server
The server subcommands show who is connected and handle the server certificate. The README notes that connection data refreshes every 60 seconds.
- Show connected clients: ./openvpn-install.sh server status
- Renew the server certificate: ./openvpn-install.sh server renew
- Remove OpenVPN: ./openvpn-install.sh uninstall
./openvpn-install.sh server statusUse the CLI for automation safely
For scripts and CI/CD, use the CLI commands rather than the menu. The README warns that API compatibility is not guaranteed and breaking changes may occur between versions, so pin the script to a specific commit instead of the master branch.
- Global options include --verbose, --log <path>, --no-log, --no-color and -h or --help
- Run ./openvpn-install.sh <command> --help for command-specific options
What people use it for
- Running a personal OpenVPN server on a VPS and connecting phones and laptops to it
- Using OpenVPN where UDP is blocked by setting up the TCP option
- Scripting client creation and revocation through the CLI with JSON output
- Connecting a home computer to a VPN you run yourself
Frequently asked questions
Is openvpn-install free?
The project is released under the MIT licence and is written in Shell. The script is free to use, but you pay for any server you run it on. The README lists example VPS providers with starting monthly prices, but these are shown only as recommendations.
What are the requirements for openvpn-install?
You need a Linux server with systemd and a supported distribution, root access and the TUN module enabled. The script is only regularly tested on amd64 and on the distributions marked in the README.
How do I install openvpn-install?
Download the script with curl from the GitHub raw URL, make it executable with chmod +x, and run ./openvpn-install.sh interactive. The interactive menu guides you through installation and client management.
Does openvpn-install work on Windows or macOS?
No, the script runs on the Linux server. The clients that connect to it can be OpenVPN apps on other platforms, since the README says clients exist for pretty much every platform.
Is WireGuard better than OpenVPN?
The README says WireGuard came later and is simpler and faster for most use cases. It points to wireguard-install as the newer choice, while OpenVPN still makes sense when you need TCP support or password-protected private keys.
How do I fix a client that cannot connect?
The source does not include a troubleshooting section, so check the prerequisites first: root access, the TUN module and systemd. Use --verbose or --log for more output, and search the project's discussions before opening a new one.
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
Use openvpn-install if you want your own OpenVPN server on a Linux VPS or home machine, especially where UDP is blocked and TCP is needed. Skip it if you want a consumer VPN app with no server to maintain, or if you want the simplest modern option, where the README points to wireguard-install.
Install options & downloads