The wiki example on Wireguard is incorrect. The “pubkey” is suggested to be used as the peer name. And there are some random configuration lines after the configuration block.
I tried to edit it to the following from this link, but it says something about “Contains Contacts. This is probably spam”.
=== An example of setting up a connection between a client and server. ===
We need to create an interface for Wireguard, in this example we call it wg01.
Notice that in the example the 'persistent-keepalive' parameter is set (the value is in seconds) and it is optional.
'''On server:'''
<pre>
vyos@vyos# configure
vyos@vyos# set interfaces wireguard wg01 address '10.1.0.1/24'
vyos@vyos# set interfaces wireguard wg01 port '12345'
vyos@vyos# set interfaces wireguard wg01 peer CLIENT1 allowed-ips '10.0.0.0/24'
vyos@vyos# set interfaces wireguard wg01 peer CLIENT1 persistent-keepalive 15
vyos@vyos# set interfaces wireguard wg01 peer CLIENT1 pubkey '<pubkey client1>'
vyos@vyos# set protocols static interface-route '10.0.0.0/24' next-hop-interface wg01
vyos@vyos# commit
vyos@vyos# save
</pre>
'''On client 1:'''
<pre>
vyos@vyos# configure
vyos@vyos# set interfaces wireguard wg01 address '10.0.0.1/24'
vyos@vyos# set interfaces wireguard wg01 port '12345'
vyos@vyos# set interfaces wireguard wg01 peer SERVER allowed-ips '10.1.0.0/24'
vyos@vyos# set interfaces wireguard wg01 peer SERVER endpoint '192.168.0.115:12345'
vyos@vyos# set interfaces wireguard wg01 peer SERVER persistent-keepalive 15
vyos@vyos# set interfaces wireguard wg01 peer SERVER pubkey '<pubkey server>'
vyos@vyos# set protocols static interface-route '10.1.0.0/24' next-hop-interface wg01
vyos@vyos# commit
vyos@vyos# save
</pre>
<br>