0

I want to create wireguard private and public keys using solely php as the system i am running the script on is old ( 12.04 ) , for many reasons cannot upgrade it so i am not able to use wireguard utilities like wg genkey.

is there a way for that ? if not php maybe via bash.

  • you can' do that, but i found a way to do it with JS instead https://stackoverflow.com/questions/69088396/how-to-use-getrandomvalues-in-nodejs/69088519?noredirect=1#comment122110690_69088519 – Alberto Valejo Sep 08 '21 at 06:31

1 Answers1

0

I use the PostLoad keyword in wg0.conf and run a bash shell to load the private key via wg set privkey

Then restart wg-quick service.

John Greene
  • 2,239
  • 3
  • 26
  • 37