MasterLog's picture

Hello guys,

I am wondering if is there a way to automatically run "wg-quick up wg0":

https://github.com/turnkeylinux-apps/wireguard/blob/master/docs/setup.rs...

As soon as Wireguard (set up as a client) boots:

https://www.turnkeylinux.org/wireguard

 

I know that I can setup a local script, but I am wondering if there is a official way.

 

Regards

Forum: 
Jeremy Davis's picture

Hi MasterLog

I'm not a Wireguard user myself so TBH, I'm not 100% clear on what you mean? Also FWIW my knowledge tends to be broad rather than deep.

We do include some helper scripts (which will be in your PATH by default), but I'm not clear whether that's what you are after or not? TBH, I'm guessing not...

AFAIU running the "wg-quick up wg0" command should "just work". Or am I missing something? Does it need to be run on every boot? Or do you mean on firstboot?

Unless you mean something else, either way we probably should be doing that automatically, at least for the client. Although perhaps for the server too? Currently we don't.

If you have some specific suggestions around that and/or can confirm the usage that you are after, we can look to add that for the next release. In the meantime, I'm happy to help you out adding that functionality if you want, I'll just need to be clearer on the intended/desired use case. If you do it yourself, please feel free to share.

Also if you have a GitHub account, then please feel free to open a new issue on our tracker & I'll tag it later. That way we can keep it in mind for the next release. If you don't have a GH account, that's fine. I'll do it later myself once I'm clearer on how we can make it better.

MasterLog's picture

Hello,

I meant to run the command "wg-quick up wg0" every time the OS boot.
As I meant, I know that I can setup a local script, but I am wondering if there is a official way.

Regards,

Jeremy Davis's picture

I probably should have had a look at the docs before replying yesterday and it could have saved us a bit of back and forth.

Anyway, please give this a go:

systemctl enable wg-quick@wg0

That should enable the service for wg0 so it auto starts at boot.

Please let me know if that doesn't work and I'll have a play myself.

MasterLog's picture

Ahhh yeah, that should work! Thanks

Add new comment