bitbucket pipeline runners
Asked by Srikanth Mamidala:

I am trying to setup runners for out bitbucket pipelines for our pipelines and happen to read documentation which lead me to these 2 questions

* Could not understand the difference between

<https://support.atlassian.com/bitbucket-cloud/docs/adding-a-new-runner-in-bitbucket/>

and

<https://support.atlassian.com/bitbucket-cloud/docs/set-up-and-use-runners-for-linux/>

* I tried to setup runner on one of our linux machine using this documentation <https://support.atlassian.com/bitbucket-cloud/docs/adding-a-new-runner-in-bitbucket/> but it looks like it locks(with ONLINE message) the terminal for any other uses. Is there a way we can run this on a background so we can use a linux server which can serve multiple usecases.


Answers:
author: Mark C
body: Hi [@Srikanth Mamidala](/t5/user/viewprofilepage/user-id/3810057)

Thank you for reaching out to the community.  
Unfortunately, it is not highlighted in our documentation that you can run runners in the background through the Docker command.  
However, it is possible to run runners in the background.

For the runners Docker command, you can add the **-d** flag and that will run the Docker container in a detached mode.  
**Sample runners Docker command:**

```
docker container run -it -d -v /tmp:/tmp ........
```

After that, you should be able to run other commands on your server.

Now, if you'd like to monitor the runners container logs, you can use the below command:

```
docker logs <Runners container ID here> -f
```

![](https://getsupport.atlassian.com/images/icons/emoticons/information.png) To get the runners container ID, you can run **docker container ls**

I'll make sure to raise this to our documentation team and add it as an [FAQ](https://support.atlassian.com/bitbucket-cloud/docs/pipelines-runners-frequently-asked-questions/).

Meanwhile, do let me know how it goes.

Regards,  
Mark C

comments: author: Srikanth Mamidala
body: [@Mark C](/t5/user/viewprofilepage/user-id/1210823)

Thank you for the response, understood how to handle it.

Can you also please explain the difference between

<https://support.atlassian.com/bitbucket-cloud/docs/adding-a-new-runner-in-bitbucket/>

and

<https://support.atlassian.com/bitbucket-cloud/docs/set-up-and-use-runners-for-linux/>


author: Mark C
body: Hi [@Srikanth Mamidala](/t5/user/viewprofilepage/user-id/3810057)  

For the documentation here - [Adding a new runner in Bitbucket](https://support.atlassian.com/bitbucket-cloud/docs/adding-a-new-runner-in-bitbucket/)

It is a guide on how you can set up Runners either in your specific repository or in a workspace level setting. When you add Runners in a workspace level, it can be used across your repositories whereas adding Runners in a specific repository will only make the runner available in that specific repository.  

For the documentation here - [Set up runners for Linux](https://support.atlassian.com/bitbucket-cloud/docs/set-up-and-use-runners-for-linux/)

It is a guide on how you can specifically set up Runners for the Linux environment and it also includes some optional best practices that you can implement in your self-hosted machine.  

Let me know if you have further questions that I can help with.  

Regards,  
Mark C


author: Srikanth Mamidala
body: Hi Mark thanks for explaining. I'm sorry I may not have communicated my question well. So first documentation has a Linux runner setup as well which is different from 2nd document. I am confused over which runner setup is correct for Linux machines.


author: Mark C
body: Hi [@Srikanth Mamidala](/t5/user/viewprofilepage/user-id/3810057)  

The first documentation is actually intended to be done on Bitbucket UI where you'll need to specify from which environment you'd like to run a Runner (e.g. Linux or Windows). This will also generate a Docker command where you'll need to copy and paste it into your chosen environment later on.  

An example Docker command would be:

```
docker container run -it -d -v /tmp:/tmp ........
```

Whereas for second documentation, it is a guide for setting up your actual Linux environment (server) where you will run the Docker command above.   

In summary:

* The [first documentation](https://support.atlassian.com/bitbucket-cloud/docs/adding-a-new-runner-in-bitbucket/) is a guide for setting up Runners on Bitbucket Cloud UI
* The [second documentation](https://support.atlassian.com/bitbucket-cloud/docs/set-up-and-use-runners-for-linux/) is a guide for setting up your Linux environment (or Server)

Hope it helps and let me know if you have further questions.  

Regards,  
Mark C


author: Srikanth Mamidala
body: So both documentation have to be done for security for the Linux runner setup ?


author: Mark C
body: Hi [@Srikanth Mamidala](/t5/user/viewprofilepage/user-id/3810057)  

The [first documentation](https://support.atlassian.com/bitbucket-cloud/docs/adding-a-new-runner-in-bitbucket/) is required while the [second documentation](https://support.atlassian.com/bitbucket-cloud/docs/set-up-and-use-runners-for-linux/) is optional.  

Regards,  
Mark C


Tags: bitbucket-cloud

bitbucket-pipelines

bitbucket-runners

cloud