Fix No Space Left on Device on Coolify
Error: ENOSPC: no space left on device
The server ran out of disk during a build or deploy, so the step fails (npm ENOSPC, image pull/build failure, or a container won't start).
Coolify and Docker accumulate data fast: old images, stopped containers, dangling layers, and build cache pile up under /var/lib/docker, while Coolify's own files sit under /data. Every deploy builds a new image, so on a small root volume the disk fills and builds die with 'npm ERR! code ENOSPC ... no space left on device' or image-pull errors. VPS/EC2 boxes with a small root partition hit this quickly.
The fix
Check what's actually full so you fix the right volume. Look at the filesystem holding /var/lib/docker and what Docker says it can reclaim.
df -h && docker system dfRun Coolify's built-in cleanup first (the safe move). In the dashboard go to Servers > your server, and trigger a cleanup. Coolify prunes unused images, stopped containers, and build cache for you.
If you need more space, prune from the CLI over SSH. This removes all unused images, stopped containers, and build cache. Read the confirmation prompt before saying yes.
docker system prune -aDo NOT add --volumes blindly: that deletes volumes not attached to a running container and can wipe a stopped database. Only prune volumes if you are certain they are disposable.
Prevent recurrence: enable scheduled cleanup in Servers > your server > Configuration > Advanced. Set the Docker Cleanup Threshold (e.g. 80%) and a Docker Cleanup Frequency cron schedule, and enable Force Docker Cleanup for reliable runs (cleanup is skipped automatically during an active deployment). If the box is just too small, grow the disk to 50-100GB so /var/lib/docker isn't on a tiny root partition.
Verify it worked
df -h shows healthy free space on the filesystem holding /var/lib/docker and /data, and the deploy completes without ENOSPC.
df -h /var/lib/docker /dataRelated Coolify errors
- FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory / Build script returned non-zero exit code: 137 (OOMKilled)
- NET::ERR_CERT_AUTHORITY_INVALID
- TRAEFIK DEFAULT CERT / self-signed certificate
- www.domain.com cert error but apex works