Artix Linux: switching from OpenRC to runit for a minimal server
Move a service from OpenRC to runit on Artix Linux, with concrete commands, verification steps, and trade‑offs to consider before changing init.
11 Sept 2025, 16:20 UTC

Why runit can be a good fit
runit is a minimal service supervisor. Its design emphasizes speed and low resource usage, making it attractive for containers, embedded devices, or servers where every megabyte counts. The supervisor runs a directory of service scripts under /etc/runit/service and monitors them, restarting on failure if configured.
| Aspect | OpenRC | runit |
|---|---|---|
| Service script location | /etc/init.d | /etc/sv |
| Enable service | rc-update add <service> default | ln -s /etc/sv/<service> /etc/runit/service |
| Start or check status | rc-service <service> start | sv status /etc/runit/service/<service> / sv up /etc/runit/service/<service> |
| Typical strength | Broad compatibility with SysV/LSB scripts | Minimal overhead, fast startup |
| Best fit | General desktops and servers wanting traditional scripts | Minimal systems, containers, resource‑constrained hardware |
Worked example: enable sshd under runit
Assume the runit service definition for sshd is already packaged under /etc/sv/sshd. If it is missing, you would need to create a service directory, but the example here assumes its presence.
sudo ln -s /etc/sv/sshd /etc/runit/service
sv status /etc/runit/service/sshd Expected result: sv status prints something like run: sshd: (pid 12345) 12345 seconds run, 0s stopped, indicating the service is supervised and running. If the directory /etc/sv/sshd does not exist, the symlink will not cause any supervision and sv status will report that the service is down.
Enable a service under OpenRC (for comparison)
sudo rc-service sshd start
sudo rc-update add sshd default Expected result: rc-service starts the daemon and rc-update adds it to the default runlevel so it starts on the next boot.
Trade‑offs and limitations
- Desktop environments. Some graphical desktop environments assume systemd for login and session management. On Artix with OpenRC or runit, you may need extra configuration for the display manager or session tracking.
- Mixing init systems. Using systemd unit files alongside a non‑systemd init can cause conflicting dependency resolution and unexpected service failures.
- Boot‑order changes. Service ordering or hardware hooks that depend on init‑specific behavior may lead to boot failures after a kernel upgrade if not adjusted.
- Reverting the change. Switching init flavors modifies
/sbin/init. To roll back, restore the original symlink (e.g., toopenrc-init) and remove any runit service symlinks under/etc/runit/service.
Verification and rollback
After any change, reboot the machine and run the following checks:
ps -p 1 -o comm=
ls -l /sbin/init The first command prints the name of PID 1; it should match the init you intend to use. The second shows the current /sbin/init binary or symlink. If the output does not match your intention, restore the original symlink and remove the runit service symlinks before rebooting again.
Additionally, confirm that critical services such as networking and SSH are operational:
ping -c 3 8.8.8.8
sv status /etc/runit/service/sshd # or rc-service sshd status for OpenRC If a service is not running, inspect its service directory (/etc/init.d or /etc/runit/service) for missing dependencies or configuration errors.
Switching init systems is not a decision to take lightly, but it is also not irreversible if you keep backups of the original /sbin/init symlink and service definitions. Test the new setup on a non‑critical machine or a virtual machine first, and only apply it to production after verification.
0 replies
A thoughtful contribution can make all the difference. Be the first to share one.