Official Docs - Runner Main Page - Linux Install
I will be using the Docker executor for Runner - Install Docker
Add the GitLab repo
curl -L "https://packages.gitlab.com/install/repositories/runner/gitlab-runner/script.deb.sh" | bash
Configure apt pinning. This ensures that any GitLab packages are installed from the new repo and not the distro's default repo.
cat <<EOF | tee /etc/apt/preferences.d/pin-gitlab-runner.pref
Explanation: Prefer GitLab provided packages over the Debian native ones
Package: gitlab-runner
Pin: origin packages.gitlab.com
Pin-Priority: 1001
EOF
Update and install
apt install gitlab-runner