Host access

Why Deplo never exposes a Docker socket, and how one grant gates everything that reaches outside a container.

A Compose file reaches the server almost as written, so a few keys hand a container the whole machine:

  • privileged: true alone is enough to mount the host's disk and chroot into it.
  • pid: host puts nsenter -t 1 one command away.
  • devices: hands over a raw disk.
  • A top-level volume with external: true attaches an existing volume by name. Deplo's volume names are predictable, so that reaches other teams' data and the panel's own database.

Every way out of a container takes one account-level grant: Bind server folders (canMountHostVolumes in the API). It is not a team capability, and no role gives it.

What is gated

Service keys. Most count only for their risky value, and a value filled in from a variable always counts.

KeyGated when
privileged, oom_kill_disable, use_api_socketOn (yes counts too)
oom_score_adjNegative
pid, ipc, uts, cgrouphost, container: or service:
network_modeAnything but none and default, bridge included
volumes_fromIt names a container:
env_fileIt is a path on the server (see below)
loggingA driver other than json-file or local, or an option other than max-size and max-file
security_optAnything but no-new-privileges:true
runtimeAnything but runc
extra_hostsIt uses host-gateway
deployIt sets resources.reservations.devices
post_start, pre_stopThe hook itself is privileged
cap_add, devices, device_cgroup_rules, cgroup_parent, group_add, userns_mode, gpus, providerAny value

Paths, not keys. A source that starts with / or ~, climbs with .., or comes from a variable is on the server, and gated. A ./ path is your app's own files directory, and free. That covers service mounts, env_file, a secrets: or configs: file:, and a build context: env_file: .env is free, env_file: /etc/app.env is not.

Top-level blocks.

  • A volume that is external, pins a name:, or sets driver_opts (which can bind / one level up from the service).
  • A network a service actually joins that belongs to something else: external, a pinned name:, driver_opts, or the macvlan, ipvlan or host driver. A network Deplo owns is rewritten onto your environment's instead, and needs nothing.

Builds. A context, Dockerfile or additional_contexts on a server path, ssh:, privileged, entitlements, or a network other than none and default.

Outside a Compose file. A Bind row in an app's Storage, and a negative OOM priority in Resources, for an app or a database.

Refused outright. extends: from another file, include: and label_file: pull in keys Deplo never sees, so no grant makes them work. Inline what they bring in.

Never gated. Hardening (cap_drop, read_only, security_opt: no-new-privileges:true) and empty keys (cap_add: [], privileged: false). no-new-privileges:false is gated. Only what you wrote counts, never the entries Deplo adds.

The Compose editor and the deploy card mark the exact key before you deploy. A refusal names it, and who can grant access.

Publishing a port is a separate grant

Publish ports (canExposePorts) covers an app's Published ports, a ports: entry in a Compose file, and a database's Host port. expose: publishes nothing and needs no grant.

The risk is different: a published port is reachable from the network, but it does not give the container the machine.

How to grant it

An instance admin opens Settings -> Users -> the user -> Permissions -> Advanced grants. The grants apply in every team and on every server.

GrantAPICovers
Publish portscanExposePortsPublished ports, ports:, a database's Host port
Bind server folderscanMountHostVolumesEverything on this page
Configure TraefikcanConfigureTraefikCustom traefik.* labels, in a Compose file or in an app's Settings -> Advanced -> Traefik labels

An instance admin holds all three, so the switches show on and disabled. Give them to the people who run the servers, not to everyone who deploys.

Alternatives when access is denied

You wantedDo this instead
A bind mount for uploadsA Volume. Deplo creates and keeps it.
A bind mount for a config fileA File, edited in the browser.
network_mode: host for performanceA domain through Traefik.
A published port so another app can reach itNothing. Apps in one environment, on one server, reach each other by name.
A port for a game server, a mail server or raw TCPPublished ports. That is what the grant is for.
privileged because the README said soCheck whether it is needed. Many images copy it from an older example.

Taking it away

Deplo records who saved a Compose file that reaches the server, and checks their grant on every deploy, a git push included. Revoking it blocks new saves and the next deploy of those apps:

shop's compose reaches past its container, and whoever saved it no longer has
permission to let an app reach the server. An admin restores it with "Bind server
folders" in Settings -> Users, or someone who has it saves the compose again.

Running containers keep running: revoking stops the next deploy, not what is up. Configure Traefik works the same way for custom labels.

Good to know

  • This is host-level access. Whoever holds it can read other teams' data on that machine.
  • An app that reaches the server does not preview pull requests from forks, and only someone with the grant can run its cron jobs as root.
  • Imports hit the same gate. A stack that needs a grant you lack is not created, and the migration report says why.

Save or deploy refused for a permission you don't hold? See Sign-in and access troubleshooting.

See also

Did this page help you?

On this page