Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time
  Docker machine driver

Go Report Card License Build Status

This library adds the support for creating Docker machines hosted on the IaaS platform.

You need to create a read/write API token under My Account > API Tokens in the Control Panel and pass it to docker-machine create as the --cloudscale-token option.


You can find sources and pre-compiled binaries here.

# Download the binary (this example downloads the binary for Linux amd64)
$ wget
$ tar xzvf docker-machine-driver-cloudscale_1.2.1_linux_amd64.tar.gz

# Make it executable and copy the binary to a directory included in your $PATH
$ chmod +x docker-machine-driver-cloudscale
$ cp docker-machine-driver-cloudscale /usr/local/bin/


$ docker-machine create \
  --driver cloudscale \
  --cloudscale-token=... \
  --cloudscale-zone lpg1 \
  --cloudscale-image=ubuntu-18.04 \
  --cloudscale-flavor=flex-8-4 \

See docker-machine create --driver cloudscale --help for a complete list of all supported options.

Using environment variables

  && CLOUDSCALE_IMAGE=ubuntu-18.04 \
  docker-machine create \
     --driver cloudscale \

See docker-machine create --driver cloudscale --help for a complete list of all supported environment variables.

Using cloud-init

User data (cloud-config for cloud-init) to use for the new server. Needs to be valid YAML.

From File

$ cat <<EOF > /tmp/my-user-data.yaml
  - path: /test.txt
    content: |
      Here is a line.
      Another line is here.
$ docker-machine create \
  --driver cloudscale \
  --cloudscale-token=... \
  --cloudscale-userdatafile=/tmp/my-user-data.yaml \

From Command Line

$ docker-machine create \
  --driver cloudscale \
  --cloudscale-token=... \
  --cloudscale-userdata "`echo -e "#cloud-config\nwrite_files:\n  - path: /test.txt\n    content: |\n      my cli user-data test\n"`" \


  • --cloudscale-token: required. Your project-specific access token for the API.
  • --cloudscale-image: The slug of the image to use, see Images API for how to get a list of available images (defaults to ubuntu-18.04). A list of operating systems supported by docker-machine can be obtained here.
  • --cloudscale-flavor: The flavor of the server, see Flavor API for how to get a list of available flavors (defaults to flex-8-4).
  • --cloudscale-zone: The zone in which the server will be created, see Regions and Zones for how to get a list of available zones (defaults to your default zone)
  • --cloudscale-volume-size-gb: The size of the root volume in GB (defaults to 10).
  • --cloudscale-ssh-user: The SSH user (defaults to root).
  • --cloudscale-ssh-port: The SSH port (defaults to 22).
  • --cloudscale-no-public-network: Disables the public network interface.
  • --cloudscale-use-private-network: Enables the private network interface.
  • --cloudscale-use-ipv6: Enables IPv6 on public network interface.
  • --cloudscale-server-groups: the UUID identifying the server group to which the new server will be added, option can be repeated.
  • --cloudscale-anti-affinity-with: the UUID of another server to create an anti-affinity group with that server or add it to the same group as that server.
  • --cloudscale-userdata: string containing cloud-init user data
  • --cloudscale-userdatafile: path to file with cloud-init user data
  • --cloudscale-volume-ssd: size of an additional SSD volume to be attached to the server, option can be repeated.
  • --cloudscale-volume-bulk: size of an additional bulk volume to be attached to the server, option can be repeated.


Fork this repository, yielding<yourAccount>/docker-machine-driver-cloudscale.

# Get the sources of your fork
$ git clone '<yourAccount>/docker-machine-driver-cloudscale.git'
$ cd docker-machine-driver-cloudscale

# Build it locally
$ make build

# Make the binary accessible to docker-machine
$ export PATH="$PATH:$PWD/bin"

# Print help text including options
$ docker-machine create --driver cloudscale --help

# To create a test snapshot release
$ make snapshot

Integration Tests

In order to run the integration test suite, please make sure that:

  1. docker, docker-machine and docker-machine-driver-cloudscale are available in your $PATH
  2. bats-core is available in your $PATH
  3. Your API Token is exported as CLOUDSCALE_TOKEN

If all of the above is fullfilled, invoke the test suite by calling:

make integration


This driver is based on the great work of: