Maintenance
last updated
monbooru needs no routine maintenance; the tools below cover the cases where you moved things around behind its back, restored a backup, or want to reclaim space.
Manual tools#
Settings -> Maintenance has the one-shot tools. Most report how many rows they touched; Vacuum and Free memory report space reclaimed.
- Missing images (Prune): delete the database rows of files no longer on disk, along with their thumbnails. (A sync only marks such rows missing; this removes them.)
- Orphaned thumbnails (Remove): delete thumbnail files whose image is gone.
- Rebuild thumbnails: regenerate every thumbnail, including manga covers and page thumbnails. Useful after an import or a backup restore. Also re-probes video dimensions.
- Compute hashes: backfill the two hashes an image can be missing. First the perceptual hash, which the relations pair finder needs (see Relations); then the MD5.
- Rebuild pair queue: wipe the relation candidate queue (skipped pairs included) and rescan from scratch.
- Tag counts (Recalculate): recompute every tag’s usage count. The watcher and bulk operations keep counts correct in real time, so you only need this if you spot discrepancies. Zero-usage tags persist; delete them individually on the Tags page if you want them gone.
- Category conflicts: count tags whose name lives in more than one
category (e.g.
general:nintendoandcopyright:nintendo). Legal, but usually means two sources disagreed; the count links to the Tags page’s Conflicts filter where both sides can be merged. - Find folded duplicates (Scan): pair each tag an older pull stored
folded (like
fate_grand_order) with the corrected spelling that now supersedes it (fate/grand_order), for the Tags page’s Folded duplicates filter. Refresh the affected images first so the corrected spelling is present; the scan only pairs spellings you already have. - Re-extract metadata: re-run SD/ComfyUI metadata extraction on
every image, re-probe video durations, and re-parse comic archives'
ComicInfo.xml. - Vacuum database: compact the database file and release space back to the filesystem.
- Free memory: shrink the database caches, return heap to the system, and unload the auto-tagger from RAM/VRAM.
To find and remove byte-identical duplicate files, use the SHA-256 duplicates tool under Relations -> Duplicates; see Relations.
Nightly schedule#
Settings -> Schedule turns on a daily run at a chosen time (default 01:00). Tick any of:
- Sync gallery
- Remove orphaned thumbnails
- Run enabled auto-taggers (off by default)
- Find relation pairs (off by default)
- Look up unsourced images, in the Public Tag Repository and on online boorus (both off by default, and both hidden until monloader is paired) - see scheduled lookup
The scheduler runs through every gallery in turn. If a job is already running at fire time, the run is skipped silently.
When it runs matters on a machine that sleeps. A server is awake at 01:00; a laptop usually is not, and a run that never fires says nothing about it. Four choices:
| Choice | What happens |
|---|---|
| Every day at the time above | The plain daily run. A missed one is skipped |
| …and at startup if a day was missed | The same, plus one run five minutes after starting when the last one fell on an earlier day |
| At startup only | No clock at all. One run per day, five minutes after you start monbooru |
| Never | Nothing runs, whatever is ticked above |
Run now starts the same pass immediately.
Stats#
Settings -> Stats is a read-only diagnostic block: process memory broken down by what holds it, the auto-tagger’s current mode (CPU or GPU), load status and memory, database size per gallery, and free space on every filesystem your galleries and data live on.
Troubleshooting#
Degraded mode banner. The gallery folder is unreadable. Existing entries stay browsable but sync and the watcher are off. Fix the path or its permissions and restart.
Missing thumbnails. Run Maintenance -> Rebuild thumbnails. Video and animated GIF previews need ffmpeg, which ships with the Docker image.
Watcher hits the inotify limit. Logged as no space left on device from inotify_add_watch. Raise
fs.inotify.max_user_watches on the host (not inside the container)
and restart. If you see too many open files instead, raise
fs.inotify.max_user_instances. Or disable the watcher in Settings
and use Sync manually.
Permission errors on delete or move. monbooru takes ownership of files at ingest so it can delete or move them later. Files ingested by an old version may predate this; run a Sync, which re-claims files as it re-hashes them.
Files added but not visible. Check that they are under the gallery
path, under the max_file_size_mb limit, and that the extension is
one of jpg/jpeg/png/webp/gif/mp4/webm/cbz/zip. Then run Sync.
Locked out of the login. The login backoff caps at 30 seconds and clears after a few minutes idle. Wait it out, or restart the process to clear all sessions.
API returns 503 api_disabled. No API token exists yet; create
one in Settings -> Authentication. See
Development. The same status appears when no
gallery is active.
