When you create a new server in Clouding, you have the option to pass user data to the instance that can be used to perform common configuration tasks or even run scripts once your server has been deployed.
If you are familiar with shell scripting, this is an easy way to send instructions to an instance at boot time. Note that adding scripts at boot time increases server deployment time.
Here are some examples of using this feature:
- Install everything needed for a LAMP/LEMP server.
- Execute a script to create a user and enable it so that only he can access by SSH.
- Run an Ansible playbook.
- Install a panel that allows its installation with a script.
If you want to know how it works, here you can see how to add your scripts.
Add UserData scripts
When you create your new server in your client panel, you will see this section at the end of the process:
If you enable it, you can add your post-deployment instructions:
In this example, what we do is an update of system packages, then we install the apache2 package and finally we start it and enable it at system startup.
If you have any questions about this tutorial or have doubts about your cloud servers in Clouding, please write to support@clouding.io We are here to help you with whatever you need!