Skip to main content

How to Install dtctl

dtctl ships as a single self-contained binary for Windows, macOS, and Linux, and is also available as a Docker image and a snap. Choose whichever method fits your environment, then configure it.

Download a release binary​

Official builds are published on the releases page as per-OS archives (dtctl-<version>-<os>-<arch>). Download the archive for your platform, extract the dtctl binary, and place it somewhere on your PATH.

Linux / macOS

# Extract and install (example for a linux-amd64 archive)
tar -xzf dtctl-<version>-linux-amd64.tar.gz
sudo mv dtctl /usr/local/bin/
dtctl version

Windows

Extract the .zip archive and move dtctl.exe to a folder on your PATH (or add its folder to PATH), then run dtctl version in PowerShell or Command Prompt.

Docker​

A container image is published to Docker Hub:

docker pull dtcloudnow/dtctl:latest
docker run --rm -it dtcloudnow/dtctl:latest version

To persist your credentials between runs, mount a config directory into the container:

docker run --rm -it -v "$HOME/.config/dtctl:/root/.config/dtctl" dtcloudnow/dtctl:latest auth init

Snap (Linux)​

On distributions with snap:

sudo snap install dtctl

Build from source​

dtctl is written in Go. With a recent Go toolchain installed:

git clone https://github.com/dtcloudnow/dt-cli.git
cd dt-cli
go build -o dtctl ./cmd/dtctl
./dtctl version

Configure dtctl​

Authenticate with a DT Cloud API key, then select the region and project you want to work in:

# 1. Authenticate (you are prompted for an access key and a secret key).
# Generate a key in the console: https://console.dt.net.tr/api-key/create
dtctl auth init

# 2. Select the region (server) to operate in.
dtctl region init # sets your first available region
dtctl region list # or list regions and switch explicitly
dtctl region change 1

# 3. Confirm / switch the active project.
dtctl project list
dtctl project change <project-id>

Configuration is stored in ~/.config/dtctl/config.yaml (owner-only permissions). You can point at a different file with the global --config flag, and every setting can also be supplied via DTCLOUD_ environment variables.

Verify everything works:

dtctl virtual-machine list

See the command reference for every available command.