v51

OpenAPI 3.0.0raw.githubusercontent.com2026-08-01267339950.6 KB
VPS: Post-install scripts

Create post-install script

Add a new post-install script to your account, which can then be used after virtual machine installation.

The script contents will be saved to the file /post_install with executable attribute set and will be executed once virtual machine is installed. The output of the script will be redirected to /post_install.log. Maximum script size is 48KB.

Use this endpoint to create automation scripts for VPS setup tasks.

post/api/vps/v1/post-install-scripts

Request body

namestring required

Name of the script

contentstring required

Content of the script

Example request

{
  "name": "My Script",
  "content": "#!/bin/bash\n\necho 'Hello, World!'"
}

Response

Success response

idinteger

Post-install script ID

namestring

Name of the script

contentstring

Content of the script

created_atstring date-time
updated_atstring date-time

Example response

{
  "id": 325,
  "name": "My Setup Script",
  "content": "#!/bin/bash\\napt-get update\\napt-get install -y nginx",
  "created_at": "2025-02-27T11:54:22Z",
  "updated_at": "2025-03-19T11:54:22Z"
}