containerd-config.toml
configuration file for containerd
- Provided by: containerd (Version: 2.2.1-0ubuntu1~25.10.1)
- Source: containerd-app
- Report a bug
configuration file for containerd
The config.toml file is a configuration file for the containerd daemon. The file must be placed at /etc/containerd/config.toml or specified with the --config option of containerd to be used by the daemon. If the file does not exist at the appropriate location or is not provided via the --config option containerd uses its default configuration settings, which can be displayed with the containerd config(1) command.
The TOML file used to configure the containerd daemon settings has a short list of global settings followed by a series of sections for specific areas of daemon configuration. There is also a section for plugins that allows each containerd plugin to have an area for plugin-specific configuration and settings.
stream_processors
The following is a complete config.toml default configuration example:
version = 2
root = "/var/lib/containerd"
state = "/run/containerd"
oom_score = 0
imports = ["/etc/containerd/runtime_*.toml", "./debug.toml"]
[grpc]
address = "/run/containerd/containerd.sock"
uid = 0
gid = 0
[debug]
address = "/run/containerd/debug.sock"
uid = 0
gid = 0
level = "info"
[metrics]
address = ""
grpc_histogram = false
[cgroup]
path = ""
[plugins]
[plugins."io.containerd.monitor.v1.cgroups"]
no_prometheus = false
[plugins."io.containerd.service.v1.diff-service"]
default = ["walking"]
[plugins."io.containerd.gc.v1.scheduler"]
pause_threshold = 0.02
deletion_threshold = 0
mutation_threshold = 100
schedule_delay = 0
startup_delay = "100ms"
[plugins."io.containerd.runtime.v2.task"]
platforms = ["linux/amd64"]
sched_core = true
[plugins."io.containerd.service.v1.tasks-service"]
blockio_config_file = ""
rdt_config_file = ""
The following is an example partial configuration with two runtimes:
[plugins]
[plugins."io.containerd.grpc.v1.cri"]
[plugins."io.containerd.grpc.v1.cri".containerd]
default_runtime_name = "runc"
[plugins."io.containerd.grpc.v1.cri".containerd.runtimes]
[plugins."io.containerd.grpc.v1.cri".containerd.runtimes.runc]
privileged_without_host_devices = false
runtime_type = "io.containerd.runc.v2"
[plugins."io.containerd.grpc.v1.cri".containerd.runtimes.runc.options]
BinaryName = "/usr/bin/runc"
[plugins."io.containerd.grpc.v1.cri".containerd.runtimes.other]
privileged_without_host_devices = false
runtime_type = "io.containerd.runc.v2"
[plugins."io.containerd.grpc.v1.cri".containerd.runtimes.other.options]
BinaryName = "/usr/bin/path-to-runtime"
The above creates two named runtime configurations - named runc and other - and sets the default runtime to runc. The above are used solely for runtimes invoked via CRI. To use the non-default "other" runtime in this example, a spec will include the runtime handler named "other" to specify the desire to use the named runtime config.
The CRI specification includes a ⟨https://github.com/kubernetes/cri-api/blob/de5f1318aede866435308f39cb432618a15f104e/pkg/apis/runtime/v1/api.proto#L476⟩, which will reference the named runtime.
It is important to note the naming convention. Runtimes are under [plugins."io.containerd.grpc.v1.cri".containerd.runtimes], with each runtime given a unique name, e.g. [plugins."io.containerd.grpc.v1.cri".containerd.runtimes.runc]. In addition, each runtime can have shim-specific options under [plugins."io.containerd.grpc.v1.cri".containerd.runtimes.<runtime>.options], for example, [plugins."io.containerd.grpc.v1.cri".containerd.runtimes.runc.options].
The io.containerd.runc.v2 runtime is used to run OCI-compatible runtimes on Linux, such as runc. In the example above, the runtime_type field specifies the shim to use (io.containerd.runc.v2) while the BinaryName field is a shim-specific option which specifies the path to the OCI runtime.
For the example configuration named "runc", the shim will launch /usr/bin/runc as the OCI runtime. For the example configuration named "other", the shim will launch /usr/bin/path-to-runtime instead.
Please file any specific issues that you encounter at https://github.com/containerd/containerd.
Phil Estes estesp@gmail.com ⟨mailto:estesp@gmail.com⟩