Skip to content
Hoody.com

The Containers API lets you list, inspect, create, update, authorize, and delete container resources owned by the authenticated user. Use these endpoints when you need a global view of all containers across every project, a scoped view of one project’s containers, or to manage a specific container’s configuration, lifecycle, or signed authorization claims.

Container records expose configuration (image, AI/Kit flags, ramdisk scope, autostart, SSH key, environment variables, comment, realm membership), current runtime state (status, lifecycle, optionally live runtime information), and proxy metadata (custom domain aliases and per-scope proxy-permissions documents).

Get all containers across all projects for the current user with pagination, filtering, and sorting. This endpoint provides a global view of all containers without being scoped to a specific project.

NameInTypeRequiredDescription
pagequerynumberNoPage number for pagination - starts from 1. Default: 1
limitquerynumberNoNumber of containers to return per page - maximum 100 items. Default: 50
sort_byquerystringNoField to sort containers by. Default: "created_at". Allowed: id, name, status, created_at, updated_at
sort_orderquerystringNoSort direction - ascending or descending. Default: "desc". Allowed: asc, desc
realm_idquerystringNoFilter by realm ID. Only returns containers that belong to this realm. Alternative to using realm subdomain in URL.
runtimequerystringNoInclude live runtime information. Accepts "true", "false", or a URL-encoded JSON string like {"displays":true}. An empty JSON object {} fetches all info. Results are cached for 2 seconds to prevent abuse.
include_proxy_domainsquerystringNoInclude proxy domains (aliases) for each container. When true, adds a proxy_domains array to each container object. Allowed: true, false
include_proxy_permissionsquerystringNoInclude the full proxy-permissions documents (container-level proxy_permissions and parent-project-level project_proxy_permissions) for each container. Returns proxy authentication group configuration including credentials — request only when explicitly needed. Auth tokens additionally require the resources.proxy_aliases permission. Allowed: true, false
include_prespawnquerystringNoInclude prespawn containers in the listing. By default, prespawn containers are excluded from results. Allowed: true, false
include_expiredquerystringNoInclude containers that have expired due to server termination. By default, expired containers are excluded from results. Allowed: true, false
include_deletingquerystringNoInclude containers currently being deleted. By default, deleting containers are excluded from results. Allowed: true, false
Terminal window
curl -X GET "https://api.hoody.com/api/v1/containers/?page=1&limit=20&sort_by=created_at&sort_order=desc" \
-H "Authorization: Bearer <token>"

Get a container by ID.

NameInTypeRequiredDescription
idpathstringYesUnique identifier of the container to retrieve
runtimequerystringNoInclude live runtime information. Accepts "true", "false", or a URL-encoded JSON string like {"displays":true}. An empty JSON object {} fetches all info. Results are cached for 2 seconds to prevent abuse.
include_proxy_domainsquerystringNoInclude proxy domains (aliases) for this container. When true, adds a proxy_domains array to the container object. Allowed: true, false
include_proxy_permissionsquerystringNoInclude the full proxy-permissions documents (container-level proxy_permissions and parent-project-level project_proxy_permissions) for each container. Returns proxy authentication group configuration including credentials — request only when explicitly needed. Auth tokens additionally require the resources.proxy_aliases permission. Allowed: true, false
Terminal window
curl -X GET "https://api.hoody.com/api/v1/containers/507f1f77bcf86cd799439011" \
-H "Authorization: Bearer <token>"

Get real-time resource usage statistics for a container including CPU, memory, disk, and network metrics. Useful for monitoring performance and troubleshooting resource issues.

NameInTypeRequiredDescription
idpathstringYesUnique identifier of the container
Terminal window
curl -X GET "https://api.hoody.com/api/v1/containers/507f1f77bcf86cd799439011/stats" \
-H "Authorization: Bearer <token>"

Get all containers for a project with pagination, filtering, and sorting.

