systemd units
gtcnsl installs and wires two systemd units. Day-to-day you can drive them with plain systemctl — here is what each one is and which gtcnsl command owns it.
Updated for v1.3.0
The two units
| Unit | User | Runs | Work dir |
|---|---|---|---|
gitea.service |
git |
/usr/local/bin/gitea web --config /etc/gitea/app.ini |
/var/lib/gitea |
gitea-runner.service |
gitea-runner |
/usr/local/bin/gitea-runner daemon (gains --config <WorkDir>/config.yaml once that file exists) |
/var/lib/gitea-runner |
Both unit files are written to /etc/systemd/system/ and picked up with a daemon-reload. gtcnsl enables each unit for boot only once its service is up and healthy (see below) — not at write time. They restart on failure and ship with hardening (NoNewPrivileges, PrivateTmp, ProtectSystem=strict, raised file/proc limits).
i
The runner's --config flag is added, never removed
gitea-runner daemon reads no config file at all unless told to with --config. runner register/reconfigure generate a baseline /var/lib/gitea-runner/config.yaml the first time (never overwriting one that's already there), and gitea-runner.service's ExecStart picks up --config only once that file is confirmed present — so re-running runner install on an older install adds the flag as soon as config.yaml exists, and never points at a file that isn't there yet.Which gtcnsl command owns each
gtcnsl gitea install— deploys, enables, and startsgitea.service.gtcnsl runner install— deploysgitea-runner.servicebut leaves it stopped and not yet enabled.gtcnsl runner register/runner reconfigure— generateconfig.yamlif it's missing, then start and enablegitea-runner.service(after its health check passes).gtcnsl runner config generate [--force]— (re)writesconfig.yamlon demand, independent of register/reconfigure.gtcnsl config apply/set/toggleandgtcnsl secrets rotate— restartgitea.serviceas part of their apply cycle.
Operate them with systemctl
sudo systemctl status gitea
sudo systemctl restart gitea
sudo systemctl status gitea-runner
# follow logs
sudo journalctl -u gitea -f
sudo journalctl -u gitea-runner -f
i
Check both at once
gtcnsl doctor reports whether each unit is active (and warns, rather than fails, when one is down) alongside the rest of the host checks.
!
Don't hand-edit app.ini under a running service
Editing
/etc/gitea/app.ini directly skips the backup, diff, and rollback. Use gtcnsl config so a bad change can't strand gitea.service.Next steps
To move Gitea or gtcnsl itself to a new version, see Upgrades & self-update.