Skip to main content

Running as a Service

Configure roboticks-runner to start automatically and run in the background.

Why Run as a Service?

Running the runner as a system service provides:
  • Automatic startup on system boot
  • Automatic restart if the runner crashes
  • Background execution without a terminal session
  • System logging integration

Linux (systemd)

Most modern Linux distributions use systemd for service management.

Create Service File

Create a systemd service file:
For better security, run the service as a dedicated user:
If you prefer to run as your own user, change User=roboticks to User=<your-username> in the service file.

Enable and Start

Manage the Service

macOS (launchd)

macOS uses launchd for service management.

Create Launch Agent

Create a plist file for your user:

Load the Service

Manage the Service

Windows

On Windows, you can use the built-in Service Manager or NSSM (Non-Sucking Service Manager).

Using NSSM

  1. Download NSSM from https://nssm.cc/
  2. Install the service:

Manage the Service

Docker Compose

Alternatively, run the runner itself in a Docker container:
Running the runner in Docker requires mounting the Docker socket, which gives the container access to the host’s Docker daemon.

Verifying Service Status

After setting up the service, verify it’s working:
  1. Check service status using the commands above
  2. Check dashboard: Runner should show Online in Settings > Fleet > Self-Hosted Runners
  3. Test a job: Run a test job to verify end-to-end functionality

Troubleshooting

Check the logs for errors:
Common issues:
  • Docker not running
  • Config file not found or invalid
  • Insufficient permissions
  • Verify network connectivity to api.roboticks.io
  • Check if the runner token has expired
  • Ensure the config file is readable by the service user
Ensure the service user:
  • Is in the docker group
  • Has read access to the config file
  • Has write access to the work directory
Check logs for the restart reason. Common causes:
  • Out of memory (reduce max_concurrent_jobs)
  • Network connectivity issues
  • Docker daemon problems

Next Steps

Configuration

Customize runner settings

CI/CD Integration

Use runners in pipelines