Skip to content


Here's how to run the dstack server via Docker:

$ docker run --name dstack -p <port-on-host>:3000 \ 
  -v ~/.dstack/server:/root/.dstack/server \

Configure clouds

Upon startup, the server sets up the default project called main. Prior to using dstack, make sure to configure clouds.

Environment variables

Here's the list of environment variables which you can override:

  • DSTACK_SERVER_ADMIN_TOKEN – (Optional) The default token of the admin user. By default, it's generated randomly at the first startup.
  • DSTACK_SERVER_DIR – (Optional) The path to the directory where the dstackserver stores the state. Defaults to ~/.dstack/server.

Persisting state in a cloud storage

By default, dstack saves state in a local directory ($DSTACK_SERVER_DIR/data). If you want to persist state automatically to a cloud object storage, you can configure the following environment variables.

  • LITESTREAM_REPLICA_URL - The url of the cloud object storage. Examples: s3://<bucket-name>/<path>, gcs://<bucket-name>/<path>, abs://<storage-account>@<container-name>/<path>, etc.

To persist state into an AWS S3 bucket, provide the following environment variables:

  • AWS_ACCESS_KEY_ID - The AWS access key ID
  • AWS_SECRET_ACCESS_KEY - The AWS secret access key
GCP Storage

To persist state into an AWS S3 bucket, provide one of the following environment variables:

  • GOOGLE_APPLICATION_CREDENTIALS - The path to the GCP service account key JSON file
Azure Blob Storage

To persist state into an Azure blog storage, provide the following environment variable.

  • LITESTREAM_AZURE_ACCOUNT_KEY - The Azure storage account key

More details on options for configuring persistent state.