Creation and configuration of new droplets

August 7, 2016 257 views
Deployment DigitalOcean

I want to be able to automatically create new droplets using custom configurations without the need to configure the server myself, for example:

I want a server with:

  • Nginx installed with some default config files.
  • Postgresql installed with the initial installation by default.
  • 1gb of swap memory
  • Etc...

I'm not really sure if there is some software that already do this for me, I know I can write some scripts to do everything for me, but. maybe there is something that already do that.

1 Answer
kamaln7 MOD August 8, 2016
Accepted Answer


There are a few different ways to do that—I'll list the most common ones. You can:

  1. spin up a new Droplet, install, for example, Nginx on it, and apply the default config files that you prefer, and take a snapshot of it. Then, whenever you want to spin up a new web server Droplet, you can just choose the said snapshot and quickly get up and running.
  2. use a configuration management software to automate deploying and configuring new servers. Take a look at the following tutorial series:
  3. use User Data to run a script of your own when the Droplet first boots that installs and sets everything up the way you like it.
Update CloudInit link and conclusion Metadata is a service provided to DigitalOcean droplets that allows a droplet to access data about itself, i.e. its metadata. Examples of available droplet metadata include user-provided user data, droplet ID, data center region,...
Have another answer? Share your knowledge.