システム・ネットワーク・セキュリティ・運用管理者向けの実用ツール。

SYS-C0587 · Linux Distro Guides

Alpine Linux Server Administration Guide

Administer Alpine with apk and OpenRC, and do not follow a systemd guide on it.

Updated 25 October 2026 · Pillar guide

This is an original planning guide. It is not a vendor manual, an official standard, or legal advice. Example addresses use documentation ranges. Review every command before you paste it.

Where Alpine Linux sits

Alpine Linux is small, uses musl rather than glibc, and uses OpenRC rather than systemd on a normal install. apk is the package manager. BusyBox supplies many of the everyday commands. A guide that says systemctl, journalctl, or dnf is the wrong guide. The systemd pillar is for other hosts.

Networking is often the networking service and /etc/network/interfaces style configuration. Confirm on the image you have. The lab address 192.0.2.10/24 via 192.0.2.1 is documentation. Services are started with rc-service and enabled with rc-update. Those two are not the same, just as start and enable are not the same on systemd.

Some software expects glibc and will not run. Check that before you promise a binary. A container built on Alpine is a common use. A container is still a host you can name, patch, and back up if it holds state.

The hardening order still applies: a named user, a key, then a tight SSH and a firewall choice. The tools are Alpine's. The order is the hardening guide's.

The first hour on a lab host

Step 1 on Alpine Linux covers identity. Confirm Alpine and the version. Confirm the init is OpenRC. A container image and a virtual machine can differ. Look at this one. The check is: os-release and rc-status agree with the ticket. If that check fails, stop and fix the ticket before the next step. The way back is the previous file or the previous image, which the provisioning guide told you to keep. Do not install a second package to hide a failed step. The browser generators for Alpine Linux draft a starter. They do not log in. Read the draft, delete what this lab does not need, and replace prompt-for-this. A line that worked on a different distribution is not a reason to paste it here.

Step 2 on Alpine Linux covers admin. Named user and a key. Do not live as root. Small images often tempt people to stay root. The check is: The key login works for the named user. If that check fails, stop and fix the ticket before the next step. The way back is the previous file or the previous image, which the provisioning guide told you to keep. Do not install a second package to hide a failed step. The browser generators for Alpine Linux draft a starter. They do not log in. Read the draft, delete what this lab does not need, and replace prompt-for-this. A line that worked on a different distribution is not a reason to paste it here.

Step 3 on Alpine Linux covers network. Set the lab address with the networking service this image uses. A netplan file will sit unused. The check is: The address survives a reboot. If that check fails, stop and fix the ticket before the next step. The way back is the previous file or the previous image, which the provisioning guide told you to keep. Do not install a second package to hide a failed step. The browser generators for Alpine Linux draft a starter. They do not log in. Read the draft, delete what this lab does not need, and replace prompt-for-this. A line that worked on a different distribution is not a reason to paste it here.

Step 4 on Alpine Linux covers a service. rc-service start, then rc-update add if it should survive reboot. Start without enable is gone after reboot. The check is: After a reboot the service is running. If that check fails, stop and fix the ticket before the next step. The way back is the previous file or the previous image, which the provisioning guide told you to keep. Do not install a second package to hide a failed step. The browser generators for Alpine Linux draft a starter. They do not log in. Read the draft, delete what this lab does not need, and replace prompt-for-this. A line that worked on a different distribution is not a reason to paste it here.

Step 5 on Alpine Linux covers packages. apk from the repositories you named. A glibc-only binary is a stop, not a force. The check is: The package list matches the purpose. If that check fails, stop and fix the ticket before the next step. The way back is the previous file or the previous image, which the provisioning guide told you to keep. Do not install a second package to hide a failed step. The browser generators for Alpine Linux draft a starter. They do not log in. Read the draft, delete what this lab does not need, and replace prompt-for-this. A line that worked on a different distribution is not a reason to paste it here.

# Alpine Linux lab. Review before you paste.
# apk and OpenRC. No systemctl.
# rc-service starts. rc-update enables.
# Lab address 192.0.2.10/24 via 192.0.2.1.
# prompt-for-this is not a password to keep.

The commands you will actually repeat

apk update and apk upgrade, with the repositories you trust, in the patch ring. Record the Alpine version. Releases are small and frequent compared with a long-lived enterprise OS.

rc-status shows what is running. If a service is not in the default runlevel, a reboot will not start it. Enable it on purpose.

Logs may be files rather than a journal. The logging guide's principle holds: a size cap, a clock, no secrets. The mechanism is the one Alpine is using.

Do not install a second init. You chose OpenRC by choosing Alpine.

