Skip to main content
A setup script runs once, on the first boot after a Linux server is built. Use it to install packages, create users, write config files or run your own commands, so the server comes up ready. A saved script does nothing until you pick it while ordering a server or reinstalling one. Scripts are saved per team, so switch to the right team first.

Add a script

Click “Scripts” under “Setup” in the console sidebar. Scripts page with Add Script action
1

Open the form

Click Add Script.Scripts setup dialog
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.
You can also click 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, users and ssh_authorized_keys are 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-config document must be valid YAML and a list of settings such as packages: or runcmd:. Otherwise the console shows an error before saving.
  • A cloud-config document saved as a Bash script is refused. Choose the Cloud-config type 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.
Scripts aren’t supported on Windows. The section is hidden for Windows operating systems, and an order or reinstall that includes a script for Windows is refused.
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 click Save.
  • Delete: type the script’s name and click Delete.
  • Move to team: move the script to another of your teams. Only the team owner sees this, and only with more than one team.
Servers already built with the script aren’t affected. Whatever it did stays as it is.

Team permissions

The team owner can always manage scripts. Members need these permissions (see Team Members and Roles):

Common questions

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.
No. Scripts only run when a server is ordered or reinstalled. On a running server, run the commands yourself.