Start Container
Path Parameters
Container ID (Docker ID or database ID)
Request Headers
Bearer token for authentication
Response
Success message: “container started” or “container recreated and started”
Container Docker ID
Container name
New status: “running”
True if container was recreated (only present when recreated)
True if volume data was preserved (only present when recreated)
Status Codes
- 200 OK - Container started successfully
- 401 Unauthorized - Missing or invalid API token
- 403 Forbidden - Guest session expired or insufficient permissions
- 404 Not Found - Container not found
- 500 Internal Server Error - Failed to start container
Examples
Response Example
Recreation Response
Automatic Recreation: If a container was removed from the Docker host but still exists in the database, starting it will automatically recreate the container with the same configuration. Your data is preserved if the volume still exists.
Stop Container
Path Parameters
Container ID (Docker ID or database ID)
Request Headers
Bearer token for authentication
Response
Success message: “container stopped”
Container Docker ID
Container name
New status: “stopped”
Status Codes
- 200 OK - Container stopped successfully
- 401 Unauthorized - Missing or invalid API token
- 404 Not Found - Container not found
- 500 Internal Server Error - Failed to stop container
Examples
Response Example
For Agents: Stopping an agent (ID with
agent: prefix) disconnects the WebSocket connection but doesn’t affect the remote server. The agent can reconnect automatically.Delete Container
Path Parameters
Container ID (Docker ID or database ID)
Request Headers
Bearer token for authentication
Response
Success message: “container deleted”
Container Docker ID
Container database ID
Container name
Status Codes
- 200 OK - Container deleted successfully
- 401 Unauthorized - Missing or invalid API token
- 404 Not Found - Container not found
- 500 Internal Server Error - Failed to delete container
Examples
Response Example
Update Container Settings
Path Parameters
Container ID (Docker ID or database ID)
Request Headers
Bearer token for authentication
Must be
application/jsonRequest Body
New container name (1-64 characters, alphanumeric and hyphens)
Memory allocation in MB (validated against tier limits)
CPU allocation in millicores (validated against tier limits)
Disk quota in MB (validated against tier limits)
Response
Success message: “settings updated”
Whether the container was restarted due to resource changes
Status Codes
- 200 OK - Settings updated successfully
- 400 Bad Request - Invalid parameters
- 401 Unauthorized - Missing or invalid API token
- 404 Not Found - Container not found
- 500 Internal Server Error - Failed to update settings
Examples
Response Example
Resource Changes: Changing memory, CPU, or disk resources requires recreating the container with gVisor. The container is automatically stopped, removed, and recreated with the new limits. Your data is preserved on the volume.
Role Reinstallation: If disk size changes, development tools (role packages) are automatically reinstalled in the background. The container is usable immediately while installation completes.
Error Responses
All management endpoints return consistent error responses:- “unauthorized” - Invalid or missing API token
- “container not found” - Container ID doesn’t exist or you don’t have access
- “not authorized” - Container belongs to another user
- “guest session expired” - Guest users cannot restart expired containers
- “failed to start container” / “failed to stop container” - Docker operation failed
WebSocket Events
All container management operations trigger real-time WebSocket events:container_startedcontainer_stoppedcontainer_deletedcontainer_updated
See Also
- Create Container - Create new containers
- List Containers - View all containers
- Terminal API - Connect to container terminals