DEV Community

Cover image for Setup your own OpenVPN in 10 minutes

Posted on

Setup your own OpenVPN in 10 minutes

Hi everyone!
In this video, I show you how to start your own VPN server based on CentOS 8 in 10 minutes. The video shows the practical use of Ansible, Docker and OpenVPN.

I tried for the first time to record a screencast and provide it with a text description in English. I would be happy to receive comments and suggestions. Thanks for your attention!

Ansible Playbook

Link to Ansible Playbook -

The playbook uses roles from Jeff Geerling (geerlingguy.repo-epel,, geerlingguy.pip, geerlingguy.docker)

Docker-compose repository

This repo based on kylemanna/docker-openvpn but have Makefile with useful commands for comfortable OpenVPN setup.

No time to watch the video. How to setup?


  • Tunnelblick (​) – VPN-client for macOS
  • Ansible (Homebrew) – IT automation tool
  • Tmux (Homebrew) – terminal multiplexer (optional)
  • Alacritty (Homebrew) – fast terminal emulator (optional)
  • DigitalOcean account - hosting provider with fast VPS provisioning (optional)

Screencast contains 4 steps:

  1. Generate SSH-key pair, create a virtual server with CentOS 8
  2. Clone and run Ansible Playbook for basic server setup and installing Docker
  3. Quickly configure OpenVPN settings and start Docker-container
  4. Add client-config to VPN-client and connect

Top comments (0)