The main components of dstack include:

  • 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 serve data applications. The application can run locally or in Docker.

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

pip install dstack
conda install dstack -c

The 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:


Run a server

In order to run a server locally, one must 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

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.

Note, the R CRAN package is still under review. In order to install it, please use the following commands:

install.packages(c('uuid', 'bit64', 'rjson', 'rlist'), repos = '')
install.packages('', repos = NULL, type = 'source')