How does communicate gitlab runners?


I was wondering how does work gitlab runners. How does it talk to and how is it syncronized ?

When we install the runner on a remote server with shell, is the connection to secure ?

On which protocol is based this communication ? Https, ssh, etc ?

Thank you in advance :smiley:

1 Like

Reply from the support :

Runners communicate with GitLab over HTTPS, entirely through connections initiated from the Runner to GitLab and never in reverse. The advantage here is that you can install a Runner behind a firewall and as long as the Runner has outbound access to it will work. From there, it really doesn’t matter which executor you use (Shell, Docker, etc).




I have a doubt. If connection is one way , from runner to gitlab then how does gitlab deploy to remote? How does runner comes to know that we have ran a pipeline and it has to comunicate with gitlab?

See gitlab access logs , runner is constantly polling the server

1 Like

the answer was useful, thanks @iahmad-khan and @mib-energreen

I would like to come back to this thread. Is there - meanwhile - any option to reverse the directory of connection initiation? Following scenario: I’ve an internal Gitlab server running on on-premises resources. It is - obviously - not accessible from the world. Now I want to deploy runners on container infrastructures like GCP or MassiveGrid. However, these runners can not connect to the Gitlab server while the Gitlab server could connect to these runners. Is there any option? Or workaround?


Hello @wolutator,

I think even if you achieved this , the next problem would be that the runner will firstly try to pull the git repository over https as well.

The only thing I could think of is to establish a VPN between the runner and the server?

1 Like