Skip to content

~/.dstack/server/config.yml

The ~/.dstack/server/config.yml file is used by the dstack server to configure cloud accounts.

Projects

For flexibility, dstack server permits you to configure backends for multiple projects. If you intend to use only one project, name it main.

Examples

AWS

projects:
- name: main
  backends:
  - type: aws
    creds:
      type: access_key
      access_key: KKAAUKLIZ5EHKICAOASV
      secret_key: pn158lMqSBJiySwpQ9ubwmI6VUU3/W2fdJdFwfgO
projects:
- name: main
  backends:
  - type: aws
    creds:
      type: default

Azure

projects:
- name: main
  backends:
  - type: azure
    subscription_id: 06c82ce3-28ff-4285-a146-c5e981a9d808
    tenant_id: f84a7584-88e4-4fd2-8e97-623f0a715ee1
    creds:
      type: client
      client_id: acf3f73a-597b-46b6-98d9-748d75018ed0
      client_secret: 1Kb8Q~o3Q2hdEvrul9yaj5DJDFkuL3RG7lger2VQ
projects:
- name: main
  backends:
  - type: azure
    subscription_id: 06c82ce3-28ff-4285-a146-c5e981a9d808
    tenant_id: f84a7584-88e4-4fd2-8e97-623f0a715ee1
    creds:
      type: default

GCP

projects:
- name: main
  backends:
  - type: gcp
    project_id: gcp-project-id
    creds:
      type: service_account
      filename: ~/.dstack/server/gcp-024ed630eab5.json
projects:
- name: main
  backends:
  - type: gcp
    project_id: gcp-project-id
    creds:
      type: default

Lambda

projects:
- name: main
  backends:
  - type: lambda
    creds:
      type: api_key
      api_key: eersct_yrpiey-naaeedst-tk-_cb6ba38e1128464aea9bcc619e4ba2a5.iijPMi07obgt6TZ87v5qAEj61RVxhd0p

TensorDock

projects:
- name: main
  backends:
  - type: tensordock
    creds:
      type: api_key
      api_key: 248e621d-9317-7494-dc1557fa5825b-98b
      api_token: FyBI3YbnFEYXdth2xqYRnQI7hiusssBC

Vast.ai

projects:
- name: main
  backends:
  - type: vastai
    creds:
      type: api_key
      api_key: d75789f22f1908e0527c78a283b523dd73051c8c7d05456516fc91e9d4efd8c5

CUDO

projects:
- name: main
  backends:
  - type: cudo
    project_id: my-cudo-project
    creds:
      type: api_key
      api_key: 7487240a466624b48de22865589

DataCrunch

projects:
- name: main
  backends:
  - type: datacrunch
    creds:
      type: api_key
      client_id: xfaHBqYEsArqhKWX-e52x3HH7w8T
      client_secret: B5ZU5Qx9Nt8oGMlmMhNI3iglK8bjMhagTbylZy4WzncZe39995f7Vxh8

Kubernetes

projects:
- name: main
  backends:
  - type: kubernetes
    kubeconfig:
      filename: ~/.kube/config
    networking:
      ssh_host: localhost # The external IP address of any node
      ssh_port: 32000 # Any port accessible outside of the cluster
projects:
- name: main
  backends:
  - type: kubernetes
    kubeconfig:
      filename: ~/.kube/config
    networking:
      ssh_port: 32000 # Any port accessible outside of the cluster

For more details on configuring clouds, please refer to Installation.

Root reference

projects - The list of projects.

projects[n]

name - The name of the project.

backends - The list of backends.

projects[n].backends[type=aws]

type - The type of the backend. Must be aws.

vpc_name - (Optional) The VPC name.

vpc_ids - (Optional) The mapping from AWS regions to VPC IDs.

creds - The credentials.

projects[n].backends[type=aws].creds

type - The type of credentials. Must be access_key.

access_key - The access key.

secret_key - The secret key.

type - The type of credentials. Must be default.

projects[n].backends[type=azure]

type - The type of the backend. Must be azure.

tenant_id - The tenant ID.

subscription_id - The subscription ID.

creds - The credentials.

projects[n].backends[type=azure].creds

type - The type of credentials. Must be client.

client_id - The client ID.

client_secret - The client secret.

type - The type of credentials. Must be default.

projects[n].backends[type=datacrunch]

type - The type of backend. Must be datacrunch.

creds - The credentials.

projects[n].backends[type=datacrunch].creds

type - The type of credentials. Must be api_key.

client_id - The client ID.

client_secret - The client secret.

projects[n].backends[type=gcp]

type - The type of backend. Must be gcp.

project_id - The project ID.

creds - The credentials.

projects[n].backends[type=gcp].creds

type - The type of credentials. Must be service_account.

filename - The path to the service account file.

data - (Optional) The contents of the service account file.

type - The type of credentials. Must be default.

projects[n].backends[type=lambda]

type - The type of backend. Must be lambda.

creds - The credentials.

projects[n].backends[type=lambda].creds

type - The type of credentials. Must be api_key.

api_key - The API key.

projects[n].backends[type=tensordock]

type - The type of backend. Must be tensordock.

creds - The credentials.

projects[n].backends[type=tensordock].creds

type - The type of credentials. Must be api_key.

api_key - The API key.

api_token - The API token.

projects[n].backends[type=vastai]

type - The type of backend. Must be vastai.

creds - The credentials.

projects[n].backends[type=vastai].creds

type - The type of credentials. Must be api_key.

api_key - The API key.

projects[n].backends[type=kubernetes]

type - The type of backend. Must be kubernetes.

kubeconfig - The kubeconfig configuration.

networking - (Optional) The networking configuration.

projects[n].backends[type=kubernetes].kubeconfig

filename - The path to the kubeconfig file.

data - (Optional) The contents of the kubeconfig file.

projects[n].backends[type=kubernetes].networking

ssh_host - (Optional) The external IP address of any node.

ssh_port - (Optional) Any port accessible outside of the cluster.