This is an old revision of the document!
In this case, RockyLinux 8.6 is used, therefore the same steps can be done on CentOS 8.
Make sure the latest kernel is installed and sudo rights are given.
Install epel and elrepo:
sudo yum install epel-release elrepo-release
After this install WireGuard packages:
sudo yum install kmod-wireguard wireguard-tools
Now with Wireguard installed we start creating the folder structure:
sudo mkdir /etc/wireguard/
A configuration file aswell as the public and privatekey will be stored there.
Next step is to create both keys and store them at /etc/wireguard/
wg genkey | sudo tee /etc/wireguard/privatekey | wg pubkey | sudo tee /etc/wireguard/publickey