Daemon configuration
dicerd reads its configuration from /etc/dicerd/config.yaml, or the file dicerd serve --config names, when it starts: a changed file is taken up by restarting it. The file is optional, as every key has a default, and unknown keys are rejected: check a change with sudo dicerd validate before sudo systemctl restart dicerd.
data_dir: /var/lib/dicer
api:
socket:
group: dicer
tcp:
listen: 0.0.0.0:7443
tls:
cert_file: /etc/dicerd/tls/server.pem
key_file: /etc/dicerd/tls/server-key.pem
client_ca_file: /etc/dicerd/tls/ca.pem
metrics:
enable: true
images:
gc_max_size: 50GiBGeneral
The daemon’s own settings. The sections after them are the API, resources, networking, defaults, metrics, images, events and registries.
data_dir
string
data_dir is where the daemon keeps what persists: the definitions of instances, networks, volumes and kernels, the images, and the instances’ disks. Unset is /var/lib/dicer.
run_dir
string
run_dir is where the daemon keeps runtime state: sockets, config disks and the record of what is running. It should be a tmpfs, so that a reboot clears it. Unset is /run/dicer.
log_level
string
log_level is debug, info, warn or error. Unset is info.
api
mapping
api is where the API is served: always on a Unix socket, and on TCP too if api.tcp.listen is set.
api.socket
mapping
socket is the local Unix socket. Anyone who can open it has full control of the daemon.
api.socket.path
string
path is the socket’s path. Unset is /run/dicer/dicer.sock.
api.socket.mode
integer
mode is the socket’s permission bits. Unset is 0660.
api.socket.group
string
group is the group the socket belongs to, by name or ID. Its members can use the API as far as mode lets the group, which is as much as root on this host. Unset leaves the socket root’s alone.
api.tcp
mapping
tcp is the network listener. Without tls it is unauthenticated and unencrypted: anyone who can reach it has root-equivalent access to this host.
api.tcp.listen
string
listen is the host:port to serve on, such as 0.0.0.0:7443. Unset serves no listener.
api.tcp.tls
mapping
tls is the listener’s TLS.
api.tcp.tls.cert_file
string
cert_file is the daemon’s PEM certificate, which must name the address clients connect to. It is reloaded when it changes on disk.
api.tcp.tls.key_file
string
key_file is the PEM private key for cert_file. It is reloaded when it changes on disk.
api.tcp.tls.client_ca_file
string
client_ca_file holds the PEM authorities client certificates must be issued by. Set, every client must present a valid certificate; unset, any client is accepted. Use a CA dedicated to Dicer’s clients. It is read at startup.
api.keepalive
mapping
keepalive is how the daemon finds clients that have gone without closing their connection, because their host lost power or the network between dropped, and how often clients may check the same of it. Such a connection otherwise lasts until the kernel gives up on it, which can take a quarter of an hour.
api.keepalive.interval
duration, such as 30s or 5m
interval is how long a connection may carry nothing before the daemon pings the client. Unset is 30s.
api.keepalive.timeout
duration, such as 30s or 5m
timeout is how long the daemon waits for the answer to a ping before closing the connection. Unset is 10s.
api.keepalive.min_client_interval
duration, such as 30s or 5m
min_client_interval is how often a client may ping the daemon at most, even with no call in flight. A client pinging more often is disconnected. Dicer’s clients ping every 30s unless told otherwise. Unset is 10s.
resources
mapping
resources is how much CPU and memory instances may be given, all together: the host’s CPUs times cpu_overcommit, and its memory less reserved_memory_bytes times memory_overcommit. A start that would take more is refused.
resources.cpu_overcommit
number
cpu_overcommit is how many vCPUs instances may be given per host CPU. Unset is 4.
resources.memory_overcommit
number
memory_overcommit multiplies the memory available to instances: 1 never promises more memory than the host has. Unset is 1.
resources.reserved_memory_bytes
integer
reserved_memory_bytes is the memory, in bytes, kept back for the host and the hypervisors’ overhead. Unset is 1073741824, 1 GiB.
network
mapping
network is the host’s networking.
network.uplink_interface
string
uplink_interface is the interface NAT traffic leaves by. Unset detects it from the default route.
network.uplink_capacity_bps
integer
uplink_capacity_bps is the uplink’s capacity in bits per second, the ceiling for per-instance bandwidth shaping. Unset sets no ceiling.
network.upload_burst_multiplier
integer
upload_burst_multiplier is how far an instance may briefly exceed its upload rate limit, as a multiple of it. Unset is 4.
network.download_burst_multiplier
integer
download_burst_multiplier is how far an instance may briefly exceed its download rate limit, as a multiple of it. Unset is 4.
defaults
mapping
defaults is what an instance gets when its definition leaves something out.
defaults.kernel
string
kernel is the kernel an instance boots when it names none. Unset is the only kernel, if there is exactly one.
defaults.network
string
network is the network an instance is attached to when it names none. Unset is the only network, if there is exactly one.
metrics
mapping
metrics is the Prometheus endpoint, served at /metrics without authentication. Metrics are always recorded: this decides only whether they are served.
metrics.enable
boolean
enable serves the endpoint.
metrics.listen
string
listen is the host:port the endpoint is served on. Unset is 127.0.0.1:9101.
images
mapping
images is image garbage collection, which removes only images no instance, running guest or snapshot uses. It is off while gc_max_unused_age and gc_max_size are both unset.
images.gc_max_unused_age
duration, such as 30s or 5m
gc_max_unused_age removes images unused for longer than this, such as 168h. Unset is no limit.
images.gc_max_size
size, such as 512MiB or 50GiB
gc_max_size removes the least recently used images while the store is larger than this, such as 50GiB. Unset is no limit.
images.gc_interval
duration, such as 30s or 5m
gc_interval is how often garbage collection runs. Unset is 1h.
events
mapping
events bounds the events log that dicer events shows.
events.max_count
integer
max_count is how many of the most recent events are kept. Unset is 10000.
events.max_age
duration, such as 30s or 5m
max_age drops events older than this, such as 720h. Unset is no limit.
registries.*
mapping of names to mappings
registries are the credentials for private registries, by host as an image’s name gives it: docker.io, ghcr.io, or a registry’s host:port. Images from any other registry are pulled anonymously.
registries:
ghcr.io:
username: dicer-bot
password_file: /etc/dicerd/secrets/ghcr-tokenregistries.*.username
string
username is the user to log in as.
registries.*.password
string
password is the password or token to log in with, and password_file a file holding it, readable only by root. Give one or the other.
registries.*.password_file
string
See password, above.
registries.*.credential_helper
string
credential_helper names a docker-credential-<name> program on the daemon’s PATH, such as ecr-login, that gives the credentials instead of username and password: for a registry whose tokens expire.