berth

Apps and software

Containers with rootless Podman

Run container images and compose stacks per subscription with rootless Podman, publish them on a site, path or subdomain, install apps from the catalogue, roll back or auto-update, and control registries, image vulnerabilities and disk quota.

Updated 7 min readcontainers · podman · docker · compose · quadlet · imagesView as Markdown

On this page
  1. How containers are isolated
  2. Install an app from the catalogue
  3. Run your own image
  4. Publish a container
  5. Logs, terminal and databases
  6. Updates and rollback
  7. Compose stacks
  8. Allowed registries
  9. Image vulnerability scanning
  10. Disk quota and backups
  11. Containers for the server itself
  12. Docker already on the server

Some applications are easiest to run as a container image: Ghost, n8n, Vaultwarden, an analytics tool, or your own service. Berth runs containers per subscription with rootless Podman, without a Docker daemon and without root rights, and publishes them through nginx on an address of the subscription. This article covers the isolation model, the catalogue, your own images and compose stacks, updates and rollback, registries, image scanning and quota.

Containers are available when the package allows them: Containers in the package, with a maximum number and memory per container.

berth plan set --name dev --containers --max-containers 5 --container-memory-mb 1024
berth container quota --subscription acme

How containers are isolated

  • Rootless Podman. There is no Docker daemon and no root-owned container engine that a customer can talk to.
  • One user namespace per subscription, inside the subscription's resource slice. Container processes are mapped to unprivileged IDs of that subscription and count towards its CPU, memory and process limits.
  • Units owned by root. Each container is a systemd Quadlet unit that the root agent writes; a customer cannot change the unit or its options.
  • Never privileged. No host network, host PID or IPC namespaces, no extra capabilities, no devices. no-new-privileges and seccomp are always on, swap is off, and a read-only root filesystem is an option.
  • Ports only on the loopback interface. nginx is the only way in, with HTTPS, the WAF and the domain's other settings in front.

See Isolation and Security model for how this fits the rest of the server.

Install an app from the catalogue

On the domain page, open Containers and go to From the catalogue. Choose an app, the address to publish it on, and click to install. Where an app needs a database, the panel creates one in the subscription.

AppWhat it isDatabase
GhostBlog and newsletterSQLite
n8nWorkflows and automation
Uptime KumaMonitoring with status pages
GiteaGit server with issues and pull requestsSQLite
VaultwardenPassword vault, works with the Bitwarden apps
NextcloudFiles, calendar and contactsSQLite
MatomoWeb analyticsMariaDB
UmamiSimple cookieless analyticsPostgreSQL
StrapiHeadless CMS with REST and GraphQLMariaDB
PlausibleCookieless analytics (Community Edition)PostgreSQL, plus a ClickHouse container
berth container catalog
berth container catalog install --subscription acme --app ghost --domain blog.example.com --path /

Nextcloud and Matomo can also be installed as regular PHP applications with the software installer, which adds integrity checks and smart updates.

Run your own image

Add container takes an image, the port it listens on, and optionally memory and CPU limits, environment variables, named volumes, a command, a health check and a read-only root filesystem. Pull and start fetches the image and starts it.

berth container add --subscription acme --name web --image docker.io/library/nginx:alpine \
  --port 80 --memory-mb 256 --volume data:/usr/share/nginx/html --read-only

Volumes are named volumes; paths on the host cannot be mounted. Images are pinned to their digest when pulled, so a container never changes underneath you.

Upload an image

For an image that is not in a registry, use Upload own image with an archive from docker save, podman save or an OCI archive, then refer to it as localhost/<name>:

berth container load --subscription acme --file myapp.tar
berth container add --subscription acme --name myapp --image localhost/myapp:1.0 --port 8080

Health checks

With a health check command, Podman runs it inside the container at an interval. A container that stays unhealthy is stopped and restarted by systemd.

berth container set --subscription acme --name api --image ghcr.io/acme/api:2.3 --port 8080 \
  --health-cmd /app/healthcheck --health-interval 30 --health-retries 3

The command is given one argument per --health-cmd. container set restarts the container with all settings given again.

Publish a container

Publish makes a container reachable on an address of the subscription:

  • the whole site of a domain (/),
  • a path, such as /app/,
  • or a subdomain of the subscription.

