Skip to main content

API key scopes

A scope limits what an API key can do. The interface calls them Permissions. Browser sessions always have every permission of their user. To create a key, see API keys.

ScopeInterface labelAllowsAdmin only
*All permissionsEverything the user's profile allows. Cannot be combined with other scopesNo
containers:readRead (list, inspect)List containers and read their details (GET /docker, GET /docker/{id})No
containers:logsLogs (download, streaming)Download logs, stream live logs, read a file inside a container (/logs/**, WebSocket logsStart)No
containers:actionsActions (start, stop, restart, kill, delete)Container actions and stack actions (POST /docker/{id}/{action}, POST /stacks/{name}/{action})No
containers:shellShell (remote terminal)Open a terminal in a container (WebSocket attach)No
containers:statsStats (real-time monitoring)Live CPU, RAM, network and PIDs (WebSocket statsStart)No
containers:proxyProxy (port tunnel)Open a port tunnel to a container (WebSocket proxyOpen / streamOpen)No
containers:cpFile copy (cp)Download and upload files (GET / PUT /docker/{id}/cp)No
cronCron jobsEvery scheduled task route (/cron/**)No
sftp:readSFTP (read)Read SFTP accounts and settingsYes
sftp:writeSFTP (create, edit, delete)Change SFTP accountsYes
hosting:readHosting (read)Read websitesYes
hosting:writeHosting (create, edit, deploy, delete)Change and deploy websitesYes
services:readDatabases (read)Read managed servicesYes
services:writeDatabases (create, new password, delete)Change managed servicesYes
services:exposeDatabases (publish a port)Publish and close the port of an instance. Not implied by services:writeYes
networks:readPrivate networks (read)Read private networksYes
networks:writePrivate networks (create, attach, detach, delete)Change private networks, including the networks of a service instanceYes
functions:read—Read functions and the module configuration (GET /functions/**)Yes
functions:write—Create, resize, start, stop, restart and delete functionsYes
functions:deploy—Code and deployments, secrets, invoke credentials, variables, handler, networks, Internet access and MCP opt-in of a functionYes
functions:invoke—Invoke a function (POST /functions/{name}/invoke), and with cron, create, change or run a scheduled function invocation. Implied by no other scope but *Yes
audit:readAudit trail (read)Read the audit trail (GET /audit)Yes

Rules​

  • Profile first: a key carries its user's profile. An admin-only scope on a user's key grants nothing.
  • Container permissions still apply: a container scope only reaches the containers the user can access.
  • No scope needed: your own profile and keys (/users/me, /users/me/api-keys), and the admin routes for users and /domains, which check the profile only.
  • No escalation: a key can only create keys within its own scopes.
  • Functions (work in progress): creating a function with variables, networks, Internet access, SigV4 or the MCP opt-in, or changing its variables, handler or MCP opt-in, needs both functions:write and functions:deploy.
  • WebSocket stops: logsStop and statsStop need no scope: they only stop a stream the connection opened.
  • Validation: at least one scope is required, unknown scopes are refused. Keys created before scopes existed have no scope and keep full access.

In the interface​

The Permissions list of the New key form only shows the scopes that apply:

ScopesShown when
sftp:*, hosting:*, services:*You are an admin and the module is enabled (SFTP_ENABLED, HOSTING_ENABLED, SERVICES_ENABLED)
networks:*, audit:readYou are an admin

The functions:* scopes are not in the form yet ("—" above): a key with All permissions covers them, or create the key through the API (POST /users/me/api-keys).