Check the generated examples once you log in, but for a hub and spoke network let's say, the idea is this:
- Create your network.
- Add a device. Name it hub. Label it hub. Do not assign the device to your self, but create a guest invite. Name the invite hub.
- Add more devices, one for each server or enduser device. Label them as you wish. For servers, create guest invites. For enduser, create guests or members. Guests don't need to create an account to get their configs.
- In connections, add two rules. all to hub, and hub to all.
Now the network is defined, but there are no associated private/public keys with these devices. You need to create Interfaces for that.
For your servers, for which you created guest members, create an interface for each device. Either generate the keys in browser, or just provide the public key if you already have one.
For the hub interface, you need an endpoint url, that's where all other devices will connect to. No endpoint is needed for the other interfaces.
For the devices belonging to end users, just copy and share their invite url. They will be able to generate their own Interfaces and keys.
During all these changes , all configs are kept in sync.
Going back to your server devices, you can just curl their respective interface url (including the invite code) and you'll get your config. Add a cron and a fallback in case of a botched change, and you're set. (in theory at least)
And I've worked in IT for 25 years, I make and manage my own wireguard setups.
I wish new products and sites were more to the point in how they're supposed to be used. I generally don't check the docs unless I already have an inkling that I want to make use of it.
So in other words this is a service for the selfhoster that provides wireguard to their family and friends. This way they don't have to manually send them a config or a qr code, instead just send them to this site.
You are the target audience, I guess, so your feedback is doubly appreciated. Thanks! :)
You described it just right. That's it. Right now, on the "hero" section of the landing page, I have this:
The easiest way to create and share WireGuard Networks. Define WireGuard networks, devices, and connections. Invite friends, family and teammates to add their devices. View, Scan or Download WireGuard configuration files.
I'm just not sure how else to put :)
I think it was a combination of me not expecting a service like this, and the fact that you use terminology like "invite".
You mean that as in "add devices of friends by inviting them" right? Because the main question in my mind is "wait, who's generating the keys? who's storing the keys? who has access to my private key?"
I do not want to tell you how to write stuff, I'm an autistic nerd with limited people skills. But I think it would make more sense if you said something along the lines of "easy way to share client wireguard config with friends and family".
So for the cronjob part, that only applies to devices assigned to guests, as they can be used without creating an account on wirehub.
- Create your invite, Guest Role.
- Assign the Device to that Guest.
- Add an Interface on that Device.
- Preview the network as that Guest (click the eye icon next to their username). Open the URL in a new private window, because you need to:
- Accept the Invite.
- As that Guest, you'll just see the device(s) assigned to you. Click on the config button for any device and right click, copy the Download URL. That should contain the invite_code as well, which is basically the authorization token for that Guest.
Now, on your device, just curl the URL, like so:
``` curl 'https://wirehub.org/wirehub/n/hub-network/device/1/download?...' ```
`curl -s -o ./wg0.conf 'https://wirehub.org/wirehub/n/hub-network/device/1/download?...'`
This pulls the config and stores it in `wg0.conf`. The [Interface] section though is invalid (as there's no private key). So you'd have to either generate the keys on the server or somehow get them there. From then on it's just standard wg-quick and wg to create the interface and load your keys.
After the cron job, you'd want to do something like `wg syncconf wg0 <(wg-quick strip wg0)` so that wireguard picks up any changes from the pulled config.