DigitalOcean API and CLI (doctl)

DigitalOcean API and CLI (doctl) subscription active
You will receive email notifications for new publications on DigitalOcean API and CLI (doctl).
59 Results
  • Question

    error msg="Remotedialer proxy error" error="dial tcp i/o timeout"

    For two days now when I TRY to access my DO domains I keep getting the following error: "error msg="Remotedialer proxy error" error="dial tcp i/o timeout" When I did a WHOIS it said...
    Accepted Answer: Hi, It sounds like that port 8080 is closed, I will advise you to follow the steps here on how to open the port:
    2 By gerbreown DigitalOcean API and CLI (doctl)
  • Question

    How to update DNS records? Receiving "Data needs to end with a dot (.)"

    bash doctl compute domain records list do.${ME}.com ID Type Name Data Priority Port TTL Weight 12345678 CNAME my-domain ... 0 0 1800 0 But: ``...
    Accepted Answer: Hi there @dazwilkin, I was able to reproduce this at my end as well, seems to affect CNAME records and NS records. I will report this, but in the meantime, I found the following workaround, just pass the data as well:...
    1 By dazwilkin DigitalOcean API and CLI (doctl) API
  • Question

    How to docker push to DigitalOcean private container registry for a Remote User

    I have successfully setup the private Docker registry with authentication. However this authentication is only for docker pull command. Doing a docker push command gives me denied: requested access to the resource i...
    Accepted Answer: Docker Registry is an application that manages storing and delivering Docker container images. Docker images guarantee consistent runtime environment through virtualization, but building an image can take time— regist...
    2 By favas Container Docker DigitalOcean API and CLI (doctl)
  • Question

    How to deploy a droplet on DigitalOcean with Terraform?

    I am having a problem deploying a droplet on DigitalOcean with Terraform. I followed the documentation in the official Terraform website but it does not work. I am getting the following error: Error: Error creating dr...
    Accepted Answer: Hi there, I recently deployed a droplet with Terraform on my own and had the same issue. However, I fixed it by doing the following: 1st part (I assume you already did that) 1. Go to your Control Panel and click on AP...
    1 By xenlet Terraform DigitalOcean API and CLI (doctl)
  • Question

    doctl command is missing required arguments

    When trying to run doctl compute droplet-action power-off <droplet id> --wait true; I get: Error: (droplet-action.power-off) command is missing required arguments Issue is not related to "power-off" action, it also...
    Accepted Answer: Hi there @netomarchiori, I don't think that the --wait is a valid argument. Can you share the resource where you got that flag from? You can see the available arguments for the doplet-action command here: https://www....
    2 By netomarchiori DigitalOcean API and CLI (doctl)
  • Question

    Digital Ocean Firewall Rules

    Is there any way to delete all the inbound rules from a firewall without specifying the sources via Digital Ocean API?
    Accepted Answer: Hello, @dvops I don’t think that this is currently possible with the API. You can check the docs for removing inbound rules via API: ...
    1 By dvops DigitalOcean API and CLI (doctl)
  • Question

    Change DNS records via doctl

    Is there a way to get/add/modify DNS records in Digital Ocean via doctl or another command line utility? I was unable to find anything that looked relevant via doctl help. It looks like worst case I could call the HTT...
    Accepted Answer: Hi, hope you're doing well. I did a little digging and found this documentation kinda buried on DO's site: It does look like you can ...
    1 By jacque006 DigitalOcean API and CLI (doctl) DNS Networking
  • Question

    Attach Kubernetes cluster to project

    Is there any way to create a k8s cluster inside a newly created project, or to assign it, after-the-fact, to one of the existing projects, with Terraform, doctl or another tool? I am currently writing a Terraform pro...
    Accepted Answer: You can see the DOKS documentation calls out a bit of a lack of support here, but provides a workaround: The control panel does not support assigning a cluster to a ...
    1 By servicesShrimp Kubernetes Terraform DigitalOcean API and CLI (doctl)
  • Question

    Using S3.php to handle Space actions, deleteObject fails.

    Hello, Is everyone here using the S3.php to handle Space actions from PHP code? amazon-s3-php-class ( Everything is working so far beside the deleteObejct call, When I try t...
    Accepted Answer: solved it, no idea what I did, but I changed a lot and now it works.
    1 By ThisUser32 DigitalOcean Spaces DigitalOcean API and CLI (doctl) PHP Development DigitalOcean Object Storage Programming Project
  • Question

    Create Droplet via API then get public IP address and store as a variable

    Hi trying to create a bash script that creates a droplet, then once created gets the IP address of that droplet and store it as a variable to I used that IP address throughout the remaining bash script. Any pointers ...
    Accepted Answer: Hello, You could do something like this: First get create the new Droplet: ```bash !/bin/bash Here make sure to update your Token and the other Droplet details like the region, your SSH key and etc. newdroplet=$(curl ...
    1 By VicJones DigitalOcean API and CLI (doctl)
  • Question

    Droplet not showing after destroy to reset it

    I've searched through the web to reset my droplet and advised to Open droplet options and click on destroy to reset. I clicked destroy and now I am not being able to see the droplet anymore. Can you please guide me fr...
    Accepted Answer: Hi @junaidqureshi, Destroying the droplet actually deletes it and everything on it. If you want to get it back and have created Snapshots, you can actually restore it from your control panel. If you haven't created an...
    1 By junaidqureshi DigitalOcean API and CLI (doctl) DigitalOcean Accounts
  • Question

    V2 create API POST call with Google Apps scripts

    I am trying to make a POST call work from within Google Apps scripts into the V2 create API. I have it working, but it doesn't execute the user_data formatted in either cloud-init or just as shell commands. Nothing sh...
    Accepted Answer: I discovered that you can use the Unicode encoding to put the LF in the json, and all it well now. For those wondering the code is : \u000A so "user_data" needed to look like this "user_data": "#!/bin/bash \u000A ...
    1 By FikesMedia DigitalOcean API and CLI (doctl) API JavaScript
  • Question

    Ho to create database cluster with trusted sources with CLI or terraform ?

    I can not figure out how to create a managed database and set trusted sources with CLI (docli) or better Terraform. From the documentation: Endpoint: "" Body: { "name": "bac...
    Accepted Answer: Hello, This was very recently implemented to the DigitalOcean API, now the API supports managing a database cluster’s firewall rules (or “trusted sources” as they are called in the control panel). You can use this en...
    1 By marekgmyrek DigitalOcean API and CLI (doctl) DigitalOcean Managed PostgreSQL Database
  • Question

    Firewall droplet_id list

    VERSION DETAILS Terraform v0.12.13 + v2.29.0 + provider.digitalocean v1.7.0 + provider.null v2.1.2 + provider.template v2.1.2 PROBLEM I have the following terraform file which defined a DigitalOcean Clo...
    Accepted Answer: The best way to combine to lists of attributes using Terraform >= 0.12 syntax is to use the concat function. From the docs ( concat takes two or more ...
    1 By goodwillhacking Terraform DigitalOcean API and CLI (doctl)
  • Question

    Is it possible to tag a snapshot using the API?

    I see that in the snapshots API, there is a list of "tags" per snapshot. Is it possible to add a tag to a snapshot using the API? Also, is it possible to fetch all the snapshots with a certain tag?
    Accepted Answer: Hi @firedragondol, sorry for the confusion. You can tag Droplet Snapshots via the API - they're considered an image, so you would pass "resource_type":"image" Hope this helps!
    3 By firedragondol DigitalOcean API and CLI (doctl)
  • Question

    Not receiving metric data. Last working Just now

    Centos 7 droplet with freshly upgraded do-agent. How do I troubleshoot do-agent to resolve this?
    Accepted Answer: OK, apparently it had to do with not allowing enough sites to run JavaScript. Because of course I'm going to have to allow 15 different sites to run JavaScript to have one site work correctly.
    4 By jtrigg DigitalOcean API and CLI (doctl)
  • Question

    Progress Indicator for DOCTL Commands

    I'm building a script that automatically will shutdown a droplet before it creates a snapshot, and then powers it back on. The snapshot takes time to complete, but I think it would be great to see progress indicator. ...
    Accepted Answer: When scripting with doctl you can pass the --wait flag to Droplet "action" commands in order to block until the action has completed. For example: doctl compute droplet-action power-off --wait <^><droplet-id><^> Unf...
    1 By aaronmweiss DigitalOcean Linux Basics DigitalOcean API and CLI (doctl)
  • Question

    How can I perform Add to Region and Restore Droplet actions on a backup or snapshot?

    The GUI offers "Add to Region" and "Restore Droplet" for a snapshot. How can I perform those actions on a backup or snapshot through the API?
    Accepted Answer: After you take a snapshot of a Droplet, you can find the ID of that snapshot via the API by querying the /v2/images?private=true endpoint ( ...
    1 By csabatothus DigitalOcean API and CLI (doctl)
  • Question

    Push an image to DigitalOcean through Bitbucket pipelines

    I try to push an image to DigitalOcean through bitbucket pipelines but I have a problem with doctl ``` image: atlassian/default-image:2 pipelines: branches: stage: - step: name: Deploy to registr...
    1 By SmallAquaFish DigitalOcean API and CLI (doctl) Deployment DigitalOcean Container Registry (DOCR)
  • Question

    DigitalOcean OAuth2 lacks PKCE for Mobile App integration

    Hi, Last year I created a ticket on DigitalOcean's OAuth2 implementation However, OAuth2 PK...
    1 By miniyarov API DigitalOcean API and CLI (doctl)