Report this

What is the reason for this report?

How to create custom reusable vps

Posted on August 16, 2014

Hi, Im new to root access vps’s etc so please bare that in mind.

I’m trying to setup a reusable droplet. I want to be able to spin up droplets with LEMP Stack, Wordpress & Varnish preinstalled. I’ve done this already using snapshots but the MySQL Password is the same on every droplet. Is there anyway I can get them auto generated so their different on every preset droplet I spin up?

All responses are appreciated



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.

Hey Jake - Currently you can’t run post droplet creation scripts that I know of. Booting up a snapshot on a new droplet is similar to waking up your computer from sleep mode, it’s just a point in time that the machine resumes operations from.

What I’d recommend though is to add that as the last part of your droplet creation from your control panel. You can use a tool like Ansible to generate the login details for you and report them back or have them emailed to you. For the control panel you can issue the API commands to create the droplet and then run the Ansible tasks that you need with ansible-playbook to set the new MySQL login and create a new SFTP login.

Related links:

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.