NetworkManager
NetworkManager can be used to provide network management services in Alpine Linux. Ensure that only one network management service is running at a time to prevent conflicts between them.
Prerequisites
- The community repository must be enabled.
- Set up eudev. Otherwise your network devices can be listed as (strictly-)unmanaged.
- A non-root user account, is recommended.
- Ensure that network interfaces are configured and tested.
Installation
Install the basic network management daemon of NetworkManager suite:
# apk add networkmanager
To be able to use NetworkManager with your current user (i.e. not root), you need to add your user to the plugdev
group created by NetworkManager :
# adduser <YourUsername> plugdev
Some of the popular NetworkManager user interfaces or front ends available as sub-packages are:
- TUI: networkmanager-tui, (run
nmtui
) - Command line: networkmanager-cli (run
nmcli
) - GUI: plasma-nm for Plasma integration and applet
- GUI: network-manager-applet for a GTK system tray applet
Networkmanager service
Start NetworkManager:
# rc-service networkmanager start
Set the service to autostart on boot:
# rc-update add networkmanager default
Wired networks
If wired networks do not appear or you get an error message like "Could not activate connection: Connection 'Ethernet connection 1' is not available on device eth0 because device is strictly unmanaged", add the following to the /etc/NetworkManager/NetworkManager.conf file as follows:
Contents of /etc/NetworkManager/NetworkManager.conf
Wireless networks
NetworkManager supports both wireless daemons i.e iwd and wpa_supplicant. Using both daemons simulatenously leads to conflicts. First Install the networkmanager-wifi package if you want NetworkManager to connect and manage wifi:
# apk add networkmanager-wifi
wpa_supplicant backend
wpa supplicant is the default wifi daemon in Alpine Linux. Open /etc/NetworkManager/NetworkManager.conf in a text editor and change it to something like this:
Contents of /etc/NetworkManager/NetworkManager.conf
Now you need to stop conflicting services:
# rc-service networking stop # rc-service wpa_supplicant stop
Now restart NetworkManager:
# rc-service networkmanager restart
Now connect to a network using one of the interfaces configured. If that connects and stays connected with no issues add the networkmanager
service and disable the networking
and wpa_supplicant
boot services:
# rc-update add networkmanager default # rc-update del networking boot # rc-update del wpa_supplicant boot
iwd backend
NetworkManager supports wireless networks with iwd daemon as backend, however, consider existing issues before using it.
To use iwd as backend retain the NetworkManager's configuration file /etc/NetworkManager/NetworkManager.conf as shown in previous section and modify that [device]
section alone as follows:
Contents of /etc/NetworkManager/NetworkManager.conf
Ensure that wpa_supplicant and related services are stopped before continuing. Start the iwd service and restart NetworkManager:
# rc-service iwd start # rc-service networkmanager restart
VPN support
NetworkManager has support for Wireguard and support for other VPN's are provided by plugins in the following subpackage:
- networkmanager-openvpn for OpenVPN
Plasma support


Troubleshooting
nm-applet not authorized to control networking
You can enable all users to edit connections without adding polkit.
First, make the conf.d
directory for networkmanager:
# mkdir -p /etc/NetworkManager/conf.d
Then, add following content to /etc/NetworkManager/conf.d/any-user.conf so that
Contents of /etc/NetworkManager/conf.d/any-user.conf
Finally, restart networkmanager:
# rc-service networkmanager restart
See also
- Networking - Main page
- wpa_supplicant - Default wifi daemon
- iwd - An alternate wifi daemon