Self-Hosting Kavita: Digital Library for Books, Comics & Manga

If you’ve got a collection of ebooks, comics, or manga scattered across folders and cloud services, Kavita brings them all under one roof with a fast, beautiful reading experience. Think of it as Plex for your reading library — it scans your files, organizes them with rich metadata, and serves them through responsive web readers that work on any device.

Built with .NET and Angular, Kavita handles epub, PDF, cbr, cbz, zip, rar, 7zip, and even raw image folders. It supports multiple users with role-based access, reading progress tracking, and an optional Kavita+ subscription for external metadata, reviews, and scrobbling integration. Whether you’re managing a personal library or sharing with family, Kavita scales elegantly.


Kavita vs Other Reading Servers

FeatureKavitaCalibre-WebKomgaUbooquity
Books (epub/PDF)✅ Native✅ Native❌ Comics only✅ Basic
Comics (cbr/cbz)✅ Native⚠️ Limited✅ Native✅ Native
Manga/Webtoon✅ Optimized❌ No✅ Good⚠️ Basic
Web reader✅ Full-featured⚠️ Basic✅ Good✅ Basic
Multi-user✅ Role-based⚠️ Limited✅ Yes✅ Basic
Metadata✅ Rich + Kavita+✅ Via Calibre DB✅ ComicInfo⚠️ Limited
OPDS support✅ Yes✅ Yes✅ Yes✅ Yes
Mobile readers✅ PWA + OPDS⚠️ OPDS only✅ OPDS✅ OPDS
Docker image~150MB~100MB~100MB~200MB
Active development✅ Very active⚠️ Maintained✅ Active❌ Stalled

Kavita stands out as the only all-in-one option that handles books, comics, and manga equally well with dedicated reading modes for each format.


Prerequisites

  • Docker and Docker Compose installed
  • A directory with your reading content (organized by type is ideal but not required)
  • At least 512MB RAM (1GB+ recommended for large libraries)
  • Reverse proxy for HTTPS access (optional but recommended)

Docker Compose Setup

Create your project directory and compose file:

mkdir -p /opt/stacks/kavita && cd /opt/stacks/kavita

Create compose.yaml:

services:
  kavita:
    image: jvmilazz0/kavita:latest
    container_name: kavita
    volumes:
      - ./config:/kavita/config
      - /path/to/books:/books
      - /path/to/comics:/comics
      - /path/to/manga:/manga
    ports:
      - "5000:5000"
    environment:
      - TZ=America/New_York
    restart: unless-stopped

Adjust the volume mounts to match your library structure. You can mount as many content directories as you need — each one becomes a library root you’ll configure in the UI.

Start it up:

docker compose up -d

Kavita will be available at http://your-server:5000. The first user you create becomes the admin.


Organizing Your Library

Kavita scans and organizes content based on folder structure and metadata. The recommended layout:

///bcmooaomnkAiSgSsuceae/tsr/rh/iioBAeSSSeCCVronseeeshhooorrraalNktNiiiNppuaBhaeeeattmCmToemsssmeeeheioreerra/tk/NNN/0plBaaa001teTommm00/e/ioeee12rtk..l.###cc0ep000bb0.d000zz1ef123-p...0uccc1bbbb0zzr.cbz

Key naming tips:

  • Use consistent numbering with zero-padding (001, 002, not 1, 2)
  • ComicInfo.xml inside cbz/cbr files is automatically parsed for metadata
  • For epub files, embedded OPF metadata takes priority
  • Kavita supports nested folders — use them for volumes, arcs, or story arcs

Setting Up Libraries

After first login:

  1. Create libraries — Click the admin gear icon, then “Libraries”
  2. Choose a library type: Book, Comic, Manga, or Image (this affects how content is grouped and which reader is used)
  3. Add folder paths — Point to the mounted directories (/books, /comics, /manga)
  4. Trigger a scan — Kavita scans automatically on library creation, or force-scan from the library menu

Each library type enables different features:

  • Book: Chapter-based navigation, table of contents parsing, virtual pages for epub
  • Comic: Issue-based grouping, ComicInfo.xml parsing, page-by-page reader
  • Manga: Chapter/volume grouping, webtoon continuous scroll mode, right-to-left reading

Managing Users

Kavita’s user management is surprisingly robust:

AdminDashboardUsersInviteUser

For each user, you can configure:

  • Library access: Which libraries they can see
  • Age rating restrictions: Filter content by age ratings from ComicInfo metadata
  • Roles: Admin, Change Password, Download, Bookmark
  • OIDC integration: Connect to Authentik, Authelia, or Keycloak for SSO

Share invite links directly — new users set their own passwords.


Reader Features Worth Knowing

Kavita’s built-in readers are its strongest feature:

Book reader (epub/PDF):

  • Customizable fonts, sizes, line spacing, and margins
  • Dark/sepia/custom themes
  • Table of contents sidebar
  • Continuous scrolling or paginated mode
  • Annotation and highlight support (epub)

Comic/Manga reader:

  • Single page, double page spread, or webtoon (continuous vertical scroll)
  • Right-to-left mode for manga
  • Keyboard shortcuts for rapid navigation
  • Automatic next chapter/volume continuation
  • Page bookmarking

