Running as a Service
Configureroboticks-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:Create Service User (Recommended)
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
- Download NSSM from https://nssm.cc/
- Install the service:
Manage the Service
Docker Compose
Alternatively, run the runner itself in a Docker container:Verifying Service Status
After setting up the service, verify it’s working:- Check service status using the commands above
- Check dashboard: Runner should show Online in Settings > Fleet > Self-Hosted Runners
- Test a job: Run a test job to verify end-to-end functionality
Troubleshooting
Service fails to start
Service fails to start
Check the logs for errors:Common issues:
- Docker not running
- Config file not found or invalid
- Insufficient permissions
Service starts but runner is Offline
Service starts but runner is Offline
- Verify network connectivity to
api.roboticks.io - Check if the runner token has expired
- Ensure the config file is readable by the service user
Permission denied errors
Permission denied errors
Ensure the service user:
- Is in the
dockergroup - Has read access to the config file
- Has write access to the work directory
Service restarts frequently
Service restarts frequently
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