Skip to content

Use self-hosted runners

A runner is a machine that can run dstack workflows. You can host runners on your local machine or on your remote machines.

In order to host a runner on any machine, you have to launch the dstack-runner daemon there. The machines that host the dstack-runner daemon form a pool of runners, and when the user runs workflows via the dstack CLI, the workflows will be running on these machines.

Run locally

If you don't want to use remote machines, you can host a runner locally. All you need to do is to launch the dstack-runner daemon locally.

Install the daemon

Here's how to install the dstack-runner daemon:

sudo curl --output /usr/local/bin/dstack-runner "https://dstack-runner-downloads.s3.eu-west-1.amazonaws.com/latest/binaries/dstack-runner-linux-amd64"
sudo chmod +x /usr/local/bin/dstack-runner
sudo curl --output /usr/local/bin/dstack-runner "https://dstack-runner-downloads.s3.eu-west-1.amazonaws.com/latest/binaries/dstack-runner-darwin-amd64"
sudo chmod +x /usr/local/bin/dstack-runner

If you are on Windows, simply download dstack-runner.exe.

Configure a token

Before you can start the daemon, you have to configure it with your Personal Access Token:

dstack-runner config --token <token>
dstack-runner config --token <token>
dstack-runner.exe config --token <token>

Personal Access Token

Use the dstack token command of the CLI to get your Personal Access Token. See Installation

Once you do it, the daemon is ready to start:

dstack-runner start
dstack-runner start
dstack-runner.exe start

Docker is required

The dstack-runner daemon requires that either the standard Docker or the NVIDIA's Docker is installed and running on the machine.

Internet is required

The machine where you run the dstack-runner daemon has to have a connection to the Internet.

If your machine is an EC2 instance, make sure its security group allows outgoing traffic.

Check runners' status

After you've set up runners, you can check their status via the dstack CLI:

dstack runners 

If runners are running properly, you'll see their hosts in the output:

RUNNER    HOST                    STATUS    UPDATED
sugar-1   MBP-de-Boris.fritz.box  LIVE      3 mins ago

Runner is not there?

Don't see your runner? This may mean the runner is offline or that the dstack-runner daemon was not configured or started properly.

Back to top