All readers:

  • Reading progress syncs across devices
  • “Continue reading” picks up exactly where you left off
  • Fullscreen mode
  • Download for offline reading

OPDS Support for Mobile Apps

Kavita exposes an OPDS feed for third-party reading apps:

http://your-server:5000/api/opds/{api-key}

Find your API key in User Settings → 3rd Party Clients. Compatible apps include:

  • Panels (iOS) — Best for comics/manga
  • Chunky Reader (iOS) — Great comic reader
  • Librera (Android) — Versatile ebook reader
  • Moon+ Reader (Android) — Feature-rich with OPDS support
  • KOReader (E-ink devices) — Perfect for Kindle/Kobo

Reverse Proxy Configuration

Caddy

k}avitrae.vyeorusred_opmraoixny.cloomca{lhost:5000

Nginx

server {
    listen 443 ssl http2;
    server_name kavita.yourdomain.com;

    client_max_body_size 50M;

    location / {
        proxy_pass http://localhost:5000;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
    }
}

Important: After setting up HTTPS, update the base URL in Kavita’s admin settings under General → Host Name so that invite links and OPDS feeds use the correct URL.


Kavita+ (Optional Premium Features)

Kavita+ is an optional subscription ($24.99/year) that adds:

  • External metadata: Pull cover art, summaries, genres, and tags from external sources
  • Scrobbling: Sync reading progress to AniList, MyAnimeList, and others
  • Reviews and ratings: Community-driven ratings visible in your library

It’s not required — Kavita is fully functional without it. But if you have a large manga collection, the metadata enrichment is genuinely useful.


Updating Kavita

cd /opt/stacks/kavita
docker compose pull
docker compose up -d

Kavita handles database migrations automatically. Check the changelog before major version jumps — breaking changes are clearly documented.


Backup and Restore

Kavita stores everything in the config volume:

# Backup
docker compose stop
tar czf kavita-backup-$(date +%Y%m%d).tar.gz ./config
docker compose up -d

# Restore
docker compose stop
tar xzf kavita-backup-YYYYMMDD.tar.gz
docker compose up -d

The config directory contains:

  • kavita.db — SQLite database (users, libraries, progress, metadata)
  • covers/ — Extracted cover images
  • logs/ — Application logs
  • appsettings.json — Server configuration

For automated backups, add a cron job:

0 3 * * * cd /opt/stacks/kavita && docker compose stop && tar czf /backups/kavita-$(date +\%Y\%m\%d).tar.gz ./config && docker compose up -d

Troubleshooting

Library scan finds no content

  • Check that your volume mounts are correct — exec into the container and verify files exist:
    docker exec -it kavita ls /books
    
  • Ensure file permissions allow the container to read (Kavita runs as root by default)
  • Supported formats: epub, PDF, cbr, cbz, cb7, zip, rar, rar5, 7zip, raw images (jpg/png/webp in folders)
  • Check logs: docker logs kavita or browse config/logs/

High memory usage during scans

  • Large libraries (10,000+ files) spike during initial scanning — this is normal
  • Set MaxMemory in appsettings.json to limit: "MaxMemory": 512
  • Subsequent scans are incremental and much lighter

Cover images not generating

  • Ensure the config volume has write permissions
  • PDF cover extraction requires the built-in PDF renderer — verify with: docker exec kavita ls /kavita/wwwroot
  • Force regenerate: Library → three-dot menu → Refresh Covers

OPDS not working in mobile apps

  • Use the full URL including your API key: https://kavita.domain.com/api/opds/{api-key}
  • Some apps need the URL without a trailing slash
  • Check that your reverse proxy forwards headers correctly
  • Verify your Host Name is set correctly in admin settings

Slow performance with large libraries

  • Enable Server Settings → Tasks → Nightly scheduled tasks for background optimization
  • Consider mounting libraries on SSD rather than HDD for faster scanning
  • SQLite performs well up to ~50,000 items; beyond that, scan times may increase

Power User Tips

  1. Smart filters: Create custom filters based on metadata, then pin them to your dashboard sidebar
  2. Collections: Group series across libraries (e.g., “Currently Reading”, “Favorites”)
  3. Reading lists: Import CBL files for curated reading orders (great for comic events)
  4. Custom themes: Install community themes from the theme repository
  5. API access: Kavita has a full REST API — build custom integrations or scripts at /swagger
  6. Want to Read: Mark series to read later, visible from your dashboard
  7. Email notifications: Configure SMTP in admin settings for invite emails and password resets

Wrapping Up

Kavita fills a gap that Plex and Jellyfin don’t touch — a proper reading server that treats books, comics, and manga as first-class content types rather than afterthoughts. The web readers alone are worth the setup, and the multi-user support makes it perfect for family libraries.

Pair it with Caddy for HTTPS, Authentik for SSO, and a solid backup strategy to keep your reading library secure and accessible from anywhere.

Start with a small library, get the folder structure right, and let Kavita’s scanner do the heavy lifting. Your reading collection deserves better than a folder on a NAS.