Alpine set up for daily driver

Disable secure boot

First, always check for secure book. If it is enabled you won’t be able to boot your thumbdrive.


On the official wiki1 there a more complete guide on how to setup, and will probably be more accurate than this one, so always refer to that wiki first. This is more a log of how I setup.

Once you boot your live installation run setup-alpine and follow the steps:

  • Select keyboard layout: us

  • Select keyboard variant: us

  • Enter system hostname: gridx.local [This is my choice, if you don’t know what exactly is this go for the default localhost]

  • Which one do you want to initialize?: wlan0 [I chose wlan0, since it is a laptop I don’t have it connected to cable]

  • Type the wireless network name to connect to: <NAME>

  • Type network key: ******

  • Ip address for wlan0? dhcp [and for the following device I have chose none since I won’t use them anyways]

  • Do you want to do any manual network configuration? n

  • Changing password for root: ******

  • Which timezone are you in? Europe/Berlin

  • HTTP/FTP proxy URL? none

  • Which NTP client to run? busybox [I don’t have a good experience with chrony, busybox works better for me]

  • Enter mirro number? f [I pick this one to speed up things a bit, default one is fine as well]

  • Set an user? <NAME> [Since we aiming to be a desktop create your user here]

  • Full name for user <NAME>: <FULLNAME>

  • Type password: ******

  • Enter ssh key or URL for <NAME>? none [this is a public key so you can ssh into this machine]

  • Which ssh server? openssh

  • Which disks would like to use? <DISK> [now you are going to set up the disk for installation]

  • How would you like to use it? crypt [I like to use encrypted disks, I strongly advice for it, but in case you don’t want, go for sys directly]

  • How would you like to use it? lvm

  • How would you like to use it? sys [more info2]

  • WARNING: Erase the above disks and continue? y

  • Enter passphrase for <DISK>: ******

Once you have finish the step run reboot.

Desktop environment

Now comes the “hard” part, where we need to configure the desktop. For me, I’m going for i3wm with lightdm.

To be able to install all the necessary packages we will need to enable the community repository3. To edit it I use vim

apk add vim
# then
vim /etc/apk/repositories

and uncomment the .../community


Then run apk update and you will see the both repositories printed out.

Now we will install the necessary drivers for xorg to run properly. Firs search for all video drivers apk search xf86-video* and install whatever you have for you computer (in my case apk add apk add xf86-video-amdgpu)

Add required mesa drivers:

apk add mesa-dri-gallium mesa-va-gallium mesa-egl

Alpine provides a command to install required packages for xorg


Now to set the lightdm and its required dbus setup:

apk add lightdm-gtk-greeter
setup-devd udev
rc-update add dbus boot
rc-update add lightdm boot
apk add terminus-font
dbus-uuidgen > /var/lib/dbus/machine-id
rc-update add dbus

Now for the i3wm:

apk add i3wm i3status xterm i3lock
add user <NAME> input`
add user <NAME> video`


It uses networking by default, which I don’t like very much, so let’s switch to NetworkManager4.

First install it and its requirement:

apk add networkmanager networkmanager-wifi # for wifi support

Add user to group:

adduser <USER> plugdev

And as every group change you will have to logout and login again to those changes take effect.

Now let’s edit its configuration on /etc/NetworkManager/NetworkManager.conf



Now, we need to swap services:

rc-service networking stop          # stop networking service
rc-update del networking boot       # remove it from start up from boot level

rc-service networkmanager start     # start networkmanager service
rc-update add networkmanager boot   # add it from start up on boot level

Also, install np-applet5 for desktop tray icon

apk add network-manager-applet 


By default if it will setup wpa_supplicant6 for WIFI, but I opted for iwd7.

apk add iwd

Now append to the /etc/NetworkManager/NetworkManager.conf:

# ...

Swap WIFI services:

rc-service wpa_supplicant stop          # stop wpa_supplicant service
rc-update service del wpa_supplicant    # remove it from start up 

rc-service iwd start                    # start iwd service
rc-update service add iwd               # add it to start up


There is a list go command that I use that may be helpful:

apk add perl bash fzf           # required for things to work
apk add fish                    # shell
apk add zathura-pdf-poppler     # pdf viewer
apk add ranger                  # file explorer
apk add alpine-sdk make git go  # some dev tooling
apk add qutebrowser             # browser
apk add keepassxc               # password manager
apk add aerc                    # mail


There is a more complete from the alpine wiki8, which will give more context to the commands.