Reinstall your servers
Warning: The operation will always cause a full disk wipe. All data will be lost! Proceed with caution.
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, thesshKey
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 includekernelParam
,partitions
,sshKey
Behavior: The originally provisioned OS will be reinstalled, including any specified
kernelParam
, custompartitions
, and/orsshKey
.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?