monbooru

module
v1.22.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 17, 2026 License: AGPL-3.0

README

Monbooru

Your own private, lightweight and fast booru.
Designed for organizing your local media collection, including AI-generated images (Stable Diffusion, ComfyUI, A1111/Forge). Supports ONNX models for local auto-tagging of your collection (WD14, JoyTag...). The app itself never touches the internet; online features (downloading from boorus or reverse image lookup) are handled by monloader, an optional companion.


Features

  • Tag-based gallery with folder tree, favorites, saved searches, collections, related-image suggestions, and rating tags (general / sensitive / questionable / explicit) with a SFW ceiling
  • Stable Diffusion metadata from A1111/Forge and ComfyUI: prompts, models, seeds, full workflows
  • Local ONNX auto-tagging (WD14 SwinV2, animetimm EVA02, JoyTag, Camie v2, PixAI, or any compatible model) on CPU or GPU
  • Images, video, animated GIFs, plus CBZ/ZIP archives browsed as a single object with a built-in manga reader; animated hover previews on the grid
  • Search with wildcards, OR, exclusions, plus filters on folder, date, size, dimensions, category, generation recipe, and more
  • Keyboard-driven UI: contextual shortcuts on every page, from grid navigation to batch actions; press ? in-app for the full map
  • Tag management: merge duplicates, create aliases, implications, custom categories
  • Image relations: declared duplicates, alternates, version chains, derivatives; near-duplicate detection with a side-by-side review session and duplicate cleanup tools
  • Sources and provenance: multiple sources per image, artist commentary and note boxes, plus your own per-image notes and annotations
  • Batch operations on a selection or a whole search: delete, move, add/remove tags, auto-tag, set collection or source, toggle inbox/favorite, and more
  • File watcher that catches new, moved, and deleted files within seconds; multi-file browser upload; SHA-256 dedup so the same file under two paths is one image
  • Inbox workflow : new images land in the inbox for review
  • Multiple galleries in one instance, each with its own filesystem and database; per-gallery export/import; import data from supported booru applications
  • REST API for third-party integrations, with scoped bearer tokens, an OpenAPI spec, and built-in docs
  • Plugins and themes support: drop one in the plugins (or themes) folder and switch it on in Settings; monbooru then launches and supervises a plugin for you
  • Monloader integration (optional) (monloader) pulls images and tags from supported boorus and galleries, and reverse-looks up your own images against boorus, similarity services (IQDB, SauceNAO), and the Hydrus Public Tag Repository to backfill tags and sources; when a matched post serves a better file than your local copy, one click replaces it in place; the PTR connection can also pull tag aliases and implications into your catalog
  • Optional password login

Technical overview

Monbooru compiles to a single self-contained binary (~21 MB, web assets embedded) with seven Go dependencies. Storage is one SQLite file per gallery: no database server, no cache layer, nothing else to run. Your collection stays ordinary files and folders on disk, the database and thumbnails live in a separate data directory, so removing monbooru leaves your images exactly where they were. The UI is server-rendered with no JS framework and no frontend build step.

The heavy features stay out of the core process: ONNX auto-tagging ships without a model and runs in a separate worker that unloads itself when idle, and everything online (downloading, reverse lookup) lives in the optional monloader companion, so monbooru itself never touches the internet. ffmpeg is an optional dependency for video, animated previews, and AVIF and JPEG XL images.


Monbooru is a self-hosted offline image organizer. Optional companions applications can be used for online features :

