SETUP-ALPINE(8)

πŸ“¦ version 3.22.0, in alpine 3.24

πŸ’… SETUP-ALPINE β€” okay bestie, let's install a whole OS

Hey so this is the manual page for setup-alpine, a System Manager's Manual situation, and no cap it's kind of the main character of Alpine Linux installs. Buckle up πŸŽ€


✨ NAME ✨

setup-alpine β€” the Alpine Linux installation and configuration script. That's it, that's the whole vibe. She does everything.


🌸 SYNOPSIS 🌸

setup-alpine [-ahq] [-c FILE | -f FILE]

πŸ¦‹ DESCRIPTION πŸ¦‹

Okay so setup-alpine is the main system setup script for Alpine Linux. It walks you through the whole thing interactively, one step at a time: keyboard layout, hostname, networking, timezone, package repository selection, user creation, SSH daemon configuration, and disk installation. Like a little guided tour but for your entire operating system 🧚

The script sources a bunch of helper scripts from the same package, and each one is responsible for its own specific subsystem. Teamwork, honestly.

And here's the cute safety detail: if you run it over SSH (detected via SSH_CONNECTION), networking is not restarted while it's configuring the hostname and interfaces β€” so your remote connection doesn't get absolutely destroyed mid-install. Iconic behaviour tbh 🫢


πŸŽ€ OPTIONS πŸŽ€

  • -a β€” creates an Alpine Linux overlay archive without doing a disk installation. Files get written to a temporary directory instead of the live root. Non-destructive queen ✨
  • -c FILE β€” creates an answer file template at FILE and then exits without making any changes. The generated file contains common variables with descriptive comments, so you can fill it in and vibe later.
  • -e β€” sets an empty root password and skips password prompting. Lowkey sketchy but okay. Also implied by -q.
  • -f FILE β€” uses the answer file FILE for a non-interactive installation. And plot twist: FILE can also be an HTTP, HTTPS, or FTP URL β€” the script downloads it and sets up temporary networking if needed. She's resourceful πŸ’…
  • -h β€” displays usage information and exits. The classic "wait what are the flags again" move.
  • -q β€” quick mode. Sets the hostname to alpine, configures the first CDN mirror (see setup-apkrepos(8)), and skips timezone, proxy, NTP, user, SSH daemon, disk installation, and overlay backup configuration. Basically speedrunning it. Implies -e πŸ”₯

πŸ’– ANSWER FILE πŸ’–

When you use -c, setup-alpine writes a template answer file. A populated answer file passed with -f gets sourced as a shell script β€” so yes, it's literally executing that file, keep that in mind πŸ™ˆ

These are the variables it recognizes:

  • KEYMAPOPTS β€” arguments for setup-keymap(8). The value "none" skips keymap configuration.
  • HOSTNAMEOPTS β€” the hostname argument for setup-hostname(8).
  • DEVDOPTS β€” device manager to configure via setup-devd(8).
  • INTERFACESOPTS β€” contents of /etc/network/interfaces. If it's set to "none", networking is left unconfigured.
  • WIFIOPTS β€” path to a wpa_supplicant.conf(5) file, passed to setup-interfaces(8).
  • DNSOPTS β€” arguments for setup-dns(8).
  • TIMEZONEOPTS β€” timezone argument for setup-timezone(8). The value "none" skips timezone configuration.
  • PROXYOPTS β€” proxy URL for setup-proxy(8). The value "none" skips proxy configuration.
  • APKREPOSOPTS β€” arguments for setup-apkrepos(8) (e.g. -1 for the CDN mirror). That's the one iykyk.
  • USEROPTS β€” arguments for setup-user(8). If it's unset, a default interactive user setup is performed.
  • USERSSHKEY β€” SSH public key or URL for the user, passed with -k to setup-user(8).
  • SSHDOPTS β€” SSH daemon argument for setup-sshd(8).
  • ROOTSSHKEY β€” SSH public key or URL for root, passed with -k to setup-sshd(8).
  • NTPOPTS β€” NTP client argument for setup-ntp(8). The value "none" skips NTP configuration.
  • DISKOPTS β€” disk installation arguments for setup-disk(8). The value "none" skips disk installation. (Very "no thoughts head empty, no disk" of you.)
  • LBUOPTS β€” local backup medium argument for setup-lbu(8). The value "none" skips lbu configuration.
  • APKCACHEOPTS β€” APK cache directory argument for setup-apkcache(8). The value "none" skips cache configuration.
  • XENDOM0OPTS β€” arguments for setup-xen-dom0(8) (only applicable in Xen Dom0 environments, so niche but valid πŸ‘‘).

⭐ EXIT STATUS ⭐

  • 0 β€” success. We love to see it πŸŽ‰
  • non-zero β€” an error occurred. Sad girl hours 😭

🌈 FILES 🌈

  • /etc/network/interfaces β€” network interface configuration written by setup-interfaces(8).

πŸ“ SEE ALSO πŸ“

lbu(8), setup-apkcache(8), setup-apkrepos(8), setup-devd(8), setup-disk(8), setup-dns(8), setup-hostname(8), setup-interfaces(8), setup-keymap(8), setup-lbu(8), setup-ntp(8), setup-proxy(8), setup-sshd(8), setup-timezone(8), setup-user(8), setup-xen-dom0(8)

The whole friend group fr fr 🫢


πŸ’œ AUTHORS πŸ’œ

Natanael Copa <ncopa@alpinelinux.org> and others. Legends, honestly.


Alpine Linux, dated 2026-06-09 β€” that's the version and the day this page was born, bestie. Go install something cute. periodt. πŸ’…βœ¨

πŸ“¦ where this page comes from