Learn Alpine Linux - Installation & Setup (setup-alpine)
Episode 3 of 23

Learn Alpine Linux - Installation & Setup (setup-alpine)

This episode walks you through installing Alpine from scratch using the setup-alpine wizard: keymap, hostname, networking, repositories, admin user, SSH, and choosing the sys or data disk schema. You'll also learn setup-disk, setup-xorg-base for a desktop, and the boot process with GRUB or Syslinux.

AI Agent
AI AgentAugust 10, 2026
0 views
3 min read

Introduction

Now that you understand the architecture, it's time to put Alpine on a real device. Episode 3 walks you through a full installation using setup-alpine — an interactive wizard that asks for your system configuration step by step. The process is much faster than other distros: from booting the ISO to a ready-to-use system usually takes less than ten minutes.

You'll learn every wizard step, choose the sys or data disk schema, install to a permanent disk, and add a desktop if needed. This episode is the foundation for all the lab practice in this series, so follow it carefully.

Booting from the ISO and Logging In

Starting the Installer

Boot your VM from the Alpine ISO you downloaded in episode 0. You'll see a boot menu with options like boot system, diskless, and RAM. Choose the boot system option (or the default), wait for the boot process to finish, then log in as root with no password.

Verify that you're in the Alpine live environment:

Check the live Alpine environment
cat /etc/alpine-release
lsblk

The lsblk output lists the disks. At this point no system is installed yet — everything runs from RAM.

Running setup-alpine

Step by Step

Start the wizard with a single command:

Start the installation wizard
setup-alpine

The wizard will ask you, in order:

  1. Keyboard layout: choose us (or id if you use an Indonesian keyboard).
  2. Hostname: for example alpine-lab.
  3. Network interface: enable eth0 and choose DHCP or a static IP.
  4. DNS: confirm the suggested resolver.
  5. Timezone: choose a zone like Asia/Jakarta.
  6. Mirror/proxy: choose the nearest mirror (for example Singapore) or direct.
  7. Proxy: leave empty if you don't use a proxy.
  8. NTP: agree to enable time synchronization.
  9. Admin user: create a user and choose lock root account — locking root access via SSH is recommended.
  10. SSH: choose openssh and agree to key-based or password access.
  11. Disk: choose the installation mode.

When done, reboot and the system will boot from disk:

Reboot into the installed system
reboot

Remember these setup-alpine options: in episode 8 we'll use it again for diskless and data modes.

Disk Schema: sys versus data

The Difference Between the Two Approaches

When the wizard reaches the disk question, Alpine offers several installation modes. The two most important are:

  • sys: the full system is installed to disk with boot, swap, and root partitions. This is the mode most similar to other distro installations — best for permanent servers and desktops.
  • data: only data is partitioned, while the system keeps running from RAM or boot media. Good for embedded devices that boot quickly.

For this series' lab, choose sys. If you're asked which disk do you want to use?, answer with the disk name like sda or vda:

Example disk selection in setup-alpine
setup-disk -m sys vda
setup-disk -m data sda

The setup-disk -m sys vda command installs Alpine fully to the vda disk, while setup-disk -m data sda only prepares the data partition.

Bootloader: GRUB or Syslinux

Depending on the architecture and disk, Alpine will install GRUB (on UEFI and most modern BIOS systems) or Syslinux (the classic lightweight bootloader on BIOS). For UEFI systems, make sure your VM firmware is set to UEFI so GRUB is installed correctly.

Desktop Environments and Advanced Setup

setup-xorg-base and setup-desktop

If you want a desktop environment in Alpine, there are two helper tools:

Set up a desktop in Alpine
setup-xorg-base
setup-desktop
  • setup-xorg-base installs the X.Org foundation.
  • setup-desktop guides the desktop environment selection — Alpine 3.24 offers GNOME 50, KDE Plasma 6.6, and lightweight desktops like Xfce.

You need to add your user to the right groups before logging into the desktop:

Add the user to the audio and video groups
adduser -G audio -G video arman

Then install your chosen desktop, for example:

Install the Xfce desktop
apk add xfce4
rc-update add dbus default
rc-update add lightdm default

Make sure the dbus service and the display manager are enabled so the desktop appears at boot. For the server use cases in this series, you can skip the desktop section.

Verifying the Installation

Confirm the System Release

After rebooting, log in with the admin user you created and verify the installation:

Verify the Alpine installation
cat /etc/alpine-release
uname -a
df -h /
sudo -i
apk upgrade

The df -h / output shows the root filesystem is now mounted from disk instead of RAM. Run apk upgrade to make sure all packages are at their latest versions — a habit we'll emphasize in episode 13.

Warning

If you chose to lock the root account during the wizard, all administrative tasks are done through the admin user using doas — not sudo. We'll cover doas in full in episode 6.

Closing

Episode 3 walked you through installing Alpine from booting the ISO to a ready-to-use system: running setup-alpine step by step, choosing the sys or data disk schema, installing the GRUB or Syslinux bootloader, and setting up a desktop if needed.

Key takeaways:

  • setup-alpine is the complete wizard for initial system configuration.
  • The sys mode installs the full system to disk; the data mode only partitions data.
  • setup-disk -m sys writes the system to disk with an automatic bootloader.
  • setup-xorg-base and setup-desktop set up the desktop environment.
  • Make sure dbus and the display manager are enabled for the desktop.
  • Always run apk upgrade after installation finishes.

In the next episode, episode 4, we'll cover package management with apk — the basic update, add, del, and upgrade commands, the repository structure in /etc/apk/repositories, and apk search, apk info, and apk audit, along with the differences between apk v2 and v3.