A fully automated Bash script to install and configure an OpenVPN server using Docker on Parrot OS (Debian-based) systems. This script handles Docker installation, OpenVPN setup, and client configuration generation.
- Cleans up previous Docker installations
- Installs Docker (native Parrot or Docker CE)
- Sets up OpenVPN server using the official Docker image
- Generates client configuration files
- Easy management commands for your VPN server
- Parrot OS or Debian-based Linux
- Bash shell
- Internet connection
Run the following command to download and execute the installer directly:
bash <(curl -sSL https://raw.githubusercontent.com/0xAhmadYousuf/OVPN-Installer/main/installer.sh) -h <your_ip_or_dns>Replace <your_ip_or_dns> with your server's external IP address or DNS name.
-c <client_name>: Set client name (default: client1)-d <data_volume>: Set OpenVPN data volume name (default: ovpn-data-docker)
Example:
bash <(curl -sSL https://raw.githubusercontent.com/0xAhmadYousuf/OVPN-Installer/main/installer.sh) -h vpn.example.com -c aliceUsage: installer.sh -h <ip/host> [-c <client_name>] [-d <data_volume>]
-h <ip/host> Required. External IP address or DNS name for OpenVPN server.
-c <client_name> Optional. Client name identifier. Default: client1
-d <data_volume> Optional. OpenVPN data volume name. Default: ovpn-data-docker
--help Show this help message.
- Cleans up any previous Docker installations
- Installs Docker (native Parrot or Docker CE)
- Adds your user to the Docker group
- Pulls the official OpenVPN Docker image
- Generates OpenVPN server configuration
- Initializes PKI (you'll set a CA passphrase)
- Starts the OpenVPN server container
- Generates a client certificate and config file
- Outputs the
.ovpnfile for your client
- Check status:
docker ps - View logs:
docker logs openvpn-server - Stop server:
docker stop openvpn-server - Start server:
docker start openvpn-server
- Copy the generated
<client_name>.ovpnfile to your client device - Import it into your OpenVPN client
- Connect to your VPN server at
<ip/host>:1194
- The generated
.ovpnfile contains sensitive credentials. Keep it secure!
See LICENSE.
GitHub: 0xAhmadYousuf/OVPN-Installer just the repo