Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Without containers

You need:

  • PostgreSQL 16 or newer, and a database the app owns.
  • The media tools, which serve and worker check for at startup:
ToolUsed forFedoraDebian / Ubuntu
libvips 8.15+ (vips, vipsheader, vipsthumbnail)reading images, thumbnails, perceptual hashesvips-tools (AVIF: vips-heif, JPEG XL: vips-jxl)libvips-tools libheif-plugin-dav1d libheif-plugin-aomenc
ffmpeg (ffmpeg, ffprobe)reading videos, poster frames, and videos of ugoira (with libvpx for VP9)ffmpeg (RPM Fusion) or ffmpeg-freeffmpeg

Download a release binary (see Upgrading), or build one with Rust 1.94 or newer:

cargo build --release
sudo install target/release/moekura /usr/local/bin/

Create the database:

sudo -u postgres createuser --pwprompt moekura
sudo -u postgres createdb --owner moekura moekura

Then write /etc/moekura/moekura.toml (start from moekura.example.toml in the repository) with at least:

[server]
public_url = "https://booru.example.com"

[database]
url = "postgres://moekura:PASSWORD@localhost/moekura"

[storage]
path = "/var/lib/moekura/data"

and start it:

moekura --config /etc/moekura/moekura.toml serve

As a systemd service

# /etc/systemd/system/moekura.service
[Unit]
Description=Moekura
After=network-online.target postgresql.service
Wants=network-online.target

[Service]
User=moekura
Environment=MOEKURA_CONFIG=/etc/moekura/moekura.toml
# Keeps memory use down after bursts of requests (as in the image).
Environment=MALLOC_ARENA_MAX=2
ExecStart=/usr/local/bin/moekura serve
Restart=on-failure
# Keep the database password out of the config file:
# EnvironmentFile=/etc/moekura/secrets.env

[Install]
WantedBy=multi-user.target
sudo useradd --system --home-dir /var/lib/moekura --create-home moekura
sudo systemctl enable --now moekura

moekura check-config prints the settings it would use, with secrets redacted.