LibrePortal
Sponsor
Install

Daily clean-up and updates

How LibrePortal keeps the server's system disk from filling up, and applies security updates to the server itself, once a day.

On this page
  1. What it does
  2. What it never touches
  3. When it runs
  4. From the command line

A server that updates its apps for months collects what the updates leave behind: old app images, Docker's build cache, a long system log and downloaded packages. One real install reached 91% full from exactly that. LibrePortal now tidies up once a day, and keeps the server's own software patched while it does.

You will find it in Admin → System, on the Clean-up and system updates card. Every part has its own switch, and the defaults are safe to leave alone.

What it does#

  • System updates. Installs security fixes for the server's operating system. You can change this to all updates, or turn it off. It never restarts the server and never touches Docker itself: if an update only takes effect after a restart, it tells you instead of restarting.
  • Old app images. Removes downloaded app images that no installed app uses. After an app updates, its previous image is kept for a few days (3 by default) so a rollback still works. Apps that are installed but stopped keep their image.
  • Build cache. Clears the leftover files Docker keeps from building and downloading images.
  • Stopped leftovers. Removes stopped containers and empty networks that LibrePortal itself made and no installed app owns. Anything you started yourself is left alone.
  • App logs. Trims an app's log once it passes 50 MB, keeping the most recent part.
  • System log. Trims the server's journal to 500 MB and 30 days.
  • Package downloads and LibrePortal's own leftovers (finished task records, old install logs and update downloads) are cleared too.

What it never touches#

Your apps, their data, volumes and backups. An image an installed app uses, running or stopped. An image built on this machine that can't be downloaded again. The container engine, and the server's power: it never reboots anything.

When it runs#

Every day around 04:30 on the server's clock; it starts a few minutes earlier or later so many servers don't all run at once. The card shows the time, the last run and what it freed. Press Run now to do it straight away, or Preview Clean-up to see what would be removed without removing anything.

From the command line#

libreportal cleanup run --dry-run   # show what would happen, change nothing
libreportal cleanup run             # do it now, as a task
libreportal cleanup status          # when it last ran and what it freed

The settings are ordinary LibrePortal settings (CFG_CLEANUP_*), so libreportal config update changes them like any other.

Next steps