Baike.dev
All toolsAI codingTrendingOpen sourceNewsSubmit
Log in
Back to tool/Back to issues
#6166·act

Add --systemd flag to boot job containers with systemd as PID 1

Author: wg-vnCreated Aug 26, 2026Updated Aug 26, 2026

User story

As a user running workflows locally with act that install and manage system services via systemd (e.g. systemctl start mysql, mirroring what's preinstalled on GitHub-hosted runner images), I want an option to boot job containers with systemd as PID 1, so that steps relying on systemctl/D-Bus don't fail with "System has not been booted with systemd as init system."

This has come up repeatedly: #547, #548, #952, #1410 all report the same failure and were closed stale with no fix. In #952 @catthehacker noted --privileged alone would likely fail "without mounting special paths and/or running own systemd inside container" — this proposal does exactly that.

Acceptance criteria

  • A new --systemd CLI flag (and Systemd field on runner.Config) exists.
  • When passed, job containers start with /sbin/init as PID 1 instead of tail -f /dev/null.
  • --systemd implies privileged mode automatically — the user doesn't also need to pass --privileged.
  • The job container is given a host cgroup namespace/mount and /run is pre-mounted as tmpfs, so systemd's own boot-time remount doesn't shadow act's /var/run/act volume.
  • act waits for systemd to finish booting (tolerating the brief window before its D-Bus socket exists) before copying step files into the container.
  • Behavior is unchanged when --systemd is not passed.

I have a working implementation and will follow up with a PR.

Source: nektos/act

View original on GitHubView discussion on GitHub