Create daemon

Create a new daemon (background process) on your server.


POST/api/servers/{server}/daemons

Create a daemon

This endpoint allows you to create a new daemon on your server.

Required attributes

  • Name
    command
    Type
    string
    Description

    The command to execute. Max: 150 characters.

  • Name
    system_user
    Type
    string
    Description

    Must be a user present in your system (e.g., ploi or root).

  • Name
    processes
    Type
    integer
    Description

    Number of total processes to spawn.

Optional attributes

  • Name
    directory
    Type
    string
    Description

    The directory the daemon should use.

Request

POST
/api/servers/{server}/daemons
curl -X POST "https://ploi.io/api/servers/{server}/daemons" \
  -H "Authorization: Bearer {token}" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{
    "command": "echo 123",
    "system_user": "ploi",
    "processes": 1
  }'

Response

{
  "data": {
    "id": 1,
    "command": "echo 123",
    "processes": 1,
    "system_user": "ploi",
    "directory": null,
    "status": "created"
  }
}