setup-alpine
Interactive Alpine Linux system installer
TLDR
SYNOPSIS
setup-alpine [-ahq] [-c file | -f file]
DESCRIPTION
setup-alpine is the canonical first-boot installer shipped on every official Alpine Linux ISO. It runs from the live environment and guides the operator through the steps required to bring up a working Alpine system: keyboard layout, hostname, network interfaces, DNS servers, root password, timezone, HTTP proxy, NTP daemon, package mirrors, SSH server, and disk layout.Internally setup-alpine is a small POSIX shell script that orchestrates a number of dedicated setup-*step helpers (such as setup-keymap, setup-hostname, setup-interfaces, setup-disk, setup-sshd, setup-ntp, setup-apkrepos, setup-lbu and setup-apkcache). Each helper can also be invoked stand-alone after installation to reconfigure that aspect of the system.Three install targets are offered when the disk step runs: sys for a traditional persistent installation, data for a diskless system whose state is backed up via lbu, and none to skip disk setup entirely. The result is a small, repeatable, and scriptable Alpine deployment.
PARAMETERS
-a
Run in diskless ("alpine") mode: configure a running system without installing to disk.-c FILE
Create an answer file at FILE pre-filled with the current default answers, then exit.-f FILE
Read answers from FILE instead of prompting interactively (allows unattended installs).-q
Quick mode: configure only keymap, hostname, DHCP networking, /etc/hosts and the default repositories.-h
Show usage and exit.
ANSWER FILE
Use setup-alpine -c answers.new to dump a template, then edit the variables and replay it with setup-alpine -f answers. Common keys are KEYMAPOPTS, HOSTNAMEOPTS, INTERFACESOPTS, DNSOPTS, TIMEZONEOPTS, PROXYOPTS, APKREPOSOPTS, SSHDOPTS, NTPOPTS, DISKOPTS, LBUOPTS and APKCACHEOPTS. Setting a key to none skips that step.
CAVEATS
Quick mode (-q) configures only DHCP — Wi-Fi must be set up manually with setup-interfaces or wpa_supplicant. Running setup-alpine on an already-installed system will reconfigure it in place, including overwriting /etc/network/interfaces and /etc/hostname. Disk mode sys wipes the selected disks. The script must be run as root and assumes the standard Alpine BusyBox userspace.
HISTORY
setup-alpine has shipped with Alpine Linux since the project introduced its installer-on-rails approach in the late 2000s, replacing the earlier manual install process. It is part of the alpine-conf package, written in POSIX shell, and is also reused by setup-bootable, setup-acf and the LXC/Docker minirootfs build pipeline.
