Question

New droplet in users account based on custom image

I’d like users on my website to be able to click a link and be taken to the Digital Ocean site (where they register or login), pay for and confirm a new droplet based on a custom image I’ve created, then return back to my site the IP address.

During the flow above they should set their own SSH pw as it’s their new droplet from my image in their account.

I’d like the droplet to be the LAMP stack plus run some extra shell commands to top up the setup. Would also like to have this as infrastructure as code, ie via YAML or similar so is transparent and easily updatable.

What would be the best way of achieving this?


Submit an answer


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!

Sign In or Sign Up to Answer

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.

John Gannon
DigitalOcean Employee
DigitalOcean Employee badge
September 3, 2020
Accepted Answer

Hi! Thanks for the question. Best place to get started is marketplace.digitalocean.com/vendors. If you’re most interested in the technical aspects of how to build an app to make it Marketplace ready, you can visit https://github.com/digitalocean/marketplace-partners. Let me know if you have any other questions.

Thanks for the answers, I’d agree being a vendor on the marketplace is the way to go. So, earlier today I sent a vendor application and next steps are a call to discuss further.

Re the user-data option, that would totally work, but want to avoid the user needing to copy & paste anything, for a more seamless flow.

My biggest question is how to keep the image up to date to ensure the user always has the freshest start. Guess it’s best to base my image on the LAMP image, let it remain set in time but the extra commands ran include apt-get update && apt-get upgrade?

Bobby Iliev
Site Moderator
Site Moderator badge
September 3, 2020

Hi there @mattpass,

Yes, indeed I fully agree with @johngannon that the Marketplace is a great way to go, as your users will be able to install your image with just a click of a button.

Another option would be to use “user data” as described here:

https://www.digitalocean.com/docs/droplets/how-to/provide-user-data/

That way you would have to create 1 script and ask your users to add it to the user data filed during the Droplet creation process. That would cover your requirement for the process to be transparent and easily updatable.

Hope that this helps! Regards, Bobby

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.

Become a contributor

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow — whether you're running one virtual machine or ten thousand.

Learn more
DigitalOcean Cloud Control Panel