Installation

May 11, 2026 ยท View on GitHub

Launch the server { #server }

The server can run on your laptop or any environment with access to the cloud and on-prem clusters you plan to use.

=== "uv"

> The server can be set up via `uv` on Linux, macOS, and Windows (via WSL 2).
> It requires Git and OpenSSH.

<div class="termy">

```shell
$ uv tool install "dstack[all]" -U
$ dstack server

Applying ~/.dstack/server/config.yml...

The admin token is "bbae0f28-d3dd-4820-bf61-8f4bb40815da"
The server is running at http://127.0.0.1:3000/
```

</div>

=== "pip"

> The server can be set up via `pip` on Linux, macOS, and Windows (via WSL 2).
> It requires Git and OpenSSH.

<div class="termy">

```shell
$ pip install "dstack[all]" -U
$ dstack server

Applying ~/.dstack/server/config.yml...

The admin token is "bbae0f28-d3dd-4820-bf61-8f4bb40815da"
The server is running at http://127.0.0.1:3000/
```

</div>

=== "Docker"

<div class="termy">

```shell
$ docker run -p 3000:3000 \
    -v $HOME/.dstack/server/:/root/.dstack/server \
    dstackai/dstack

Applying ~/.dstack/server/config.yml...

The admin token is "bbae0f28-d3dd-4820-bf61-8f4bb40815da"
The server is running at http://127.0.0.1:3000/
```
    
</div>

For more details on server deployment options, see the Server deployment guide.

!!! info "Configure backends"

To orchestrate compute across GPU clouds or Kubernetes clusters, you need to configure [backends](concepts/backends.md).

Install the CLI { #cli }

Once the server is up, you can access it via the dstack CLI.

The CLI can be used on Linux, macOS, and Windows. It requires Git and OpenSSH.

=== "uv"

<div class="termy">

```shell
$ uv tool install dstack -U
```

</div>

=== "pip"

<div class="termy">

```shell
$ pip install dstack -U
```

</div>

??? info "Windows" To use the CLI on Windows, ensure you've installed Git and OpenSSH via Git for Windows.

When installing it, ensure you've checked 
`Git from the command line and also from 3-rd party software` 
(or `Use Git and optional Unix tools from the Command Prompt`), and 
`Use bundled OpenSSH`.

??? info "Shell autocompletion"

`dstack` supports shell autocompletion for `bash` and `zsh`.

=== "bash"

    First, validate if completion scripts load correctly in your current shell session:
    
    <div class="termy">
    
    ```shell
    $ eval "$(dstack completion bash)"
    ```

    </div>
    
    If completions work as expected and you would like them to persist across shell sessions, add the completion script to your shell profile using these commands:
    
    <div class="termy">
    
    ```shell
    $ mkdir -p ~/.dstack
    $ dstack completion bash > ~/.dstack/completion.sh
    $ echo 'source ~/.dstack/completion.sh' >> ~/.bashrc
    ```
    
    </div>

=== "zsh"
    
    First, validate if completion scripts load correctly in your current shell session:
    
    <div class="termy">
    
    ```shell
    $ eval "$(dstack completion zsh)"
    ```

    </div>
    
    If completions work as expected and you would like them to persist across shell sessions, you can install them via Oh My Zsh using these commands:
    
    <div class="termy">
    
    ```shell
    $ mkdir -p ~/.oh-my-zsh/completions
    $ dstack completion zsh > ~/.oh-my-zsh/completions/_dstack
    ```
        
    </div>

    And if you don't use Oh My Zsh:

    <div class="termy">
    
    ```shell
    $ mkdir -p ~/.dstack
    $ dstack completion zsh > ~/.dstack/completion.sh
    $ echo 'source ~/.dstack/completion.sh' >> ~/.zshrc
    ```
    
    </div>

    > If you get an error similar to `2: command not found: compdef`, then add the following line to the beginning of your `~/.zshrc` file:
    > `autoload -Uz compinit && compinit`.

Configure the project

When the server is started, by default, it creates the main project and the admin user.

To point the CLI to the dstack server, configure it with the server address, user token, and project name:

$ dstack project add \
    --name main \
    --url http://127.0.0.1:3000 \
    --token bbae0f28-d3dd-4820-bf61-8f4bb40815da
    
Configuration is updated at ~/.dstack/config.yml

This configuration is stored in ~/.dstack/config.yml.

Later, you can create additional projects and users.

Use CLI or API

Once the project is configured, you can use the dstack CLI or API.

See the CLI & API guide for using the CLI and HTTP API.

Install agent skills { #skills }

If you'd like to use dstack with AI agents like Claude, Codex, and Cursor, install dstack skills to help them use the CLI and edit configuration files.

$ npx skills add dstackai/dstack

We're actively improving Skills and would love your feedback in GitHub issues.

!!! info "What's next?" 1. See Backends 2. Follow Quickstart 3. Check the Server deployment guide