ServerAvatarDocs
API Reference

Docker API

Docker networks and volumes, containerised databases, resource limits and image lookup through the OSS Panel API.

These endpoints are the API behind Docker in the panel's sidebar and the image picker on the Create application screen: Docker networks and volumes, databases that run in their own container, the limits containers may use, and a lookup for images in a registry.

They exist only on a server that runs containers. On any other server every endpoint here answers 409 ("not a Docker server"; the text follows Accept-Language).

The Docker application itself (create, container settings, compose file) is on Applications API. Stored registry logins are on Git accounts and registries API.

All paths are relative to https://<your-panel-host>/api. Read Authentication first. The examples use:

PANEL=https://panel.example.com
TOKEN='1|xcMq8K3vZ2pL…'

Permissions

KeyTitle in RolesUsed for
dockerDockerNetworks, volumes, limits and containerised databases.
applicationApplicationsImage lookup (the image picker belongs to creating an application).
registryDocker RegistriesNeeded in addition, to look up an image with a stored login (registry_id).

Reading needs view; every endpoint marked manage needs manage, which implies view.

Endpoint index

MethodPathPermissionLimit per minutePurpose
GET/docker/networksdocker60List networks.
POST/docker/networksdocker manage20Create a network.
DELETE/docker/networks/{name}docker manage20Remove a network.
GET/docker/volumesdocker60List volumes.
POST/docker/volumesdocker manage20Create a volume.
DELETE/docker/volumes/{name}docker manage20Remove a volume.
GET/docker/limitsdocker60CPU count and default memory limits.
GET/docker/databasesdocker60List containerised databases and engines.
POST/docker/databasesdocker manage10Create one.
DELETE/docker/databases/{dockerDatabase}docker manage20Delete one.
GET/docker/databases/{dockerDatabase}/credentialsdocker manage6Read its passwords.
GET/docker/images/searchapplication60Search Docker Hub.
GET/docker/images/tagsapplication20List an image's tags.
GET/docker/images/inspectapplication20Read what an image declares.

The limits sit on top of the shared budget (see Rate limits) and count that endpoint only, per user.

Networks and volumes

GET /docker/networks and GET /docker/volumes

Return {"networks": [ … ]} and {"volumes": [ … ]}. A network lists the containers and sites attached to it and whether it is built in; a volume shows whether it is in_use, by which containers and which sites.

curl "$PANEL/api/docker/networks" \
  -H "Authorization: Bearer $TOKEN" -H 'Accept: application/json'

POST /docker/networks and POST /docker/volumes

Body {"name": "shop-net"}. The name starts with a letter or digit and continues with letters, digits, _, . or -, up to 128 characters in all. Answers 201 with the updated list ({"networks": [ … ]} or {"volumes": [ … ]}). 422 when the name is invalid or already exists; for a network, also when the name is one the panel reserves for itself. 500 with a reference when Docker could not create it.

DELETE /docker/networks/{name} and DELETE /docker/volumes/{name}

Return the updated list. A name that does not exist is 404. These are refused:

StatusWhy
422The network is built in (Docker's own).
409A container or a site still uses it (the message names them).
500Docker failed to remove it; the body carries a reference.

Limits

GET /docker/limits

Returns {"limits": {"cpus", "default_memory_limit", "default_db_memory_limit"}}: how many CPUs the server has, and the memory limits new containers get (512m unless the administrator changed them). Use it to build a form that validates cpu_limit and memory_limit the way the panel does.

Containerised databases

A database that runs in its own container, apart from the server's MySQL, MariaDB or PostgreSQL.

GET /docker/databases

Returns {"databases": [ … ], "engines": [ … ]}: the databases that exist and the engines you can start (postgres, mysql, mariadb, mongodb, redis, valkey), each with its available versions.

POST /docker/databases

Starts a database container. Answers 201 with {"database": { … }}.

FieldRules
nameRequired, up to 63 characters, unique, a valid Docker name.
engineRequired, one of the engine names from the list.
versionRequired, up to 32 characters: one of the engine's versions.
docker_networkOptional, an existing network.
cpu_limitOptional, up to 16 characters, not above the server's CPUs.
memory_limitOptional, up to 20 characters, a Docker memory value.

A container that did not start answers 422 with message, step and reference.

GET /docker/databases/{dockerDatabase}/credentials

Returns {"credentials": {"password", "root_password"}}. Limited to 6 calls per minute, because it returns passwords.

DELETE /docker/databases/{dockerDatabase}

Returns {"message": "…"}; 422 with step and reference when removal failed.

Image lookup

These three help a client fill in the Docker image field. They need view on Applications, not on Docker.

GET /docker/images/search

QueryRules
qRequired, 2 to 100 characters.
limitOptional, 1 to 50. Default 10.

GET /docker/images/tags

QueryRules
imageRequired, up to 255 characters: nginx, ghcr.io/owner/app, …
registry_idOptional: a stored registry login to use. Needs view on Docker Registries.
limitOptional, 1 to 100. Default 20.
limitOptional, 1 to 100. Default 20.

GET /docker/images/inspect

The same image and registry_id as above. Returns what the image declares (for example its exposed port and volumes) so the create form can fill them in.

Both lookups answer 503 with a reason when the registry is unreachable or is rate limiting you, and 422 for an address the panel refuses to contact.

Common errors

StatusMessage or cause
403Your role does not include management for Docker.
404Unknown network, volume or database.
409Not a Docker server; or the network or volume is in use.
422Validation ({"message", "errors": {"field": ["…"]}}) or a refusal such as a built-in network.
429Over a limit; wait for Retry-After.
500{"message", "reference"}: find the reference in the error log.
503The registry could not be reached or rate limited the panel.

On this page