# Damebooru Damebooru is a self-hosted booru board. Most booru boards manage their own file storage, not allowing users to use an existing file folder structure. This board is designed to use external libraries similar to Immich. Additionally, the job system was inspired by Immich as well. That includes scheduled library scanning, thumbnail generation etc. The functionality is relatively basic compared to most booru boards, as I want to use the board as a single user just to manage my own media collection. At the moment, the project is half-baked, and will very likely stay like that. **Note:** This project is NOT intended to be used by anyone else other than me. It is 100% tailored for my own use case, and I have no plans to maintain it, fix issues, or add features. Additionally, it is a personal project that I use to test agentic coding, so the code quality might be questionable, at best. Screaming at LLMs in caps didn't seem to improve the results. ## Tech Stack - ASP.NET Core backend (`server/`) + EF Core with SQLite - Angular frontend (`client/`) ## Prerequisites (Local Development) - .NET 10 SDK - Node.js 22+ with Corepack enabled for pnpm - FFmpeg + FFprobe on `PATH` (required for video thumbnails/metadata) ## Features - External library scanning (posts are created for images and videos in the given folder) - Real-time file system tracking - Cron jobs - library scanning, thumbnail generation, metadata extraction, and so on) - Posts grid using virtual scroll - Similar and duplicate post detection - Tags and tag categories - Single-user optional authentication - Search syntax (include/exclude tags, types, tag count, sorting, filename, ..) - Move/zoom post with mouse - Auto-tag via SauceNAO/Iqdb + Gelbooru/Danbooru - Auto-tag via local AI tagging service ## Configuration Configuration can be provided through `server/Damebooru.Server/appsettings.json`, environment variables, or Docker Compose environment blocks/secrets. Environment variables use ASP.NET Core nested binding with `__`, for example `Damebooru__Scanner__EnableWatcher=true`. `ConnectionStrings:DefaultConnection` is configured separately from the `Damebooru` settings. See [docs/configuration.md](docs/configuration.md) for the full configuration reference. ## Run Locally Backend: ```bash cd server dotnet run --project Damebooru.Server ``` Frontend: ```bash cd client corepack enable pnpm install pnpm start ``` ### Database Migrations Migrations are auto-applied when `Damebooru.Server` starts. Before applying pending migrations, the server creates a SQLite online backup in a `backups/` folder next to the configured database file, then runs `PRAGMA integrity_check` against the backup. In the Docker example this resolves to `./data/server/backups/`. ## Deploy with Docker ### Option A: Use Published Images from GHCR 1. Copy the example compose file: ```bash cp docker-compose.example.yml docker-compose.yml ``` 2. Edit values as needed: - `Damebooru__Auth__Username` - volume mounts (`./data/server`, `./media`) - client port mapping (`8080:80`) - `TRUST_FORWARDED_HEADERS=true` if running behind a TLS reverse proxy (for example Nginx Proxy Manager) 3. Create Docker secret files for auth/API keys: ```bash mkdir -p secrets printf '%s' 'change-me' > secrets/auth_password.txt printf '%s' '' > secrets/saucenao_api_key.txt printf '%s' '' > secrets/danbooru_api_key.txt printf '%s' '' > secrets/gelbooru_api_key.txt ``` 4. Start: ```bash docker compose up -d ``` ### Option B: Build Images Locally 1. Copy the dev compose example: ```bash cp docker-compose.dev.example.yml docker-compose.yml ``` 2. Create the same `./secrets/*.txt` files as in Option A before starting. 3. Build and start: ```bash docker compose up -d --build ``` ## Notes - Client uses `BACKEND_HOST` and `BACKEND_PORT` to point Nginx to the API container. - In `docker-compose.example.yml`, server is intentionally not published to host by default; the client talks to it over the compose network. - Leave `TRUST_FORWARDED_HEADERS=false` for plain local HTTP. Set it to `true` only when the app is behind a trusted reverse proxy that sends `X-Forwarded-For` / `X-Forwarded-Proto`. ## Images Screenshot 2026-02-22 165425 Screenshot 2026-02-22 165550 Screenshot 2026-02-22 170032 Screenshot 2026-02-22 165924 Screenshot 2026-02-22 165850 Screenshot 2026-02-22 165726 Screenshot 2026-02-22 165656 Screenshot 2026-02-22 165246 Screenshot 2026-02-22 170015