I'm a Python, Linux, Nix/NixOS, JavaScript... basically everything open-source enthusiast.
Files for OpenVPN

I used this to generate my OpenVPN certs and keys.

mkdir -p demoCA/newcerts
mkdir demoCA/private
echo "01" > demoCA/serial
touch demoCA/index.txt

under Common Name enter your correct domain:

openssl req -nodes -new -x509 -keyout my-ca.key -out my-ca.crt -days 3650

move files

mv my-ca.key ./demoCA/private/cakey.pem
mv my-ca.crt ./demoCA/cacert.pem

for server:

create private key (under Common Name enter your correct domain):

openssl req -nodes -new -keyout server.key -out server.csr

create a public key certificate and sign it

openssl ca -out server.crt -in server.csr

for client: create private key (under Common Name enter your correct domain):

openssl req -nodes -new -keyout <name>.key -out <name>.csr

set ‘unique_subject = no’

nano demoCA/index.txt.attr

create a public key certificate and sign it

openssl ca -out <name>.crt -in <name>.csr

generate additional files:

openssl dhparam -out dh2048.pem 2048
openvpn --genkey --secret ta.key