doctl installation
| Command |
Description |
brew install doctl |
Install with Homebrew (MacOS) |
sudo snap install doctl |
Install with Snap (Debian/Ubuntu) |
sudo pacman -S doctl |
Install with Pacman (Arch Linux) |
sudo dnf install doctl |
Install with DNF (Fedora) |
Global flags
| Flag |
Description |
--context <name> |
Use a specific auth context |
--output json |
Format output as JSON |
--help |
Show help |
--access-token <token> |
API V2 access token |
--api-url <url> |
Override default API endpoint |
Authentication
| Command |
Description |
doctl auth init |
Authenticate |
doctl auth list |
List authentication contexts |
doctl auth switch |
Switch to another context |
doctl auth remove |
Remove a context |
Add --context <name> to any of these, or to any
other command, to work in a named context.
| Command |
Description |
doctl account get |
Retrieve account information |
doctl account ratelimit |
Retrieve rate limit info |
Generic resource subcommands
Where <res> is a resource below and <id> is
an id or a name:
| Command |
Description |
doctl <res> list |
List all of this type |
doctl <res> get <id> |
Show one resource |
doctl <res> create |
Create a new resource |
doctl <res> update <id> |
Update a resource |
doctl <res> delete <id> |
Delete a resource |
Billing
| Resource |
Description |
balance |
Account balance |
billing-history |
Billing history |
invoice |
Invoices |
Kubernetes specific commands
After doctl kubernetes cluster kubeconfig:
| Command |
Description |
show <id> |
Print the kubeconfig |
save <id> |
Add to ~/.kube/config |
remove <id> |
Drop from ~/.kube/config |
Other commands
| Command |
Description |
doctl completion <shell> |
Generate autocompletion script |
doctl help |
Show help |
doctl help <command> |
Show help for a specific command |
doctl version |
Show version information |
Resources
| Resource |
Description |
apps |
DigitalOcean App Platform apps |
compute droplet |
Droplets (virtual servers) |
compute droplet-action |
Snapshot, reboot, etc. |
compute cdn |
Content Delivery Networks |
compute certificate |
SSL certificates |
compute domain |
Domains |
compute domain records |
DNS records |
compute floating-ip |
Floating IPs |
compute firewall |
Firewalls |
compute image |
Custom images |
compute load-balancer |
Load balancers |
compute volume |
Block storage volumes |
databases |
Managed database clusters |
kubernetes cluster |
Managed Kubernetes clusters |
monitoring alert |
Alert policies |
monitoring uptime |
Uptime checks |
projects |
Projects |
registry |
Private container registries |
serverless |
Serverless Functions |
vpcs |
Virtual private clouds |
Bash autocompletion
doctl completion bash | sudo tee /etc/bash_completion.d/doctl