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 (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?

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

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 ;

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