Cloud-init is an open source project compatible with most Linux distributions. Vultr instances created before 2017 had this software installed by default. The purpose of Cloud-init is to help handle early initialization of a cloud instance, which includes tasks such as disk-resizing and network configuration. Cloud-init also has a datasource feature (known as userdata) which describes configuration settings of the cloud instance to Cloud-init. When Cloud-init detects userdata, it applies the given settings to the cloud instance.
Please note, Cloud-init is third-party software and is not officially supported by the Vultr team. For simple configurations, we recommend using our startup script feature instead of custom Cloud-init data. Startup scripts can be added from within the Vultr Control panel.
If you decide to install Cloud-init on your instance, you may find the following examples helpful.
Cloud-init data can be specified when launching a Vultr cloud instance. Listed below are several example snippets. For more examples, see the official cloud-init documentation.
#cloud-config write_files: - path: "/root/my_file.txt" permissions: "0644" owner: "root" content: | Here is some sample content.
#cloud-config bootcmd: - "/bin/echo sample > /root/my_file.txt"
#cloud-config package_upgrade: true