MicroOS - I need to start a VPN at boot

I used to start my VPN connection “automagically” at boot using nm-config-editor, is there a way to configure the same behavior under MicroOS? This is the only issue preventing me from moving all my machines to this fantastic OS. Please and thank you.

I do not know what nm-config-editor is, but if it is related to NetworkManager, MicroOS supports (or maybe it is even the default, not sure) NetworkManager and you can configure it as needed.

Yes, MicroOS does not even include wicked.

it’s a function present in NetworkManager-connection-editor, it’s not part of the MicroOS default installation, using “nm-connection-editor” it’s possible to bind the network, either ETH or WI-FI and a VPN connection, forcing them to start together. I’m not aware of another way to do this but that is all I need.

You can simply copy (and adjust as needed) connections definitions in /etc/NetworkManager/system-connections; you can use nmcli; you can install and use nmtui; finally, you can try to install NetworkManager-connection-editor ignoring recommended packages to minimize installation size.

thanks, I’ll try this way.

You should be able to (for an example interface name of wg0):

# nmcli connection edit wg0
nmcli > set connection.autoconnect yes
nmcli > save
nmcli > ^d

You do need to have the connection already setup, including the secrets. You can check the configuration in /etc/NetworkManager/system-connections/wg0.nmconnection.

Thank you, it works.

1 Like