Skip to content

OpenVPN

A script that sets up your own OpenVPN server on common Linux distributions and manages client profiles.angristan/openvpn-install

Stars
16.2k
Forks
3.3k
Licence
MIT
Language
Shell
Last update
1 months ago
Type
Dev tool

What it is

This is a shell script that installs and configures an OpenVPN server on a Linux machine you control, such as a VPS, a dedicated server, or a home computer. Once it is running, you generate a client configuration file for each device you want to connect, so that traffic from those devices is sent encrypted through your server. It also offers commands to revoke clients, renew certificates, and see who is connected.

  • Set up an OpenVPN server on a cloud VPS in a few steps using the interactive menu
  • Generate a .ovpn profile for each phone or laptop and revoke one when a device is lost
  • Add a password-protected client profile with the --password option
  • Check certificate expiry and list connected clients with the server status command

Great for

  • People who want their own VPN server on a Linux VPS or home machine
  • Users who need OpenVPN specifically, for example where UDP is blocked and TCP is required
  • Admins who want scripted client management through the CLI with JSON output
  • People comfortable running a root shell script on a server they control

Not ideal for

  • People who want a plug-and-play consumer VPN app with no server to manage, since this requires you to run and maintain a server
  • People on non-Linux or non-systemd systems, since the README says the script requires systemd and supports only listed distributions
  • Users who want the simplest modern option, since the README points to wireguard-install as the newer choice for most use cases
Step-by-step guide: how to use OpenVPNInstall, first run, examples, tips and FAQs

How to get it

  1. 1

    See the README

    You'll need: Linux server with systemd and a supported distribution · Root access · TUN module enabled

    Download the script

    curl -O https://raw.githubusercontent.com/angristan/openvpn-install/master/openvpn-install.sh

    Make it executable

    chmod +x openvpn-install.sh

    Launch the interactive menu

    ./openvpn-install.sh interactive
  2. 2

    Run it

    • Download the script to your server and make it executable
    • Run it as root with the interactive command and follow the prompts to install
    • Add a client with ./openvpn-install.sh client add alice
    • Copy the resulting .ovpn file from your home directory to your device and connect with an OpenVPN client
  3. 3

    Get the most out of it

    • Use --password on client add to protect a client's private key
    • Use client list --format json with jq for scripting
    • Use server status to monitor connected clients, which refresh every 60 seconds
    • Pin to a specific commit if you use the script in automation, as the README advises

Downloads

Strengths

  • Covers many Linux distributions, and the README lists the tested versions and architecture
  • Includes both an interactive menu and a CLI for automation
  • Supports client revocation that disconnects connected clients via the management interface

Trade-offs

  • The README says the script is only regularly tested on amd64 and on the listed distributions, and API compatibility between versions is not guaranteed
  • Requires root access and the TUN module, so it needs a server where you have that control
  • OpenVPN is described as older than WireGuard and not as simple or fast for most uses

How it compares

ProjectStarsTypeLevelUpdatedBest for
openvpn-install (this)16.2kDev toolintermediate1 months agoPeople who want their own VPN server on a Linux VPS or home machine
wireguard-install11.4kDev toolintermediate6 months agoPeople who want their own personal VPN on a rented Linux server
openvpn-install20.7kDev toolintermediate2 months agoPeople who want their own VPN server on a Linux machine they control
dockerfiles13.9kCurated listintermediate2.3 years agoDevelopers who want working examples of Dockerfiles for desktop applications run in containers
inshellisense10.8kDev toolbeginner7 days agoDevelopers who spend a lot of time in the terminal and want suggestions for unfamiliar command options
linux-command37.2kLearning resourcebeginner6 days agoPeople learning the Linux command line who want quick, readable command explanations

Stats synced from GitHub. The assessment above was drafted with AI from the project's README on 2026-10-29 and may miss recent changes — check the README before relying on a command. MIT licence: free to use, modify and distribute, including commercially, as long as you keep the copyright notice.