Not able to start wg0 service in Setup of WireGuard VPN Server

I followed the instructions in
However, I made a mistake in creating wg0.conf in that I missed the words ‘PrivateKey’ on the appropriate line adn didn’t notice it until I did sudo systemctl enable wg-quick@wg0 and the similar enable & status lines. I corrected the wg0.conf file and tried the sysctl stuff again but it still failed due to seeming not to have picked up the changed wg0.conf line. Is there a way of correcting this without removing the wireguard packages and starting again?

Stop the service. Then edit the file. Add/remove whatever you need. Finally start it again.

Linux sysadmin blog - Linux/Unix Howtos and Tutorials - Linux bash shell scripting wiki