What Alpine Linux is not

Alpine is not a systemd distribution. systemctl will not be there.

It is not glibc. A vendor binary that needs glibc needs a different base.

It is not Ubuntu or RHEL with a smaller ISO. The userland is different on purpose.

The hour you stop

Write the hostname, the role, and the clock time before you change Alpine Linux. If this host is also serving users, it is not the lab and this first hour belongs on a spare. The provisioning guide is how the spare gets built. A change without a spare is a change you can still postpone.

Keep the console or the out-of-band path open for the whole hour. Reloading a network service, a firewall, or a secure-shell daemon from the only session is how a lab becomes a drive across town. The hardware guide names that path for a physical machine. A virtual machine uses the hypervisor console. A cloud instance uses the serial console the platform gives you. Test it before the reload, not after.

The address 192.0.2.10/24 and the gateway 192.0.2.1 are documentation. They belong in the lab note and nowhere else. On a real network, use the prefix the network desk already assigned. On a cloud instance, use the address the platform assigned and do not hard-code the documentation range into user-data. If a generator filled the documentation address into a production draft, delete it.

prompt-for-this is a reminder that a secret is missing. It is not a password you set, not a token you commit, and not a string you leave in a configuration file because the service started. The real secret lives in the password store. The ticket says who can read it. A file that still contains the reminder is a file you have not finished.

One service is enough for the first hour on Alpine Linux. The purpose from the fundamentals page says which service. Every other package stays uninstalled until its own guide has a ticket. A host that enables a web server, a database, and a queue in the first hour has three changes and no proof. Finish the login, the address, and the update. Then stop.

Read the package transaction before you accept it. A count of packages is not a review. If the list contains a repository you did not add, stop. If it contains a kernel, the patch guide's reboot decision applies and the console stays open. If it contains software this role does not need, remove that line from the plan rather than installing it and disabling it later.

The previous image, the previous configuration file, or the previous package version is the rollback. Write the path down while the host still works. A rollback you invent after a failed reload is a guess. The migration guide assumes the old copy is still there. Do not delete it in the same hour to free a disk.

When the checks pass, copy the notes into the ticket and leave the host alone. The next host waits until a second person can repeat the login and the address from the notes. A fleet built from memory drifts. A fleet built from the file the provisioning guide stored stays boring, which is the point of Alpine Linux in production.

If a step on Alpine Linux fails twice, stop for the day. The failure is the result. Adding a forum command beside a half-applied config produces a host nobody can rebuild. Rebuild from the image instead. The time you lose is smaller than the time you will spend explaining the hybrid.

Hand the finished lab to the guide that matches the role: web, mail, storage, backup, or hardening. Alpine Linux being installed is not the same as the role being ready. The role guide has its own proof. Do not skip it because the package manager exited without an error.

A second person reads the hostname, the address, and the rollback path aloud before you build the next host. If they cannot find those three in the ticket, the notes are not done. Silence is not agreement. The check is the sentence they repeat back.

Store the working notes next to the image version. A month from now Alpine Linux will still boot from that pair, and the chat where you remembered a flag will be gone. The file is the memory. The host is replaceable. That is the whole point of writing this hour down.

Alpine Linux checks before a second host

Check 1 in Alpine Linux checks before a second host. Alpine Linux is the OS the hostname reports, not a neighbour you copied from. Record the device name, the result, and the time on the same line. If the result does not match this check, stop and fix the ticket before you add another change. The rollback for this check is the previous value you wrote down, not a reboot. A reboot hides whether the check was the one that mattered. When the check passes, move to the next one. When it fails, the incident is this check.

Check 2 in Alpine Linux checks before a second host. The lab address 192.0.2.10/24 is gone before this host is placed on a real network. Record the device name, the result, and the time on the same line. If the result does not match this check, stop and fix the ticket before you add another change. The rollback for this check is the previous value you wrote down, not a reboot. A reboot hides whether the check was the one that mattered. When the check passes, move to the next one. When it fails, the incident is this check.

Check 3 in Alpine Linux checks before a second host. prompt-for-this is not the password that was set, and no password is in the ticket. Record the device name, the result, and the time on the same line. If the result does not match this check, stop and fix the ticket before you add another change. The rollback for this check is the previous value you wrote down, not a reboot. A reboot hides whether the check was the one that mattered. When the check passes, move to the next one. When it fails, the incident is this check.

Check 4 in Alpine Linux checks before a second host. The named admin can log in with a key. Record the device name, the result, and the time on the same line. If the result does not match this check, stop and fix the ticket before you add another change. The rollback for this check is the previous value you wrote down, not a reboot. A reboot hides whether the check was the one that mattered. When the check passes, move to the next one. When it fails, the incident is this check.

