# How to Fix ENOSPC: no space left on device (2026 Verified Ubuntu/Docker Fix)

- URL: https://nodebudget.dev/errors/n8n-enospc-no-space-left-on-device/
- Category: Storage & Logs · Severity: Critical
- Author: Yuanqiang Leng (https://github.com/a895047059)
- Updated: 2026-11-26

## Exact Log Signature
`ENOSPC: no space left on device | PostgreSQL panic: could not write to WAL`

## Root Cause
Unpruned n8n execution JSON payloads, binary files, or unbounded Docker json-file logs filled the VPS root disk.

## Verified Fix Commands
```bash
df -h / && docker system prune -af --volumes
# Add to n8n .env to cap retention at 7 days:
EXECUTIONS_DATA_PRUNE=true
EXECUTIONS_DATA_MAX_AGE=168
```

## Permanent Production Prevention
Enable pruning + Docker log max-size: 10m; for local AI models upgrade to 2TB NVMe.

---
Source: NodeBudget (https://nodebudget.dev/tools/error-decoder/)
