What is Enable User Data?

  • Posted on October 29, 2014
  • danielmdAsked by danielmd

What does the Enable User Data option provide? I don’t understand the meaning.

Show comments

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.

The Enable User Data setting allows you to pass arbitrary data into the user-data key of the DigitalOcean Metadata service. You can then retrieve that data on your droplet by running:

curl -w "\n"

On it’s own, that’s not very exciting but it allows for some interesting things when you combine it with a program called CloudInit that is installed by default on Ubuntu 14.04 and up as well as CentOS 7. It processes the user data and runs it on the droplet. For instance, you could put a bash script in there and it will be run on first boot. People use this to do a lot of initial set up on their droplets like installing packages. For more info, see this tutorial: