Skip to content

Init Script Plugin

Overview

The Init Script plugin records sequences of panel API actions and replays them as an installation script. This is useful for automating server setup on fresh installs.

Plugin ID: init-script (no external service installed)

All endpoints require superuser.

Presets

A preset is a named recording target. You can have multiple presets (e.g. "LEMP Stack", "WordPress Server").

# List presets
GET /api/init-script/presets

# Create preset
POST /api/init-script/presets
{ "name": "WordPress Setup", "description": "Standard WP + MySQL" }

# Delete preset
DELETE /api/init-script/presets/:id

# Toggle recording for a preset
POST /api/init-script/presets/:id/toggle-recording

When recording is active, every authenticated API call is stored as a step in the preset.

Recordings

# List recorded steps
GET /api/init-script/presets/:id/recordings

# Delete a recording
DELETE /api/init-script/recordings/:id

Export

GET /api/init-script/presets/:id/export

Returns a shell script or JSON payload that replays all recorded actions in order.

Share

POST /api/init-script/share
{ "preset_id": 1, "expires_in": 86400 }

Returns a shareable URL to download the init script without authentication.