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 (under the users account - from a single button press on my web app). After the droplet has been started, I want to run a shell script on the droplet to configure and run another application on the users droplet.

How can I go about doing this, can someone point me in the right direction?

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
1 answer

Hi @paulyg321,

For using DigitalOcean’s API in scripts, I’ll recommend using ‘doctl’ it will provide you control over your account. Basically you’ll be able to go about doing everything you mentioned in the question. You can read more upon it here ;

https://www.digitalocean.com/community/tutorials/how-to-use-doctl-the-official-digitalocean-command-line-client

The tutorial shows you basic usage of the doctl service and how you can manage everything with it. It’s up to you to now embed it in your script anyway you want.

Regards,
KDSys

by Marko Mudrinić
DigitalOcean's web based control panel provides a convenient, point-and-click interface for managing Droplets. There are many times, however, when a command-line tool may be a preferable alternative. doctl, the official DigitalOcean command-line client, leverages the DigitalOcean API to provide access to most account and Droplet features.
Submit an Answer