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).
42 Results
  • Question

    error msg="Remotedialer proxy error" error="dial tcp 178.128.82.167:8080: 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 178.128.82.167:8080: i/o timeout" When I did a WHOIS 178.128.82.167 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: https://www.digitalocean.com/community/tutorials/how-to-set-up-a-firewall-with-ufw-on-ubuntu-18-04
    2 By gerbreown DigitalOcean API and CLI (doctl)
  • 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:https://www.digitalocean.com/docs/kubernetes/#limits The control panel does not support assigning a cluster to a ...
    1 By servicesShrimp Kubernetes Terraform 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: https://developers.digitalocean.com/documentation/v2/#remove-rules-from-a-firewall ...
    1 By dvops 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

    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

    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

    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

    Firewall droplet_id list

    VERSION DETAILS Terraform v0.12.13 + provider.aws 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 (https://www.terraform.io/docs/configuration/functions/concat.html): concat takes two or more ...
    1 By goodwillhacking Terraform 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

    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: "https://api.digitalocean.com/v2/databases" 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

    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

    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 (https://developers.digitalocean.com/documentation/v2/#list-a-user-s-images). ...
    1 By csabatothus DigitalOcean API and CLI (doctl)
  • Question

    404 request error on 'doctl database get' command from bash script

    I'm using a bash script to provision some database instances. As part of the script, I have a line that retrieves the status of the database instance in a for-loop: currentState=$(doctl databases get ${dbID_array[z]} ...
    1 By thomassantosh Databases DigitalOcean API and CLI (doctl)
  • Question

    How to enter recovery mode via API

    Is there any way to set droplet into "Boot from recovery mode" via API ? I want to make a disk changes from recovery mode for a lot of servers. And set all of them into recovery mode manually from web interface is not...
    0 By shmel API DigitalOcean API and CLI (doctl)
  • Tool

    DoAct

    A Terraform module for hosting your own runner for CI/CD on Digital Ocean to run jobs in your GitHub Actions workflows. 🚀
    By itsksaurabh Terraform DigitalOcean DigitalOcean API and CLI (doctl) CI/CD Applications
  • Question

    How do I set loadbalancer name from kubernetes manifest?

    In our managed k8s cluster, we have deployed services of type LoadBalancer. First we apply the manifest for the service (kubectl apply -f svc-lb.yml) and then adjust some additional properties (using Digital Ocean web...
    0 By hejeroaz DigitalOcean Managed Kubernetes DigitalOcean Managed Load Balancers DigitalOcean API and CLI (doctl)
  • Question

    How to use Digital Ocean Space

    Hello, Consider I have a android app with number of users . I am using firebase auth. I want to integrate Digital ocean spaces for storing documents and images. Is the below scenario possible , if yes , can someone po...
    0 By bhardwajrajesh1973 DigitalOcean Spaces DigitalOcean API and CLI (doctl)
  • Question

    How to signup users and create instances for users through CLI or an API

    Hi all, I have an app that I’m creating where I’d like users to be able to signup for digital ocean using forms from my app. After the user is signed up, I’d like to be able to run a script to start up a droplet (unde...
    1 By paulyg321 API DigitalOcean API and CLI (doctl) DigitalOcean
  • Question

    How can create Digital ocen Snapshot API

    Hi i want to know how can i create the snapshot api in digital ocen platform?
    1 By gopi1996 DigitalOcean API and CLI (doctl)
  • Question

    How to restore a deleted droplet from snapshot through API?

    I have a droplet, took a snapshot and deleted it. How to restore the droplet through API?
    1 By cto3a70ae5eca1d2b3153833c5 DigitalOcean API and CLI (doctl)