Add a script
Click “Scripts” under “Setup” in the console sidebar.
1
Open the form
Click 
Add Script.
2
Name it and pick a type
Enter a
Name and choose a Type: Cloud-config or Bash script. The editor starts with #cloud-config or #!/bin/bash.3
Write the script
Write or paste it into the editor.
4
Save
Click
Create.Create Script in the order or reinstall form. The new script is selected for you.
Script types
When a
Cloud-config document is combined with the image’s own settings:
- Lists such as
packages,runcmd,bootcmd,write_files,usersandssh_authorized_keysare added together. Your entries come after the image’s, and exact duplicates are skipped. - For any other setting both define, your value wins.
Limits
Name: up to 64 characters, unique in your account.- Script content: up to 1 MiB.
- A
Cloud-configdocument must be valid YAML and a list of settings such aspackages:orruncmd:. Otherwise the console shows an error before saving. - A cloud-config document saved as a
Bash scriptis refused. Choose theCloud-configtype instead.
Scripts often hold passwords or tokens. We store script content encrypted, but anyone in your team with
View setup scripts can read it.Run a script on a server
Saved scripts appear in the “Setup Script” section when you order a server (“Order a Server”) or reinstall one (the server’s “Reinstall” tab, see Server Reinstallation). Click a script to select it, and click it again to clear it. You can pick one script per server. If a server’s “Reinstall” tab has no “Setup Script” section, that server can’t run scripts.Edit or delete a script
Open the menu at the end of the script’s row.Edit: change the name, type or content, then clickSave.Delete: type the script’s name and clickDelete.Move to team: move the script to another of your teams. Only the team owner sees this, and only with more than one team.
Team permissions
The team owner can always manage scripts. Members need these permissions (see Team Members and Roles):Common questions
My script didn't seem to run. How do I check?
My script didn't seem to run. How do I check?
Log in to the server and read its first-boot logs under
/var/log/. Our services are unmanaged, so we can’t debug the script for you.Can I run a script on a server that's already running?
Can I run a script on a server that's already running?
No. Scripts only run when a server is ordered or reinstalled. On a running server, run the commands yourself.