GitHub/Action Runner Service: Difference between revisions

From Omnia
Jump to navigation Jump to search
(Created page with "== root user == /etc/systemd/system/github-runner.service <pre> [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 </pre> == gha user == /etc/systemd/system/github-runner.service <pre> [Unit] Description=GitHub...")
 
Line 45: Line 45:


== install service ==
== install service ==
systemctl daemon-reload


  systemctl enable github-runner
  systemctl enable github-runner

Revision as of 23:48, 29 June 2026

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 daemon-reload
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

keywords