Hey, is there a way I can run a shell script I created on my droplet through the API?
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!
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.
Click below to sign up and get $200 of credit to try our products over 60 days!
You can run a shell script during the Droplet creation process using the user-data option described here:
Once the Droplet is created, the DigitalOcean API would not have access to run any commands on the Droplet itself, as the Droplets are unmanaged meaning that only you would have root access to them.
You could run your shell scripts in a variety of different ways:
There are other wise of doing this as well, feel free to share more information about your use case and I will be happy to make more suggestions!