Manage self-hosted runners
Check status and logs, upgrade kosem-runner without stopping environments, pause or remove runners, and require self-hosted runners by policy.
Monitor, upgrade, pause and remove self-hosted runners, or require projects to run environments exclusively on them. Viewing pools and runners requires any basic role or an Environment role; pausing, resuming and deleting runners requires Owner, Editor or Environment Admin. Changing organization pool sharing requires Owner on the organization, and setting policies requires Owner or Policy Admin on Team or Enterprise.
Check runner status and logs
In the console, open Environments › Runners and click a runner's name to view its state, capacity usage, placed environments and host details.
On the host, run status to inspect registration, service state, environments (including failing environment errors) and available upgrades, or check to verify host prerequisites:
# Linux
sudo kosem-runner status
sudo kosem-runner check
sudo journalctl -u kosem-runner -n 50
# macOS
kosem-runner status
kosem-runner check
tail -n 50 ~/Library/Logs/kosem-runner/runner.logIf a runner is Offline, environments placed on it wait until it reconnects because their disks are stored on that host. Confirm outbound HTTPS connectivity to https://api.kosem.ai, inspect the logs above, and on macOS verify that Apple's container services are running with container system status (start them with container system start).
Upgrade kosem-runner
When kosem publishes a newer version of kosem-runner, the runner's console page shows an upgrade notice and kosem-runner status reports it. Upgrading keeps the runner's registration, saved installer flags and running environments:
sudo kosem-runner upgrade # Linux
kosem-runner upgrade # macOSOn Linux, upgrade also refreshes containerd, Kata Containers and CNI while existing microVMs continue running. On macOS, it prompts for sudo only if the pf firewall rules changed.
Pause and resume a runner
Pause a runner before host maintenance so kosem places new environments on other runners in the pool. Existing environments stay on the host until deleted, and a paused runner still counts toward your Self-hosted runners quota.
- In your organization or project, click Environments, and then Runners.
- Click the runner's name.
- Click Pause. To accept new environments again, click Resume.
With the API, set your API key (Call the API) and the runner's IDs, then call /pause (or /resume, which schedules waiting environments in the pool immediately):
export KOSEM_API_KEY='kosem_sk_…'
export KOSEM_ORG='org_01m5r8w2k3e9vbt6g0d4x7qz1h'
export KOSEM_POOL='rnp_01m5rh2kq2e9vbt6g0d4x7qz1t'
export KOSEM_RUNNER='rnr_01m5rh6mq2e9vbt6g0d4x7qz1u'
curl -s -X POST "https://api.kosem.ai/v1/organizations/$KOSEM_ORG/runnerPools/$KOSEM_POOL/runners/$KOSEM_RUNNER/pause" \
-H "Authorization: Bearer $KOSEM_API_KEY"For a project pool, replace /organizations/$KOSEM_ORG with /projects/{project}.
Rename a pool or change sharing
Use PATCH to rename a runner pool or (for an organization pool, as an Owner) change which projects can use it. Environments in a project removed from availability continue running until stopped, then can't start again in that pool:
curl -s -X PATCH "https://api.kosem.ai/v1/organizations/$KOSEM_ORG/runnerPools/$KOSEM_POOL" \
-H "Authorization: Bearer $KOSEM_API_KEY" \
-H "Content-Type: application/json" \
-d '{"displayName": "Linux build hosts", "availability": {"allProjects": false, "projects": ["projects/prj_01m5r9dh9mf0ps98ktkap3562c"]}}'Remove a runner or delete a pool
Removing a runner deletes every environment disk stored on its host. Remaining environments lose their disks and start fresh from their images on another runner in the pool. This can't be undone.
Uninstall from the host
When you still have access to the host, run uninstall. It stops the service, deletes local VMs and disks, deletes the runner in kosem (freeing its quota slot immediately) and removes service files, firewall rules, symlink and logs:
sudo kosem-runner uninstall # Linux
kosem-runner uninstall # macOSPass --yes (-y) to skip confirmation in scripts. If the host can't reach kosem, uninstall removes local files and instructs you to delete the runner in the console so it stops counting toward your quota.
Delete from the console
If a host is gone or unreachable, delete its runner in the console:
- Open Environments › Runners and click the runner.
- Click Delete.
- If environments are placed on the runner, enter the runner's name to confirm, then click Delete runner.
kosem revokes the host's credentials immediately and frees its quota slot. If the host reconnects later with an accurate clock, it wipes its local VMs, disks and key and stops; run kosem-runner uninstall on the host to remove the binary and service files.
Delete an empty pool
Once a pool has no runners and no active environments, open Environments › Runners, click the delete icon beside the pool's name and click Delete pool.
Require self-hosted runners with a policy
On Team and Enterprise, Owners and Policy Admins can prevent projects from using kosem-managed machines:
- Open Settings › Policies on your organization or project (Set organization and project policies).
- Beside Require self-hosted (
environments.selfHostedRequired), click Edit. - Select Enforce and click Save.
New environments can run only on self-hosted runner pools, and existing agents on kosem-managed machines won't start again until moved to a runner pool.