NameInTypeRequiredDescription
idpathstringYesUnique identifier of the project
pagequerynumberNoPage number for pagination
limitquerynumberNoNumber of containers to return per page. Default: 50
sort_byquerystringNoField to sort containers by. Allowed: id, name, status, created_at, updated_at
sort_orderquerystringNoSort direction - ascending or descending. Allowed: asc, desc
runtimequerystringNoInclude live runtime information. Accepts "true", "false", or a URL-encoded JSON string like {"displays":true}. An empty JSON object {} fetches all info. Results are cached for 2 seconds to prevent abuse.
include_proxy_domainsquerystringNoInclude proxy domains (aliases) for each container. When true, adds a proxy_domains array to each container object. Allowed: true, false
include_proxy_permissionsquerystringNoInclude the full proxy-permissions documents (container-level proxy_permissions and parent-project-level project_proxy_permissions) for each container. Returns proxy authentication group configuration including credentials — request only when explicitly needed. Auth tokens additionally require the resources.proxy_aliases permission. Allowed: true, false
include_prespawnquerystringNoInclude prespawn containers in the listing. By default, prespawn containers are excluded. Allowed: true, false
include_deletingquerystringNoInclude containers currently being deleted. By default, deleting containers are excluded from results. Allowed: true, false
Terminal window
curl -X GET "https://api.hoody.com/api/v1/projects/507f1f77bcf86cd799439011/containers?page=1&limit=20" \
-H "Authorization: Bearer <token>"

Create a new container for a project. The server_id field is required. Container creation is asynchronous; the returned status typically reads creating (or claiming when the system first tries to claim a prespawn cache). Image shorthand is auto-resolved: a bare distribution name or hyphenated version (such as debian or debian-13) becomes the canonical debian/13 form, as do the debian:13 and debian 13 forms.

NameInTypeRequiredDescription
idpathstringYesUnique identifier of the project
NameTypeRequiredDescription
server_idstringYesTarget server ID
namestringNoName for the container. Must be 3-100 characters, alphanumeric with hyphens and underscores. Omit or use "rand" to generate a random name.
colorstringNoHEX color for the container (e.g., FF0000 or #FF0000). The # prefix is added automatically if missing and the color is converted to uppercase.
container_imagestringNoContainer image to use. If null or not provided, the default configured image is used. Shorthand is resolved automatically: a bare distribution name or hyphenated version (debian, debian-13) becomes the canonical base image (debian/13), as do the debian:13 and debian 13 forms.
aibooleanNoWhether AI features are enabled. Default: true
environment_varsobjectNoEnvironment variables to set in the container as key-value pairs (string values, max 65536 chars each, max 200 properties, names match ^[a-zA-Z_][a-zA-Z0-9_]*$).
ssh_public_keystringNoSSH public key for container access. SSH public keys must be unique per container (one container per key). If not provided, will inherit from project defaults.
commentstringNoOptional comment for the container (max 16000 characters).
hoody_kitbooleanNoEnable all Hoody Kit features (extra-apt-sources, basic-packages, hoody-daemon, sudo-env, remove-snapd, webview, user, hoody-ai, ttyd). Default: true
dev_kitbooleanNoEnable dev_kit development tools in the container. Defaults to true when hoody_kit is true, false when hoody_kit is false (unless explicitly set). Cannot be updated after creation.
kvmbooleanNoEnable /dev/kvm passthrough (run full VMs inside the container) at creation. Available on rented / dedicated (bare-metal) servers ONLY — never free tier — and rejected (403) on a free server. Defaults to false.
dev_kvmbooleanNoAccepted alias of kvm on input (kvm wins if both are sent and they must agree).
autostartbooleanNoWhether the container should start automatically on host boot. Default: true
ramdiskbooleanNoWhether to mount a ramdisk at /ramdisk in the container. The ramdisk KEEPS data when you stop/start/reboot the container, but LOSES data if the physical host server reboots. Default: true
cachebooleanNoEnable use of cached images during container creation. Default: true
cache_imagebooleanNoForce the creation of a new cached image from the container image. This option is only available to admins or the owner of the image. Default: false
prespawnbooleanNoINTERNAL — not user-settable. Prespawn cache containers are provisioned only by the system pool producer. Passing true is rejected (403); an explicit false is accepted. Default: false
bypass_prespawnbooleanNoBypass prespawn container claiming and create a fresh container directly. Default: false
realm_idsarrayNoRealm IDs to assign this container to. Containers can have different realm membership than their parent project.
Terminal window
curl -X POST "https://api.hoody.com/api/v1/projects/507f1f77bcf86cd799439011/containers" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"server_id": "507f1f77bcf86cd799439014",
"name": "backend-api",
"color": "#10B981",
"container_image": "ubuntu/22.04",
"ai": true,
"environment_vars": {
"DATABASE_URL": "postgresql://user:pass@db:5432/app",
"REDIS_URL": "redis://cache:6379"
},
"ssh_public_key": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOMqqnkVzrm0SdG6UOoqKLsabgH5C9okWi0dh2l9GKJl user@host",
"comment": "Backend API server with PostgreSQL connection"
}'

