I want to configure incusOS to be accessible through a wireguard VPN. For that I’m following the documentation and prepared a json file but now, I just don’t see how to give it to incusOS?
I know this is basic but could not find how
Also, how do I make sure only incusOS can access this VPN and especially not the instances “behind” it (those which are source-NAT’ed I mean)
Our API is all JSON but we render as YAML in the interactive editor as that’s a bit easier to interact with for users and also a bit less strict syntax wise so more tolerant to human input.
So, am I supposed to replace the whole YAML content with the JSON I prepared? Append it? Or may be even try to merge it somehow if I don’t want to lose the current configuration and only *add* one wireguard config?
I’m sorry to ask this, but I have not found the answers in the documentation and I would not want to lose access to my current incusOS because of my ignorance!
Thank you Stéphane for taking the time to guide me through this!
I got the VPN up and running but initially faced two surprising ‘invalid endpoint’ errors:
WARNING: The IncusOS API and configuration is subject to change
Config parsing error: wireguard 0 peer 0 invalid endpoint 'example.net:41322'
Press enter to open the editor again or ctrl+c to abort change
Config parsing error: wireguard 0 peer 0 invalid endpoint '[2606:4700::6812:46a]:41322'
Press enter to open the editor again or ctrl+c to abort change
It looks like it does not support having a hostname or an IPv6 address in the endpoint. I could configure an IPv4 instead but it felt weird as wireguard supports this. I haven’t found this as a known issue on the github issue tracking system. Should I create one?
EDIT: well, actually, the wireguard interface is up and running but I can no longer ‘show’ the network configuration:
$ incus admin os system network show
WARNING: The IncusOS API and configuration is subject to change
Error: Invalid value: 1.29KiB
Same error with ‘edit’ :.-O any idea to help me fix this? I merged the config following your first recommendation: pasting part of the json into the yaml configuration
Does it affect the client or the server? (Just trying to know if you’re talking abour the next stable update to the client or to the daemon -and incusOS itself as a whole then-)