How to add a first boot script for SolusIO VPS created via WHMCS VPS Provisioning module?

Have more questions? Submit a request

Applicable to:

  • SolusIO

Question

How to add a first boot script for SolusIO VPS created via WHMCS VPS Provisioning module?

Answer

  1. Login into admin area of WHMCS.

  2. Open Setup > Product/Services > Products/Services > Required product > Module Settings.

How to customize a product

_____SSHkey.PNG

  1. In User Data field write cloud-config script according to cloud-init documentation.
Example - script to install Docker on first boot of Ubuntu 20:

CONFIG_TEXT: #cloud-config
runcmd:
- apt-get update
- apt-get install apt-transport-https ca-certificates curl gnupg-agent software-properties-common -y
- 'curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -'
- add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" -y
- apt-get install docker-ce docker-ce-cli containerd.io -y

  1. Click Save Changes.
Example of configured script:

firstbootsscript.PNG

Articles in this section

Was this article helpful?
0 out of 0 found this helpful
Share

Comments

0 comments

Please sign in to leave a comment.