OpenRC
By Gentoo Foundation
OpenRC is a dependency-based init system and service manager for Unix-like operating systems, most notably used as the default on Gentoo Linux and Alpine Linux. It manages the startup, shutdown, and supervision of system services by…
Definition
OpenRC is a dependency-based init system and service manager for Unix-like operating systems, most notably used as the default on Gentoo Linux and Alpine Linux. It manages the startup, shutdown, and supervision of system services by resolving dependencies between them, while remaining compatible with traditional shell-script-based init scripts rather than replacing them with a new configuration format. OpenRC is often chosen as a lighter-weight, less opinionated alternative to systemd.
Overview
OpenRC exists to solve a specific limitation of traditional SysV-style init systems: those systems start services in a fixed numeric order defined by symlink naming conventions, with no real understanding of which services actually depend on which others, making startup ordering brittle and hard to reason about as a system grows more complex. OpenRC keeps the general shape of SysV init, plain shell scripts that start and stop services, but adds an explicit dependency-resolution layer on top, so administrators can declare that one service needs another to be running first and let OpenRC compute a correct startup order automatically. Mechanically, each service in OpenRC is defined by an init script that declares metadata, including which other services it depends on, needs, or should start before or after, using a small shell API (`depend()`, `need`, `use`, `before`, `after`). At boot, OpenRC's dependency tree logic walks these declarations to build an ordered startup sequence, then executes the scripts, optionally in parallel where dependencies allow it. Services are organized into named runlevels (a concept inherited from SysV init) that group which services should be active in a given system state, such as single-user mode versus full multi-user mode. OpenRC's most direct point of comparison is systemd, which has become the default init system on most major Linux distributions; systemd replaces shell-script init entirely with declarative unit files, adds a much larger scope of responsibilities (logging via journald, device management via udev integration, socket activation, cgroups-based resource control), and manages services as a tightly integrated suite rather than a minimal layer over shell scripts. OpenRC deliberately stays smaller in scope, aiming to be a service manager rather than a full system-management platform, which is part of its appeal to distributions like Gentoo and Alpine that prioritize simplicity, transparency, and minimal dependencies. In practice, OpenRC is the default init system on Gentoo Linux (though Gentoo also supports systemd as an alternative) and on Alpine Linux, where its small footprint and lack of a large dependency chain suit Alpine's design goal of being a minimal, container-friendly distribution. It's a common choice for embedded systems, containers, and users who prefer inspectable shell-script service definitions over systemd's unit-file and binary-log ecosystem. The trade-off is reduced scope: OpenRC does not provide systemd's more advanced features like socket-based service activation, fine-grained per-service resource isolation via cgroups, or a unified structured logging system, so administrators who need those capabilities, or who want the now much larger ecosystem of systemd-specific tooling and documentation, generally find systemd more suited to their needs despite its larger footprint and greater complexity.
Key Features
- Dependency-based service ordering built on top of shell-script init
- Compatible with traditional SysV-style init scripts
- Named runlevels grouping services for different system states
- Small footprint with minimal dependency chain
- Default init system on Gentoo Linux and Alpine Linux
- Simple shell API for declaring service dependencies
- Optional parallel service startup where dependencies allow