If something already lives at that address, the panel asks to confirm (Publish anyway). The existing site is shadowed, not removed. When the container stops or fails, the address falls back to the original site, so visitors see the normal website rather than an error.

berth container route add --subscription acme --name web --domain example.com --path /app/
berth container route remove --subscription acme --name web --id 7

Logs, terminal and databases

  • Log → Watch live follows the container's output.
  • Terminal opens a shell inside a running container.
  • With Subscription databases reachable on, the container reaches the subscription's MariaDB and PostgreSQL databases at host name berth-host.
berth container logs --subscription acme --name web --lines 200
berth container set … --databases on

Updates and rollback

After Pull the image again or a switch to another image, the panel remembers the previous version by digest. Back to the previous version restores it.

With Update automatically on, the panel fetches a newer version of the same tag in the server's maintenance windows. If the container does not run afterwards, it goes back to the previous digest by itself. Choose a tag that only moves within a version you trust, such as :1.28 rather than :latest.

berth container set --subscription acme --name web --image docker.io/library/nginx:1.28-alpine --port 80 --auto-update
berth container rollback --subscription acme --name web
berth container auto-update        # run the round now, for all subscriptions

Maintenance windows are described in OS updates and maintenance.

Compose stacks

A compose.yml with several services can be imported as a stack: one Quadlet pod per stack, with a container per service. The services share the pod and find each other by service name. Open Containers → Stack, paste the file under Compose file and check the preview, or use the CLI:

berth container stack preview --subscription acme --file compose.yml
berth container stack import  --subscription acme --file compose.yml --name blog --var DB_PASSWORD=… --auto-update
berth container stack update  --subscription acme --name blog

The file is read with compose-go, and anything Berth does not know is refused, not silently ignored. The preview lists exactly what Berth will create and what it refuses or ignores, with the reason:

  • Refused: privileged, network_mode, pid, ipc, cap_add, security_opt, devices, sysctls, build, env_file, secrets, configs, extends, volumes_from, access to the Docker or Podman API socket, and a few more. Build images elsewhere and pull them from an allowed registry; put values in environment.
  • Ignored with a note: harmless keys that Berth handles itself, such as container_name, hostname, labels and logging (output goes to the panel's logs).
  • Variables such as ${DB_PASSWORD} come only from what you pass with --var (or fill in on the page), never from the panel's own environment.

If a stack import or update fails to start, the whole stack goes back to its previous state.

Allowed registries

The administrator decides which registries images may come from, for all customers, under Settings → Customers:

berth container registries
berth container registries --set docker.io --set ghcr.io --set quay.io

Image vulnerability scanning

When Check apps and containers is on in the vulnerability policy, the panel builds a software bill of materials (SBOM) for every container image and matches it against public vulnerability data, on the server itself. The policy New image with vulnerabilities decides what happens to a new image:

  • warn: the image runs, and the daily round reports its vulnerabilities;
  • refuse above the threshold: an image with vulnerabilities at or above the threshold (critical, or high and critical) is refused, as is one with a known exploited vulnerability.

The policy is under Security → Vulnerabilities; see Vulnerability management.

Disk quota and backups

Images, volumes and whatever containers write count towards the package's disk space. When it is full, no new image can be pulled, and containers above the hard limit are stopped, with a notice on the page. Free space by removing unused images or volumes, or move to a larger package.

Volumes are included in the subscription's backups. A removed container comes back when you restore the whole account.

Containers for the server itself

Everything above belongs to a subscription. A container that belongs to the server rather than to a customer, such as an internal dashboard or a webhook receiver, runs as a system app under System → System apps (berth sysapp). It also runs rootless, under its own user, and listens only on the server itself until an administrator publishes it on an address and port, or on a host name with its own certificate behind the panel. See system apps.

Docker already on the server

On a server that already runs Docker, existing containers can keep running next to Podman. System → Docker shows what Docker runs, with warnings in plain language, lets you start, stop and restart existing containers, and proposes a compose file per project to move it to a Berth stack. The Docker socket is used only by the root agent.

berth docker inventory
berth docker migrate              # what can move and what Berth would refuse
berth docker migrate --name shop  # a compose file for berth container stack import