flowchart LR
    web["`- Any booru or gallery supported by gallery-dl
- Direct image URL`"]
    ptr["`Hydrus
Public Tag Repository`"]
    sender["`**monsender**
browser extension`"]
    loader["`**monloader**
downloader`"]
    booru(["`**monbooru**
Your self-hosted booru`"])

    web -->|browse| sender
    sender -->|send URL| loader
    web -->|paste URL| loader
    loader -->|push images, tags, source| booru

    booru -.->|lookup by hash| loader
    loader -.->|reverse lookup: md5 + similarity| web
    ptr <-.->|"`sync: sha256 tags + aliases + implications
contribute back`"| loader

    classDef hub  fill:#9d2235,stroke:#ef8f99,stroke-width:3px,color:#ffffff;
    classDef tool fill:#1a1818,stroke:#9d2235,stroke-width:1.5px,color:#e8e4e2;
    classDef src  fill:#1a1818,stroke:#a09898,stroke-width:1px,color:#a09898;

    class booru hub;
    class sender,loader tool;
    class web,ptr src;
  • monbooru : this application; organizes, tags, and serves your collection.
  • monloader : downloader; fetches files and per-post metadata (via gallery-dl) and pushes them into a monbooru gallery over the REST API; also answers monbooru's reverse lookups (boorus, IQDB/SauceNAO, Hydrus PTR) and source refetches.
  • monsender : browser extension; sends the URL of the page you're currently browsing to monloader.
  • monbooru-plugins : community registry for third-party plugins and themes.

Quick start (Docker)

Edit the volume paths in docker/docker-compose.yml, then docker compose up -d. The app is available at http://localhost:8455.

Quick start (Binaries)

Download a build for your system from the releases, unpack it, and run it. The app is available at http://localhost:8455.

Downloads come in two shapes:

  • lite is a single binary.
  • bundled carries ffmpeg and the ONNX Runtime beside it, so video thumbnails and local CPU auto-tagging work with nothing else installed.

Beside the portable archives, Linux bundled builds also ship as an AppImage and as a Flatpak.

See the monbooru documentation for help. In-app, type system: in the search bar for the syntax cheat-sheet and press ? for the keyboard shortcuts; the footer's help link opens the documentation.


Warning

Intended for local network use. This project is not designed for direct exposure to the public internet.


Acknowledgements

This section covers monbooru and its companion repos (monloader, monsender, mondocs, monbooru-plugins).

Thanks to @gary-host-laptop and @CeareDelafont for sustained contributions over time. Every shipped contribution is credited in the release that ships it; see CONTRIBUTING.

This project is built on the work of others:

The full Go dependency lists are in each repo's go.mod.

The sample images in the screenshots, here, in the companion repos, and in the documentation, were downloaded from Danbooru and are the work of their respective artists, who retain all rights. They appear only to demonstrate the app; the repositories' license doesn't apply to them.

Directories

Path Synopsis
cmd
monbooru command
Command monbooru serves the galleries, in the server, desktop or portable profile.
Command monbooru serves the galleries, in the server, desktop or portable profile.
internal
api
Package api implements the /api/v1/ REST handlers for monbooru.
Package api implements the /api/v1/ REST handlers for monbooru.
config
Package config loads, validates and atomically saves monbooru.toml.
Package config loads, validates and atomically saves monbooru.toml.
counts
Package counts caches a gallery's whole-library tallies.
Package counts caches a gallery's whole-library tallies.
db
Package db opens a gallery's SQLite pools and owns its schema.
Package db opens a gallery's SQLite pools and owns its schema.
fsx
Package fsx holds the filesystem helpers several packages share.
Package fsx holds the filesystem helpers several packages share.
gallery
Package gallery owns the files under a gallery root.
Package gallery owns the files under a gallery root.
galleryio
Package galleryio exports, imports, merges and transfers whole galleries.
Package galleryio exports, imports, merges and transfers whole galleries.
galleryio/compatibility
Package compatibility translates foreign gallery exports into the light-import manifest.
Package compatibility translates foreign gallery exports into the light-import manifest.
jobs
Package jobs runs one background job at a time: two jobs writing the same SQLite file would only contend.
Package jobs runs one background job at a time: two jobs writing the same SQLite file would only contend.
library
Package library owns the open galleries: the set that publishes, switches and changes them, and each one's database, services, caches and background work.
Package library owns the open galleries: the set that publishes, switches and changes them, and each one's database, services, caches and background work.
lookup
Package lookup holds the scheduled hash lookup's retry ladders, due predicate and attempt history.
Package lookup holds the scheduled hash lookup's retry ladders, due predicate and attempt history.
markup
Package markup renders the bracket markup that annotation bodies, notes and commentary are stored in; source HTML is converted to it, never stored.
Package markup renders the bracket markup that annotation bodies, notes and commentary are stored in; source HTML is converted to it, never stored.
metadata
Package metadata reads generation parameters, EXIF and ComicInfo out of files.
Package metadata reads generation parameters, EXIF and ComicInfo out of files.
models
Package models holds the row types and constants several packages share; it imports nothing of ours.
Package models holds the row types and constants several packages share; it imports nothing of ours.
monloader
Package monloader is the client for the paired monloader instance.
Package monloader is the client for the paired monloader instance.
peer
Package peer is what monloader and the plugins share: the pending pairing requests, the grant and revoke written to the config, the address rules, the /health probe and the teardown notice.
Package peer is what monloader and the plugins share: the pending pairing requests, the grant and revoke written to the config, the address rules, the /health probe and the teardown notice.
plugins
Package plugins launches the plugin binaries an operator put on disk; it never downloads or installs anything.
Package plugins launches the plugin binaries an operator put on disk; it never downloads or installs anything.
procx
Package procx holds child-process helpers shared across packages.
Package procx holds child-process helpers shared across packages.
relations
Package relations manages the operator-declared graph between images.
Package relations manages the operator-declared graph between images.
schedule
Package schedule runs the daily pass over a set's galleries: the clock trigger, the catch-up after a missed slot, and the actions each gallery is ticked for.
Package schedule runs the daily pass over a set's galleries: the clock trigger, the catch-up after a missed slot, and the actions each gallery is ticked for.
search
Package search implements the Monbooru query language parser and SQL executor.
Package search implements the Monbooru query language parser and SQL executor.
searchkw
Package searchkw is the search filter-keyword vocabulary; it imports nothing of ours.
Package searchkw is the search filter-keyword vocabulary; it imports nothing of ours.
shared/contract
Package contract spells the words monbooru and monloader exchange over /api/v1 once, for both.
Package contract spells the words monbooru and monloader exchange over /api/v1 once, for both.
shared/desktop
Package desktop is the per-OS side of the -desktop profile.
Package desktop is the per-OS side of the -desktop profile.
shared/logx
Package logx gates the stdlib logger by level.
Package logx gates the stdlib logger by level.
shared/pairing
Package pairing holds the pairing requests a peer polls until the operator approves or denies them.
Package pairing holds the pairing requests a peer polls until the operator approves or denies them.
shared/session
Package session holds a process's browser sessions and the CSRF tokens bound to them.
Package session holds a process's browser sessions and the CSRF tokens bound to them.
tags
Package tags owns the tag catalog and every image's membership in it.
Package tags owns the tag catalog and every image's membership in it.
upgrade
Package upgrade holds the "source serves a file we do not have" predicate, in Go and in SQL.
Package upgrade holds the "source serves a file we do not have" predicate, in Go and in SQL.
web
Package web is the HTTP transport (routes, handlers, templates) and the process's composition root: NewServer opens the set and starts every loop.
Package web is the HTTP transport (routes, handlers, templates) and the process's composition root: NewServer opens the set and starts every loop.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL