Reinstall your servers

To reinstall your servers, use the endpoint provided in the API documentation. Ensure you obtain the required UUID from the POST /servers response body. You may pass optional parameters such as:

  • name (hostname)

  • os (operating system), which must include a slug property. If the OS is not Windows or Talos, the sshKey is mandatory.

  • kernelParam (optional)

  • partitions (optional)

  • sshKey (essential if the OS is not Windows or Talos)

  • postInstallScript (must be a valid Shell script)

Usage Scenarios

  • Parameters:

    • name: (string) Optionally include kernelParam, partitions, sshKey

  • Behavior: The originally provisioned OS will be reinstalled, including any specified kernelParam, custom partitions, and/or sshKey.

    • If you pass a new sshKey, it replaces the original.

Example PATCH request with all of the options

{
  "name": "host.example.com",
  "os": {
    "slug": "ubuntu-2404-lts",
    "kernelParams": [
      {
        "key": "test-kernel-param-key",
        "value": "test-kernel-param-value"
      }
    ],
    "partitions": [
      {
        "target": "/custom",
        "filesystem": "ext4",
        "size": 10240
      }
    ]
  },
  "sshKey": [
    "ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBHo8IaPkQ6UnDZvi4F4RBSouRa6Gtysdg2EF+SIXheVF2SGBQ2uH7RfDjXRfvq4VpHJrKYs4kWfNoHQg8ZG6PH4= ecdsa-key-20240131"
  ],
  "postInstallScript": "#!/bin/bash\necho \"Hello world!\" > /root/test.txt"
}

Last updated

Was this helpful?