Skip to Content
SeyloDocs

Set a service's crash policy

POST
/api/v1/services.setCrashPolicy

Restart on or off after a crash, and with restart on, whether to stop after N crashes in a row (0 = never). The wait between restarts is a fixed 5 seconds. Applies to running containers right away.

Needs services.update on the service (a grant on its project covers it). Available to MCP clients and the assistant.

Authorization

cookieseylo_session<token>

Request Body

application/json
  1. body
serviceId*string

Panel-issued id.

Match^[a-z0-9]{16}$
restart*boolean

Off = stay stopped after the first crash.

stopAfterCrashes*integer
Range0 <= value <= 1000

Response Body

Success.

application/json
  1. response
crashPolicy*
restartDelaySeconds*integer
Range0 <= value
Example Request
curl -X POST 'https://example.com/api/v1/services.setCrashPolicy' \  -H 'Content-Type: application/json' \  -d '{  "serviceId": "string",  "restart": true,  "stopAfterCrashes": 0}'
Example Response
{  "crashPolicy": {    "restart": true,    "stopAfterCrashes": 0  },  "restartDelaySeconds": 0}