Check 5 in Alpine Linux checks before a second host. The package manager used is the one this page names. Record the device name, the result, and the time on the same line. If the result does not match this check, stop and fix the ticket before you add another change. The rollback for this check is the previous value you wrote down, not a reboot. A reboot hides whether the check was the one that mattered. When the check passes, move to the next one. When it fails, the incident is this check.

Check 6 in Alpine Linux checks before a second host. A network file from a different distribution was not pasted in. Record the device name, the result, and the time on the same line. If the result does not match this check, stop and fix the ticket before you add another change. The rollback for this check is the previous value you wrote down, not a reboot. A reboot hides whether the check was the one that mattered. When the check passes, move to the next one. When it fails, the incident is this check.

Check 7 in Alpine Linux checks before a second host. The config test or the apply command for this network tool succeeded. Record the device name, the result, and the time on the same line. If the result does not match this check, stop and fix the ticket before you add another change. The rollback for this check is the previous value you wrote down, not a reboot. A reboot hides whether the check was the one that mattered. When the check passes, move to the next one. When it fails, the incident is this check.

Check 8 in Alpine Linux checks before a second host. The previous image or install file is kept. Record the device name, the result, and the time on the same line. If the result does not match this check, stop and fix the ticket before you add another change. The rollback for this check is the previous value you wrote down, not a reboot. A reboot hides whether the check was the one that mattered. When the check passes, move to the next one. When it fails, the incident is this check.

Check 9 in Alpine Linux checks before a second host. No new third-party repository was added in the first hour. Record the device name, the result, and the time on the same line. If the result does not match this check, stop and fix the ticket before you add another change. The rollback for this check is the previous value you wrote down, not a reboot. A reboot hides whether the check was the one that mattered. When the check passes, move to the next one. When it fails, the incident is this check.

Check 10 in Alpine Linux checks before a second host. A service you do not need was not enabled to see what it does. Record the device name, the result, and the time on the same line. If the result does not match this check, stop and fix the ticket before you add another change. The rollback for this check is the previous value you wrote down, not a reboot. A reboot hides whether the check was the one that mattered. When the check passes, move to the next one. When it fails, the incident is this check.

Check 11 in Alpine Linux checks before a second host. Console or out-of-band access works before you reload SSH. Record the device name, the result, and the time on the same line. If the result does not match this check, stop and fix the ticket before you add another change. The rollback for this check is the previous value you wrote down, not a reboot. A reboot hides whether the check was the one that mattered. When the check passes, move to the next one. When it fails, the incident is this check.

Check 12 in Alpine Linux checks before a second host. A second person read the hostname and the address. Record the device name, the result, and the time on the same line. If the result does not match this check, stop and fix the ticket before you add another change. The rollback for this check is the previous value you wrote down, not a reboot. A reboot hides whether the check was the one that mattered. When the check passes, move to the next one. When it fails, the incident is this check.

Check 13 in Alpine Linux checks before a second host. No systemd unit was copied onto this host. Record the device name, the result, and the time on the same line. If the result does not match this check, stop and fix the ticket before you add another change. The rollback for this check is the previous value you wrote down, not a reboot. A reboot hides whether the check was the one that mattered. When the check passes, move to the next one. When it fails, the incident is this check.

Check 14 in Alpine Linux checks before a second host. rc-update shows the service in the default runlevel. Record the device name, the result, and the time on the same line. If the result does not match this check, stop and fix the ticket before you add another change. The rollback for this check is the previous value you wrote down, not a reboot. A reboot hides whether the check was the one that mattered. When the check passes, move to the next one. When it fails, the incident is this check.

Check 15 in Alpine Linux checks before a second host. A glibc dependency was checked before any vendor binary was promised. Record the device name, the result, and the time on the same line. If the result does not match this check, stop and fix the ticket before you add another change. The rollback for this check is the previous value you wrote down, not a reboot. A reboot hides whether the check was the one that mattered. When the check passes, move to the next one. When it fails, the incident is this check.

Check 16 in Alpine Linux checks before a second host. apk repositories are the ones in the ticket. Record the device name, the result, and the time on the same line. If the result does not match this check, stop and fix the ticket before you add another change. The rollback for this check is the previous value you wrote down, not a reboot. A reboot hides whether the check was the one that mattered. When the check passes, move to the next one. When it fails, the incident is this check.

Tools for this guide

These tools run in the browser on this site. They do not log into your machines.

Guides in this cluster

These supporting pages belong to this pillar. A published page is linked. The others are named until they are published.