The Stashboard docker compose resource limits ui turns the most error-prone part of a Compose file — CPU caps, memory ceilings, networks, and volumes — into bounded inputs you can’t typo your way out of. Shipped across V7.2 and V7.3, it edits two things most dashboards never touch: per-service resource constraints (Part 1) and the top-level networks, volumes, secrets, and configs blocks (Part 2). You stay inside the same visual editor instead of hand-aligning YAML over SSH.
This is a deep how-to. If you’ve never opened the visual editor, read the pillar first — the visual Docker Compose editor for self-hosted stacks — then come back here. New to the underlying concepts? Docker for beginners: containers, images, volumes, compose covers the vocabulary used below.
Prerequisites
- Stashboard V7.3 or newer (the Shared Resources tab and on-disk volume sizing landed in V7.3; per-service limits in V7.2).
- A host added to Stashboard via SSH or local socket, with at least one Compose project discovered.
- The Compose file must be writable by the connection user — read-only refusals are explained at the end.
Part 1 — The Docker Compose Resource Limits UI for Each Service
Open a stack, pick a service, and click the Resources tab. The docker compose resource limits ui maps every field to a real Compose key — nothing invented:
- cpus — fractional CPU cap (e.g.
1.5= one and a half cores). - mem_limit — hard memory ceiling. The container is OOM-killed past it.
- mem_reservation — soft floor the scheduler tries to honor.
- pids_limit — max process/thread count; your first defense against fork bombs.
- cpu_shares — relative weight (default
1024) when the host is contended. - ulimits —
nofile,nproc, etc., as soft/hard pairs. - oom_kill_disable — toggle to exempt a container from the OOM killer (use sparingly).
- oom_score_adj — bias (
-1000…1000) for who dies first under pressure. - shm_size —
/dev/shmsize; Chromium, Postgres, and some media tools need more than the 64 MB default.
Modern deploy.resources vs legacy top-level
Compose has two dialects for limits, and the docker compose resource limits ui never mixes them. The modern form nests under deploy.resources.limits / reservations; the legacy form puts mem_limit, cpus, etc. at the service root. Stashboard detects which dialect your file already uses, per file, and keeps writing in that same style. If a service has a deploy: block, edits go there; if it uses legacy top-level keys, they stay top-level. You won’t end up with both forms fighting each other — a classic cause of “why is my limit ignored?” on standalone docker compose up.
Capacity panel: sliders bounded by your real hardware
This is the part that prevents the worst mistakes. The docker compose resource limits ui reads the host’s actual CPU count and total RAM, then bounds the inputs and sliders to that capacity. On my main server — a Xeon E5-2650L v4 (28 threads) with 64 GB DDR4 — the CPU slider tops out at 28 and the memory slider at 64 GB. You physically can’t slide a single service past the box.
It also tracks the sum of all reservations across services. When the total exceeds host capacity you get an over-commit warning in the capacity panel: the stack will still start (Docker over-commits memory happily), but you’ve promised more than the machine has, and the OOM killer becomes a lottery. The warning is informational, not a block — over-commit is sometimes intentional for idle services. Need to convert GiB↔GB↔MiB while you reason about it? The byte and storage converter is handy.
Part 2 — The Docker Compose Resource Limits UI for Shared Definitions
V7.3 added a Shared Resources tab for the file’s top-level blocks — the ones shared across services rather than scoped to one. Three sub-sections:
Networks
Edit the top-level networks: map: driver (bridge, macvlan, overlay…), subnet, gateway, and driver_opts. Stashboard cross-checks your subnet against the host’s existing Docker networks and raises an overlap warning if your CIDR collides with one already in use — the failure mode that breaks DNS and routing in confusing, intermittent ways. Planning subnets and gateways? The IP subnet calculator pairs well with this panel.
Volumes
Edit named volumes — driver, driver_opts — and, uniquely, see each volume’s actual on-disk size. Stashboard reads this from the Docker Engine’s /system/df endpoint (a raw Engine API call, since the Docker.DotNet client has no df helper), so the number reflects real bytes consumed, not the declaration. That’s how you spot the forgotten postgres_data quietly eating 40 GB.
Secrets and Configs
Manage top-level secrets: and configs:. The editor distinguishes the two source types clearly: external (managed outside this file, e.g. a Swarm secret) versus file: (read from a path on disk). You pick the type and the UI shows the matching fields — no guessing which keys are legal for each.
Round-trip preservation and read-only refusals
Two behaviors keep your file safe.
Round-trip preservation: when you save, the docker compose resource limits ui rewrites only the keys you changed and preserves the rest — comments, key order, and untouched blocks survive. You’re not handed a machine-normalized file that buries your edits in a noisy diff.
Read-only refusals: ⚠️ some YAML constructs can’t be safely edited in place, so the docker compose resource limits ui refuses to edit them rather than risk corrupting your file. The two big ones are YAML anchors/aliases (&name / *name) and flow-style mappings (inline { } / [ ]). If a service or block uses these, that section opens read-only with a note explaining why. Edit those by hand, or expand them to block style first, then reload.
How to verify
- Make a change in the Resources or Shared Resources tab and Save.
- View the file (Stashboard’s raw view or
catover SSH) and confirm the docker compose resource limits ui changed only your keys — comments and ordering intact. - Recreate the service and check the live values:
docker inspect <container> --format '{{.HostConfig.Memory}} {{.HostConfig.NanoCpus}}'docker network inspect <net>for subnet/gateway.docker system df -vto match the volume size Stashboard reported.
- Confirm the official Compose
deployspec and legacy resource keys match the dialect you expected.
Risks to keep in mind
- mem_limit too low → instant OOM-kills on start. Watch the first launch.
- oom_kill_disable on a leaky service → it can drag the whole host down; that’s why the panel makes it a deliberate toggle.
- Over-commit warning ignored → fine until two services peak together. Size reservations for the realistic worst case.
- Subnet overlap → intermittent DNS/routing breakage; never dismiss the overlap warning without checking
docker network ls.
The whole point of the docker compose resource limits ui is that these limits become visible, bounded, and reversible instead of buried in YAML you only revisit when something’s already on fire. Pair it with the rest of the Stashboard self-hosted homelab dashboard and your stacks stop quietly outgrowing the box they run on.
Stashboard is open source — you can find the full source code on GitHub and pull the ready-to-run image directly from Docker Hub. Issues, PRs, and stars are always welcome. 🙌