Update a container. Fields omitted from the body are preserved. Set comment or ssh_public_key to null to clear them and inherit from project defaults. Modifying realm_ids requires an unrestricted token or admin user; realm-restricted tokens cannot change realm membership.

NameInTypeRequiredDescription
idpathstringYesUnique identifier of the container to update
NameTypeRequiredDescription
namestringNoHuman-readable name for the container - must be unique within the project
colorstringNoHEX color for the container (e.g., FF0000 or #FF0000). The # prefix is added automatically if missing and the color is converted to uppercase.
aibooleanNoWhether AI features are enabled. If omitted, the current value is preserved.
autostartbooleanNoWhether the container starts automatically on host boot. If omitted, the current value is preserved.
ramdisk_scopestringNoSharing scope for /ramdisk. container (default) mounts only private storage. project additionally mounts /ramdisk/project, shared with your other containers in this project ON THE SAME SERVER (a RAM disk cannot span servers). Refused when the project has other members. Allowed: container, project
ramdiskbooleanNoWhether to mount a ramdisk at /ramdisk. If omitted, the current value is preserved. Backed by a shared per-server memory pool (512 MiB by default, never more than 50% of the server memory). Data survives container restarts but is LOST on a host reboot.
environment_varsobjectNoEnvironment variables to set in the container as key-value pairs (string values, max 65536 chars each, max 200 properties, names match ^[a-zA-Z_][a-zA-Z0-9_]*$).
ssh_public_keystringNoSSH public key for container access. SSH public keys must be unique per container. Re-sending the same key for the same container is a no-op. Set to null to clear or inherit from project defaults.
commentstringNoOptional comment for the container (max 16000 characters). Set to null to clear existing comment.
realm_idsarrayNoUpdate realm membership for this container. Only unrestricted tokens and admin users can modify realm_ids.
Terminal window
curl -X PUT "https://api.hoody.com/api/v1/containers/507f1f77bcf86cd799439011" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"name": "web-app-1-renamed",
"color": "#FF8800",
"autostart": true,
"ai": true,
"comment": "Renamed primary web container"
}'

Enable or disable hardware virtualization passthrough (/dev/kvm) so the container can run full virtual machines. Available on rented/dedicated (bare-metal) servers only — never on free-tier servers. The container must be STOPPED. Send kvm: true to enable or kvm: false to disable; dev_kvm is accepted as an alias of kvm.

NameInTypeRequiredDescription
idpathstringYesUnique identifier of the container
NameTypeRequiredDescription
kvmbooleanNoEnable (true) or disable (false) /dev/kvm passthrough (run VMs in the container). Rented/dedicated servers only; the container must be stopped.
dev_kvmbooleanNoAccepted alias of kvm on input (kvm wins if both are sent and they must agree).
Terminal window
curl -X PUT "https://api.hoody.com/api/v1/containers/507f1f77bcf86cd799439011/kvm" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{ "kvm": true }'

Issue a signed, portable container authorization claim.

The returned container_claim is an ED25519-signed credential that proves:

  • Who the user is (sub, claim_type)
  • Which container they are authorized for (containerId, projectId)
  • When Hoody issued the authorization (iat, exp)

Container programs can verify this claim offline using Hoody’s public key at GET /api/v1/meta/public-key — no API round-trip is needed during verification.

Claims expire after HOODY_CONTAINER_CLAIM_EXPIRES_IN (default 6h). Clients should re-call this endpoint to refresh before expiry.

Container claims share their wire format, signing key, and verification procedure with the identity claims issued at login (identity claims) — the differences are claim_type: "container" (verifiers must check this to prevent cross-claim confusion), the container/project fields, and the shorter lifetime.

NameInTypeRequiredDescription
idpathstringYesContainer ID (24-char hex)
Terminal window
curl -X POST "https://api.hoody.com/api/v1/containers/abc123def456abc123def456/authorize" \
-H "Authorization: Bearer <token>"

Delete a container.

NameInTypeRequiredDescription
idpathstringYesUnique identifier of the container to delete
Terminal window
curl -X DELETE "https://api.hoody.com/api/v1/containers/507f1f77bcf86cd799439011" \
-H "Authorization: Bearer <token>"