System maintenance
The System area covers the housekeeping that keeps a Pier host from filling up or falling behind: pruning Docker, watching disk usage, reading service logs, and updating Pier itself.
Docker cleanup
Section titled “Docker cleanup”Pier can prune four kinds of Docker data. The manual Clean action runs an immediate prune -f for the target you pick:
| Target | Command |
|---|---|
| Images | docker image prune -f |
| Build cache | docker builder prune -f |
| Containers | docker container prune -f |
| Railpack/BuildKit cache | buildctl prune inside the buildkit container |
Cleanup also runs on a schedule. The cleanup settings — enabled, interval, and which targets to prune — are mirrored into a system schedule in the unified scheduler. The default cadence is daily; intervals of 1, 6, 12, 24, 48 or 168 hours map to the matching cron expression. By default the scheduled run prunes images and build cache, leaves containers alone, and leaves the Railpack/BuildKit cache off.
The manual Railpack clean is aggressive — it wipes the BuildKit cache completely (
--keep-storage 0 --keep-duration 0). The scheduled pass is conservative, keeping roughly 10 GB / 7 days of cache so it doesn’t fight with Auto-build.
Disk usage
Section titled “Disk usage”A disk-usage view breaks down Docker’s footprint — images, containers and volumes individually, plus the build-cache total — sorted largest-first, with a grand total. A separate cleanup-info summary reports how much is reclaimable, including the Railpack/BuildKit cache measured from inside the buildkit container. When Auto-build is disabled or the buildkit container isn’t running, the BuildKit figure simply reads 0 rather than erroring.
System logs
Section titled “System logs”Pier exposes journald logs for a tightly allow-listed set of systemd units (pier and pier-agent) so you can debug runtime and startup issues without SSH. Two modes:
- Snapshot — a one-shot pull, filterable by time window (5 min through 7 days, or all), line count (30 / 100 / 500 / 1000 / 5000) and priority (
err,warning,info,debug). - Live tail — a WebSocket stream (
journalctl -f) that pushes new lines as they arrive.
Only the allow-listed units can be queried; anything else is rejected at the API.
Timezone
Section titled “Timezone”A single IANA timezone (e.g. Europe/Moscow) is stored in settings and used to format the timestamps in outbound notifications. The name is validated before it’s saved, and unknown values fall back to UTC.
Self-update
Section titled “Self-update”Pier checks GitHub releases for a newer build and compares the published binary against the running one. Update behaviour is controlled by a mode setting:
| Mode | Behaviour |
|---|---|
notify | Tell you an update is available (default) |
auto | Apply updates automatically |
manual | Don’t check or prompt |
Applying an update downloads the binary, stages it in the data directory, and asks the privileged local helper to swap it in and restart Pier. On installs without the helper, Pier falls back to a direct swap and systemctl restart; if the install is hardened and that isn’t permitted, it surfaces a manual-update hint instead.
Next steps
Section titled “Next steps”- Scheduled tasks — the scheduler that drives cleanup.
- Alerts & notifications — cleanup runs emit alert events.
- Security hardening — the sandboxing the updater works around.