Memory and CPU limits
Every service has a memory limit (MB) and a CPU limit (cores), set when you create the deployment (default 256 MB and 0.5 cores). Docker enforces both: a service that goes over its memory limit is killed and restarted. Limits can’t be edited after creation yet. To change them, create a new deployment with the new limits. Compose stacks are the exception: Mangrove doesn’t inject limits into them. Set them in the compose file underdeploy.resources.limits.
The memory budget
Mangrove adds up the memory limits of every deployment that isn’t stopped (limit × replicas). If a new deploy would push that total overMANGROVE_DEPLOYMENT_MEMORY_CEILING_MB (default 1536), it’s refused before
anything starts, with a clear error, instead of the box running out of
memory later.
In production a systemd slice enforces the same ceiling at the kernel
level as a backstop. See Going to production.
To free budget:
- Stop a deployment you don’t need right now. Stopped deployments don’t count.
- Delete deployments you’re done with.
Replicas
The Replicas card on a deployment’s Overview tab runs 1 to 32 copies of it. Changing the count triggers a deploy: the new set of containers starts, passes health checks, and only then replaces the old set.- Only Dockerfile, Nixpacks and Existing image deployments can scale. Compose stacks and static sites stay at one.
- Each replica counts against the memory budget.
- All replicas share the deployment’s port, and Caddy spreads requests across them.
+ and - on a deployment in mangrove-tui, or the
scale_deployment MCP tool.
Seeing usage
- Overview tab: each service’s limits, replica count, and its latest health check with response time.
- Admin → Resource budget: memory allocated to deployments against memory actually used, running containers, disk, and their history.
- Server health (sidebar): the whole box’s CPU, memory, swap, disk, load and uptime.
- The sidebar’s Mangrove mark turns red for owners when the box’s memory or disk passes 90%.