Setup a Droplet image for mass usage on all my client websites

Posted December 27, 2015 3.3k views
UbuntuMySQLApachePHPWordPressEmailConfiguration ManagementDigitalOcean 1-Click Apps MarketplaceDeployment

As a web developer, I am often tasked with installing and setting up my clients web servers to host the website or application I am building for them. I use Digital Ocean for my own hosting and prefer to use for my clients due to the good pricing and simplicity of use. I think its a great company!

Currently for a new client site running a WordPress site I have to go in and create a new Droplet with pre-installed LAMP server on a 5gb VPS and then install WordPress or for some clients I can use the pre-built droplet that has WordPress but requires a 10gb VPS.

What my end goal is, is to have a droplet image I can use to build a client server that has all this....

  • LAMP (Ubuntu 14, PHP, Apache, MySQL)
  • WordPress installed on the root directory
  • Email servers installed and configured.
  • setup a webmail UI
  • perhaps Webmin control panel
  • ability to set domain name
  • ability to set some default email address accounts

I realize I could build a server with all this and then make a copy of it as an image and then use that image when building a new droplet. My issue with this approach is I want to automate it even more by having it where I can enter the domain name for the new project and have that domain name be used to setup the virtual hosts pointing to the WordPress install and also option to enter some default emal addresses on the domain and have them setup by default as well. THis would probably use the DO API in a PHP script where I go to a page and input the domain name and any email addresses to create. Maybe even some usernames and passwords for WP admin.

Im just curious if what I want to do is possibble? IF it is, how difficult would it be?

I have read of people using an image for a droplet but to me it has the problems:

  • passwords for Ubuntu are from the previous user
  • MySQL DB and logins are from previous user
  • WordPress login and password are from previous user
  • domain name is set to the previous site that the image was made for
  • any emails are for previous user

Any help, ideas, inpuit appreciated to point me in the right direction thank you

(keep in mind i’m not a server admin, simply a web developer)

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

Hey there,

I totally get what you are trying to do and it’s a great idea. Any time you can automate something like this is time well spent!

I’d recommend that you check out our user data functionality when creating Droplets. While that may seem daunting at first, I would say to check out some of our examples in this github repo. Specifically here is one for setting up WordPress on Ubuntu.

You could potentially add onto that the other items you are looking to have preconfigured.

Hopefully this helps :)

Thank you and please let us know if there is anything else we can do for you.

Happy coding,

Jon Schwenn
Platform Support Specialist