Is it possible to install doctl on a droplet?

Posted October 23, 2020 642 views
Node.jsDeploymentSolutionsInitial Server SetupReactDigitalOcean SpacesDigitalOcean API and CLI (doctl)DigitalOcean App Platform

Hi, I’m quite new to back-end development, coming straight from front-end. I was wondering if it’s at all possible to install doctl on a droplet to automate the creation of more droplets/apps.

My idea was to offer a dashboard to clients where they can 1 click create apps. The system would then run doctl app create commands with a dynamically generated yaml file to deploy a site to a droplet/app. Of course I’d have the logic to assign more than 1 app per droplet as they are fairly lightweight mostly-static gatsby apps.

Would this be the ideal way of doing things or am I missing something crucial? If so, should I be deploying this idea through the new App platform, spaces, or droplets?


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.

Submit an Answer
1 answer

@0000 👋

This sounds like a fun idea! It’s definitely possible to install doctl on a Droplet, or even directly in an App Platform container via the Dockerfile build strategy. In both cases, you’d probably want to follow instructions for installing it on Linux systems.

An alternative to using doctl, would be to interact with the DigitalOcean API directly or using a client package like godo. The doctl command-line tool does exactly this!

You could deploy the static Gatsby apps onto the App Platform as static sites, one per app. The controller code that is responsible for orchestrating this can also live in a dynamic service component on an App Platform app. You could run this directly in a Droplet, but the App Platform abstracts away much of the plumbing and best practices that you’d need to do yourself with a Droplet.

Happy coding!