Before you can use dstack, you’ll need to get it installed.

There are 2 main components of dstack:

  • Client packages for Python (dstack-py) an R (dstack-r). These packages can be used from either notebooks or scripts to push data to dstack.

  • A server application (dstack). It handles the requests from the Client packages, and serves data applications. The application can run locally or in Docker, or you can use the in-cloud version running on if you don't want to run the server yourself.

Installing Client Packages


The easiest way to install dstack in Python is by using pip or conda:

pip install dstack
conda install dstack -c

The python package comes with a command-line tool called dstack. This command-line tool can be used to configure local profiles, credentials, and to run a local server.


If you're using R and don't need the command-line tool, you can install the client package for R via the following command:


Quick Start

Once you are done installing the Client Packages, the easiest way to start using dstack would be to Register for cloud and follow the configuration instructions here -

dstack config add --token [YOUR TOKEN] --user [YOUR USERNAME]

You can find your token number and username information inside settings -

You can read more details about Configuration and cloud here-

Otherwise you can also run a server locally as specified below.

Run a server

Note, if you don't want to run a server yourself, you can use the in-cloud version running on To configure a profile that uses, you have to sign up for a account, go to settings, and copy the username and the client token. The server in that case must not be specified.

After installing the dstack Python Client package, you can access the dstack command line tool, which you can use to run a local server.

In order to run a server locally, run this command line:

dstack server start

You'll see the following output:

To access the dstack server, open one of these URLs in the browser:
If you're using Python, use the following command line command to configure your dstack profile:
pip install dstack
dstack config add --token xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx --user dstack --server http://localhost:8080/api
If you're using R, use the following R command to configure your dstack profile:
dstack::configure(user = "dstack", token = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", persist = "global", server = "http://localhost:8080/api")

Note, in your case instead of xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx you'll see your personal code.

The server by default uses the 8080 port. Optionally, you can specify a custom port by using the command line option --port:

dstack server start --port 8081

Note, by default, the server stores all the data under .dstack in the user home directory. In case you'd like to store the .dstack folder in a different place, use the following command:

dstack server start --home <other_directory>

In this case, the server will store all the data in <other_directory>/.dstack/.

Configure a user profile

In order to send requests to the locally running server, one must run the command suggested in the output:

dstack config add --token xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx --user dstack --server http://localhost:8080/api