GitHub/Action Runner Service
< GitHub
root user
/etc/systemd/system/github-runner.service
[Unit] Description=GitHub Actions Runner After=network.target [Service] User=root WorkingDirectory=/opt/actions-runner Environment="RUNNER_ALLOW_RUNASROOT=1" ExecStart=/opt/actions-runner/run.sh Restart=always RestartSec=10 StandardOutput=journal StandardError=journal [Install] WantedBy=multi-user.target
gha user
/etc/systemd/system/github-runner.service
[Unit] Description=GitHub Actions Runner After=network.target [Service] User=gha WorkingDirectory=/home/gha/actions-runner ExecStart=/home/gha/actions-runner/run.sh Restart=always RestartSec=10 StandardOutput=journal StandardError=journal [Install] WantedBy=multi-user.target
install service
systemctl enable github-runner # Created symlink /etc/systemd/system/multi-user.target.wants/github-runner.service → /etc/systemd/system/github-runner.service.
systemctl stop github-runner systemctl start github-runner
systemctl status github-runner
journalctl -u github-runner