Installing and Registering GitLab Runners
Introduction
Section titled “Introduction”GitLab Runners pick up pipeline jobs and run them in the configured environment.
Install the Runner
Section titled “Install the Runner”- Choose a host machine for the runner.
- Install the runner using your package manager or binary, for example on Debian/Ubuntu:
Terminal window sudo apt-get install gitlab-runner - Ensure the service is running:
sudo gitlab-runner start.
Register the Runner
Section titled “Register the Runner”- Obtain the registration token from Settings > CI/CD > Runners.
- Run
gitlab-runner registerand provide:- GitLab URL
- Registration token
- Description and tags
- Executor (e.g.,
shell,docker)
- The runner will appear in your project once registration completes.
Best Practices
Section titled “Best Practices”-
Use tags to control which jobs a runner can execute.
-
Prefer specific runners for sensitive or resource-intensive jobs.
-
For autoscaling, consider Docker Machine or Kubernetes executors.