monbooru

module
v1.24.1 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2026 License: AGPL-3.0

README

Monbooru

Your own private, lightweight and fast booru: a tag-based image gallery, in the style of Danbooru, for your files.

Designed for organizing your local media collection: images, videos, animated GIFs and manga archives. Tag it by hand or auto-tag it locally with ONNX models (WD14, JoyTag...), then search it by tag. Generation metadata from AI image tools (A1111/Forge, ComfyUI) is read too. The app itself never touches the internet; online features (downloading from boorus, reverse image lookup) live in monloader, an optional companion.

Demo · Documentation · Install · Releases · Changelog

Features

Library
  • Formats: JPEG, PNG, WebP, AVIF, JPEG XL, GIF, MP4 and WebM, plus CBZ/ZIP archives read as a single item in a built-in manga reader
  • File watcher that picks up new, moved and deleted files within seconds; browser upload; SHA-256 deduplication
  • File naming: templates set the name and folder of incoming files, from their date, size, hash, origin and more; the same templates rename a selection, or the whole library in one pass
  • Inbox: new images wait in the inbox until you've reviewed and tagged them
  • Scheduled maintenance: a daily pass, each step optional, that syncs the gallery, auto-tags the new images, finds related images, and looks up sources through monloader
  • Multiple galleries in one instance, each with its own folders and database; per-gallery export and import; transfer images from one gallery to another
  • Import from supported booru applications
Tags
  • Tag management: merge duplicates, aliases, implications, custom categories, cleanup tools; a page per tag with your note, links and a usage graph
  • Tag provenance: each tag remembers what applied it (you, an auto-tagger, a booru); view, search and remove tags by source, and reject a tag to keep it off every image
  • Rating tags (general / sensitive / questionable / explicit), with a SFW ceiling in the footer that hides anything rated above it
  • Meta tags set from the file itself, under Danbooru's names: highres, absurdres, animated, sound and more
  • Local auto-tagging with ONNX models (WD14 SwinV2, animetimm EVA02, JoyTag, Camie v2, PixAI, or any compatible model), on CPU or GPU; several models can run together, on videos and archive pages too
  • Gallery with folder tree, favorites, collections, related-image suggestions, animated previews on hover, and a fullscreen slideshow of a search or a selection
  • Search with wildcards, OR, exclusions, saved searches, and filters on folder, date, size, dimensions, category, generation settings, and more
  • Batch operations on a selection or a whole search: add or remove tags, rename, move, delete, auto-tag, set collection or source, download as a zip, and more
  • Keyboard-driven: shortcuts on every page, from grid navigation to batch actions; press ? in the app for the full list
  • On a phone: layouts made for a small screen, and swipe between images
Image details
  • Sources and provenance: several sources per image, artist commentary, note boxes, and your own notes
  • Image relations: duplicates, alternates, version chains, derivatives; near-duplicate detection with a side-by-side review and cleanup tools
  • AI generation metadata from A1111/Forge and ComfyUI: prompts, models, seeds, full workflows
Access and integrations
  • Optional password login
  • REST API with scoped tokens, an OpenAPI spec, and built-in docs
  • Plugins and themes: drop one in the plugins or themes folder and turn it on in Settings; monbooru launches and supervises plugins for you
  • Downloads and reverse lookup through the optional monloader companion

Install

Monbooru runs on Linux (x86_64, arm64) and Windows (x86_64). Once started, it's at http://localhost:8455.

Docker

Edit the volume paths in docker/docker-compose.yml, then run docker compose up -d.

For faster auto-tagging, use the latest-cuda image (NVIDIA) or latest-openvino (Intel GPU).

Download

Download a build for your system from the releases, unpack it, and run it; a browser opens on a short setup page.

Downloads come in two flavours:

  • lite is the program alone. It has no auto-tagger, and video, AVIF and JPEG XL thumbnails need ffmpeg on your system.
  • bundled carries ffmpeg and ONNX Runtime, so everything works out of the box.

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

Next steps

The documentation covers the first steps.

Warning

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

Technical overview

Monbooru is a single self-contained Go binary, web assets embedded, with seven direct dependencies. Each gallery is one SQLite file: no database server, no cache layer, nothing else to run. Your images stay ordinary files and folders; the database and thumbnails live in a separate data directory, so backing up means copying that directory, and removing monbooru leaves your images where they were. The UI is server-rendered with htmx, with no JS framework and no frontend build step.

The heavy features stay out of the main process. Auto-tagging is off until you install a model from Settings → Auto-Tagger, and runs in a separate worker that unloads itself when idle. ffmpeg is optional, needed only for video, animated previews, AVIF and JPEG XL.

Monbooru works offline. These optional companions add the online features:

---
config:
  layout: dagre
  flowchart:
    wrappingWidth: 200
---
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) from supported boorus and galleries and pushes them into a monbooru gallery over the REST API. It also answers monbooru's reverse lookups against boorus, IQDB, SauceNAO and the Hydrus Public Tag Repository, to backfill tags and sources; when a matched post has 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, and send yours back.
  • monsender: browser extension; sends the URL of the page you're browsing to monloader.
  • monbooru-plugins: community registry of plugins, themes and extra taggers.

Contributing

Bug reports, ideas and pull requests are welcome.

See CONTRIBUTING for more information.

Bugs and feature requests go in the GitHub issue tracker.

Feel free to ask questions or discuss your setup in Discussions, or on MonBooru Central, the community-run Discord.

MonBooru Central, the community-run Discord. Join

License

AGPL-3.0.

Acknowledgements

These cover monbooru and its companion repos (monloader, monsender, mondocs, monbooru-plugins).

Thanks to @gary-host-laptop and @CeareDelafont for sustained contributions over time. Everyone credited in a release is listed in CONTRIBUTORS.

Thanks to tamaki for the mon-chan visuals.

Thanks to Danbooru for shaping the booru style, and to Hydrus Network a precursor in personal image and tag management that inspired monbooru.

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.
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.
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/apitoken
Package apitoken holds the named bearer tokens that open /api/v1.
Package apitoken holds the named bearer tokens that open /api/v1.
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 the browser sessions, CSRF tokens and login backoff.
Package session holds the browser sessions, CSRF tokens and login backoff.
shared/webui
static/htmx.min.js is htmx 2.0.11, byte-identical to https://unpkg.com/htmx.org@2.0.11/dist/htmx.min.js (sha256 d6fdc75f204e6bdefa99b69bf1e6d4ac69b8a364f77929f45c13476b4000f717).
static/htmx.min.js is htmx 2.0.11, byte-identical to https://unpkg.com/htmx.org@2.0.11/dist/htmx.min.js (sha256 d6fdc75f204e6bdefa99b69bf1e6d4ac69b8a364f77929f45c13476b4000f717).
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