How to Install Alpine Linux (2026 Guide)

Alpine Linux installation: diskless, data and sys modes

✅ Verified against the official Alpine Linux Wiki — Last updated: September 2026

Alpine is the distro most people meet without ever "installing" it — it's the default base image behind a huge share of Docker containers. But Alpine is also a real, independent Linux distribution you can run as your daily OS or server, built around musl libc, BusyBox, and its own apk package manager instead of anything derived from Debian, Arch, or Fedora. Installing it is where most guides get vague, because Alpine genuinely works differently from a traditional distro install — there are three distinct modes, and picking the wrong one for your use case is the single most common point of confusion. For managing packages after install, see the companion APK guide.

Contents
  1. The Three Installation Modes
  2. Hardware Requirements
  3. Step 1 — Download and Verify the Installation Image
  4. Step 2 — Create the Installation Media
  5. Step 3 — Boot and Run setup-alpine
  6. Step 4 — Choose Your Disk Mode
  7. Step 5 — Persisting Changes in Diskless Mode
  8. Advanced Setup: An Encrypted Btrfs Workstation
  9. Troubleshooting
    1. My WiFi stopped working partway through setup-alpine
    2. I rebooted my diskless install and everything is gone
    3. Can I encrypt the disk during the guided setup-alpine install?
    4. Do I need an internet connection to install Alpine?
    5. Which installation mode should I actually pick — diskless, data, or sys?
    6. Further Reading

The Three Installation Modes

Understanding this before you start saves you from reinstalling later — Alpine's own wiki calls this "requires basic understanding" for a reason:

ModeHow it runsPersistence
DisklessEntire OS loads into RAM, runs from thereNone by default — changes lost on reboot unless saved with lbu commit
Data diskAlso runs from RAM (same speed as diskless)Swap and /var mounted from persistent storage — for RAM-speed servers with growing data
SysTraditional install to diskFull persistence, like any conventional Linux install

Diskless mode is what the live ISO itself runs on — it's not a special "demo mode," it's a first-class way to run Alpine permanently on real hardware (routers, appliances, anything that benefits from near-zero disk wear). If you just want a normal persistent system, you want sys mode — that's what the rest of this guide focuses on, with diskless persistence covered separately below.

Hardware Requirements

Alpine's wiki gives real, specific numbers — rare among distros:

  • RAM: at least 128MB; a graphical desktop needs up to 512MB minimum. The installer itself needs ~320MB during installation.
  • Storage: 0–700MB, only required for sys or data disk mode (optional in diskless mode, where it's just for saving state).
  • Network: required to complete a sys-mode install, since packages are fetched during setup.

Step 1 — Download and Verify the Installation Image

Get the image matching your architecture from alpinelinux.org/downloads, along with its .sha256 and .asc files — download the checksum and signature only from the official site, never a mirror.

# verify the checksum
sha256sum -c alpine-*.iso.sha256

# verify the GPG signature
curl https://alpinelinux.org/keys/ncopa.asc | gpg --import
gpg --verify alpine-*.iso.asc alpine-*.iso

Step 2 — Create the Installation Media

lsblk   # identify your USB device first
dd if=alpine-standard-3.24.1-x86_64.iso of=/dev/sdX bs=4M status=progress; eject /dev/sdX

Disable Secure Boot in your BIOS before booting the media — Alpine's installer won't boot with it enabled (you can re-enable it after installing).

Step 3 — Boot and Run setup-alpine

Boot from the media, log in as root (no password on the install media), and run:

setup-alpine

The interactive script walks through, in this exact order: keyboard layout, hostname, network interface (DHCP by default), DNS servers, root password, timezone, HTTP/FTP proxy, package mirror, a regular user account, NTP client, SSH server, and finally disk selection and mode. Each step has a sensible default in brackets — pressing Enter accepts it.

If you're on a wired connection and comfortable with the defaults, setup-alpine -q ("Quick Mode") speeds through the base configuration.

Step 4 — Choose Your Disk Mode

When setup-alpine asks about disks, this is where the three modes from earlier become concrete choices:

  • For sys mode (a normal persistent install): answer with your disk device (e.g. sda), then choose sys when prompted for the mode.
  • For diskless mode (stays in RAM): answer none to "Which disk(s) would you like to use?", none for where to store configs, and none for the package cache location. This completes only the base configuration — the system runs from RAM from here on.

For custom partitioning — LUKS encryption, LVM, RAID, dual-boot, or a filesystem other than the default — skip the guided disk step and use cfdisk plus setup-disk manually instead; the advanced setup below shows a real example of this.

Step 5 — Persisting Changes in Diskless Mode

If you chose diskless, nothing you install or configure survives a reboot until you save it — this is the single most common "why did Alpine forget everything" moment for newcomers.

lbu commit   # or: lbu ci

By default this saves everything under /etc (except /etc/init.d), plus the home directory of any user created during setup. Use lbu include <path> to add more paths to what gets saved, and lbu status to check what's changed since the last commit before you save.

Advanced Setup: An Encrypted Btrfs Workstation

The guided installer doesn't support LUKS encryption or btrfs subvolumes — for that, partition manually before running setup-disk. This is one detailed, verified real-world example (not an official Alpine recipe) of a desktop workstation with encrypted swap and root, and a snapshot-capable btrfs layout:

apk add btrfs-progs cryptsetup
modprobe btrfs

# after partitioning with cfdisk: ESP + swap + main partition
mkfs.vfat /dev/nvme0n1p1
cryptsetup luksFormat --label luks-swap /dev/nvme0n1p2
cryptsetup luksFormat --label luks-main /dev/nvme0n1p3
cryptsetup open /dev/nvme0n1p2 swap
cryptsetup open /dev/nvme0n1p3 main
mkfs.btrfs --label main /dev/mapper/main
mkswap /dev/mapper/swap

mount /dev/mapper/main /mnt/
btrfs subvolume create /mnt/root
btrfs subvolume create /mnt/home
umount /mnt

mount /dev/mapper/main -o subvol=root /mnt/
mkdir /mnt/home /mnt/efi
mount /dev/nvme0n1p1 /mnt/efi
mount /dev/mapper/main -o subvol=home /mnt/home

setup-disk /mnt

Two real gotchas worth knowing before you plan this: the installer's default swap partition is usually too small for hibernation (suspend-to-disk needs swap at least as large as your RAM), and setup-alpine's guided flow doesn't support encrypting that swap partition at all — both have to be handled manually, exactly as shown above.

Troubleshooting

My WiFi stopped working partway through setup-alpine

A mistyped WiFi password during the network step can leave the connection in a broken state without a clear error — it won't necessarily fail outright, it'll just silently not work. Re-run the network configuration step carefully, double-checking the password before submitting.

I rebooted my diskless install and everything is gone

Expected behavior, not a bug — diskless mode runs entirely from RAM and discards changes on reboot unless you ran lbu commit first. Anything you installed or configured needs to be committed to persist.

Can I encrypt the disk during the guided setup-alpine install?

Not through the guided prompts — setup-alpine's disk step has no LUKS option. Partition manually with cfdisk and cryptsetup first, then run setup-disk to install into the already-encrypted partitions, as shown in the advanced setup above.

Do I need an internet connection to install Alpine?

Yes, for sys-mode installs — packages are fetched from a mirror during setup. Diskless mode can technically complete base configuration offline, but you'll still need network access to install any packages afterward.

Which installation mode should I actually pick — diskless, data, or sys?

Sys mode for a normal desktop, laptop, or server that should behave like any conventional Linux install with full persistence. Diskless mode for routers, appliances, or anything that benefits from running entirely in RAM with minimal disk wear (remember to lbu commit to save changes). Data disk mode is the narrow middle case: RAM-speed operation with a server's /var data persisted separately — mainly useful when your dataset grows larger than you'd want to keep purely in RAM.


Go up

This site uses cookies for analytics and advertising (Google AdSense). By continuing to browse, you accept our use of cookies. Learn more