1# Forgejo Runner with systemd User Services23It is possible to use systemd's user services together with4[podman](https://podman.io/) to run `forgejo-runner` using a normal user5account without any privileges and automatically start on boot.67This was last tested on Fedora 39 on 2024-02-19, but should work elsewhere as8well.910Place the `forgejo-runner` binary in `/usr/local/bin/forgejo-runner` and make11sure it can be executed (`chmod +x /usr/local/bin/forgejo-runner`).1213Install and enable `podman` as a user service:1415```bash16$ sudo dnf -y install podman17```1819You *may* need to reboot your system after installing `podman` as it20modifies some system configuration(s) that may need to be activated. Without21rebooting the system my runner errored out when trying to set firewall rules, a22reboot fixed it.2324Enable `podman` as a user service:2526```27$ systemctl --user start podman.socket28$ systemctl --user enable podman.socket29```3031Make sure processes remain after your user account logs out:3233```bash34$ loginctl enable-linger35```3637Create the file `/etc/systemd/user/forgejo-runner.service` with the following38content:3940```41[Unit]42Description=Forgejo Runner4344[Service]45Type=simple46ExecStart=/usr/local/bin/forgejo-runner daemon47Restart=on-failure4849[Install]50WantedBy=default.target51```5253Now activate it as a user service:5455```bash56$ systemctl --user daemon-reload57$ systemctl --user start forgejo-runner58$ systemctl --user enable forgejo-runner59```6061To see/follow the log of `forgejo-runner`:6263```bash64$ journalctl -f -t forgejo-runner65```6667If you reboot your system, all should come back automatically.