> ## Documentation Index
> Fetch the complete documentation index at: https://docs.blinkops.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Deploying a Runner with Docker

> Deploy a Blink self-hosted runner using Docker or Docker Compose in your environment.

## Prerequisites

1. **A Container Engine:** You will need Docker installed on your machine. [Install Docker here](https://docs.docker.com/desktop/).

2. **Docker Authentication Required:** To prevent TLS handshake timeouts or image pull failures, ensure you are authenticated with Docker Hub before attempting to deploy a self-hosted runner. Docker may restrict access to images due to excessive unauthenticated pull requests. You can authenticate using docker login.

   <Note>Please note, for enterprise users, be aware that Docker Desktop has commercial use limitations. Review Docker's licensing terms to ensure compliance in larger organizations.</Note>

3. **Blink User:** You must have either the [Owner role](/docs/blink-platform/account-management/roles#1-owner),[Contributor role](/docs/blink-platform/account-management/roles#2-contributor), or a [custom role](/docs/blink-platform/account-management/roles#adding-a-new-role) that includes both the `runners:view` and `runners:edit` permissions. To learn more about role-based access and permissions, see the [User Roles documentation](/docs/blink-platform/account-management/roles).

***

## Requirements

When deploying self-hosted runners on a hardened OS, it's crucial to ensure proper communication between Docker containers, therefore please implement the following requirements:

<div className="integrations-table">
  | **Requirement**                   | **Explanation**                                                                                                                                                                                                                                                                                                               |
  | --------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
  | Manage internal firewall settings | An internal firewall might prevent communication between containers. To resolve this, create a firewall rule that allows containers to communicate with each other internally. The port used for internal container communication is selected randomly, so the firewall rule must accommodate this configuration/requirements |
  | Ensure sufficient disk space      | Ensure that your system has at least `30GB` of available disk space on the `/var` partition to avoid deployment issues.                                                                                                                                                                                                       |
  | Verify DNS server configuration   | Ensure that all DNS servers configured on your system are correctly resolving addresses, as DNS issues could impact network operations during deployment.                                                                                                                                                                     |
  | Authenticate with Docker          | Before deploying a Docker runner, run `docker login` to authenticate with Docker Hub. Unauthenticated image pulls may be rate-limited, resulting in TLS handshake timeouts or failed downloads.                                                                                                                               |
</div>

***

## Deployment Guide

<Steps>
  <Step title="Navigate to the Runners page">
    In the left-hand navigation bar, select **Runners**. Then, click the **New Runner** button in the top-right corner to open the configuration dialog.
  </Step>

  <Step title="Fill in the parameters:">
    Fill in the required details:

    * **Name**: Enter a name for the Runner group.
    * **Tags**: Add or create tags (optional).
    * **Default**: Check this box to set this Runner group as the default. When enabled, any workflows that do not explicitly specify a Runner group will automatically be assigned to this one.
  </Step>

  <Step title="Choose Runner Type">
    Choose Docker as your runner type.
  </Step>

  <Step title="Copy and save the command">
    <p>Click 'Continue' to proceed. A dialog box will appear with the command needed to install the Runner in your Docker environment. To copy the command, click the <Icon icon="copy" /> button in the top-right corner. </p>

    <Warning>
      **WARNING**

      Please be aware that the provided command contains the registration token of the Runner, which will not be retrievable after copying. It is essential to securely store this token in a safe location for future reference.
    </Warning>
  </Step>
</Steps>

<Frame>
  <video controls="true" autoplay="true" loop="true" allowfullscreen="true" class="w-full aspect-video" src="https://www.dropbox.com/scl/fi/lxaota7weiyixggtkfk7f/DockerRunner.mp4?rlkey=px9h1h9vdflx4n858612huxzz&st=toh5wewx&raw=1" />
</Frame>

***

## Related Articles

<CardGroup cols={2}>
  <Card title="Balancing the Load within a Runner Group" icon="rectangle-history" href="/docs/blink-platform/runners/deploying-runner/runner-group#balancing-the-load-within-a-runner-group-docker-or-kubernetes">
    Learn more about balancing the load within a Docker Runner Group or Kubernetes Runner Group
  </Card>

  <Card title="Scaling up a Runner Group" icon="code-fork" href="/docs/blink-platform/runners/deploying-runner/runner-group#scaling-up-a-runner-group">
    Learn more about scaling up a Docker Runner Group or Kubernetes Runner Group
  </Card>
</CardGroup>
