If you have a collection of comics, manga, or graphic novels sitting in folders on a hard drive, Komga turns that pile into a fully browsable, searchable library with a built-in web reader. Think of it as Jellyfin, but purpose-built for comics and manga.

What is Komga?

Komga is a free, open-source media server for comics, manga, magazines, and eBooks. It scans your existing files (CBZ, CBR, PDF, EPUB), organizes them into libraries and series, and serves them through a clean web interface or any OPDS-compatible reader app.

Why Self-Host a Comic Server?

  • Read anywhere: Access your collection from any device with a browser
  • Web reader: No app required — read directly in the browser with a solid reader
  • OPDS support: Use apps like Tachiyomi, Panels, Chunky, or any OPDS reader
  • Multi-user: Create accounts for family members with separate read progress
  • Metadata scraping: Automatic series grouping and metadata from ComicInfo.xml
  • No cloud dependency: Your files, your server, no subscriptions

Prerequisites

Before starting, you’ll need:

  • A Linux server (Ubuntu 22.04+ or Debian 12+ recommended)
  • Docker and Docker Compose installed
  • A collection of comic/manga files (CBZ, CBR, PDF, or EPUB)
  • 512MB+ RAM (Komga is lightweight)

Step 1: Create the Directory Structure

Set up a dedicated directory for Komga’s configuration:

mkdir -p ~/komga/config

You’ll also need your comic/manga files accessible somewhere. For this guide, we’ll assume they’re at ~/comics. Adjust the path to match your setup.

# Example structure
~/comics/
├── Marvel/
│   ├── Spider-Man/
│   └── X-Men/
├── Manga/
│   ├── One Piece/
│   └── Berserk/
└── DC/
    └── Batman/

Step 2: Create the Docker Compose File

Create ~/komga/docker-compose.yml:

version: "3"
services:
  komga:
    image: gotson/komga:latest
    container_name: komga
    volumes:
      - ./config:/config
      - ~/comics:/data
    ports:
      - "25600:25600"
    environment:
      - TZ=America/New_York
      - JAVA_TOOL_OPTIONS=-Xmx512m
    user: "1000:1000"
    restart: unless-stopped

Key settings:

  • Port 25600: Komga’s default web interface port
  • /config: Stores the database, thumbnails, and settings
  • /data: Your comic/manga files (read-only access is fine)
  • JAVA_TOOL_OPTIONS: Limits memory usage to 512MB — adjust up for larger libraries
  • user: Runs as your user to avoid permission issues

Step 3: Start Komga

cd ~/komga
docker compose up -d

Verify it’s running:

docker logs komga

You should see Komga starting up and eventually:

StartedKomgaApplicationinXseconds

Step 4: Initial Configuration

Open your browser and navigate to http://your-server-ip:25600.

On first launch, you’ll be prompted to create an admin account:

  1. Enter your email and password
  2. Click Create User
  3. You’ll be logged into the dashboard

Add a Library

  1. Click the + button or go to Settings → Libraries
  2. Click Add Library
  3. Give it a name (e.g., “Marvel”, “Manga”, or just “Comics”)
  4. Set the root folder to /data (or a subfolder like /data/Manga)
  5. Click Add

Komga will scan the folder and start importing your files. For large collections, this might take a few minutes.

Library Scan Settings

Under each library’s settings, you can configure:

  • Scan interval: How often Komga checks for new files (default: every 30 minutes)
  • Scanner: Enable/disable metadata parsing from ComicInfo.xml
  • Thumbnails: Generate cover thumbnails during scan

Step 5: Organize Your Files

Komga is smart about file organization, but following a clean structure helps:

/dataS/erieSSSseeerrrNiiiaeeemssse/NNNaaammmeeeVVVooolll...000123...cccbbbzzz

Tips for best results:

  • One folder per series: Komga groups files in the same folder as a series
  • Consistent naming: Include volume/chapter numbers for correct ordering
  • ComicInfo.xml: If your files have embedded metadata, Komga reads it automatically
  • Supported formats: CBZ, CBR, PDF, EPUB (CBZ is recommended for best performance)

Step 6: Connect Reader Apps

Komga supports OPDS, which means you can use dedicated reader apps on any device.

Tachiyomi / Mihon (Android)

  1. Install Mihon (Tachiyomi fork) from GitHub
  2. Go to Extensions → Browse
  3. Install the Komga extension
  4. Configure with your server URL: http://your-server-ip:25600
  5. Enter your Komga credentials
  6. Browse and read from your library

Panels (iOS)

  1. Install Panels from the App Store
  2. Add an OPDS feed: http://your-server-ip:25600/opds/v1.2/catalog
  3. Enter your credentials
  4. Your libraries appear automatically

Web Reader

Komga’s built-in web reader is excellent:

  • Click any book to open the reader
  • Supports left-to-right and right-to-left reading (manga mode)
  • Page preloading for smooth reading
  • Keyboard shortcuts: arrow keys to navigate, F for fullscreen
  • Double-page spread support

Step 7: Reverse Proxy (Optional)

To access Komga over HTTPS with a domain name, add it to your reverse proxy. Here’s an Nginx Proxy Manager example:

  1. Add a new proxy host
  2. Domain: comics.yourdomain.com
  3. Forward to: your-server-ip:25600
  4. Enable SSL with Let’s Encrypt
  5. Enable WebSocket support

Or with Caddy:

c}omicrse.vyeorusred_opmraoixny.cloomca{lhost:25600

Troubleshooting

Books not showing up

  • Check file permissions: Komga needs read access to your files
  • Verify the path mapping in Docker Compose matches your actual file locations
  • Trigger a manual library scan from Settings → Libraries → Scan

Slow scanning on large libraries

  • Increase memory: Change -Xmx512m to -Xmx1g or higher
  • First scan is always slowest — subsequent scans only process new/changed files
  • CBR files are slower than CBZ (RAR vs ZIP decompression)

Permission denied errors

  • Make sure the user in Docker Compose matches the owner of your comic files
  • Check with: ls -la ~/comics/
  • Adjust the user: line or run chown -R 1000:1000 ~/comics/ if needed

High memory usage

  • Komga runs on Java, which can be memory-hungry with large libraries
  • Set JAVA_TOOL_OPTIONS=-Xmx256m for smaller collections
  • Consider splitting into multiple libraries instead of one massive one

Useful API Endpoints

Komga has a full REST API for automation:

# List all series
curl -u user:password http://localhost:25600/api/v1/series

# Trigger a library scan
curl -X POST -u user:password http://localhost:25600/api/v1/libraries/{id}/scan

# Get read progress
curl -u user:password http://localhost:25600/api/v1/books/{id}/read-progress

Wrapping Up

Komga is one of those tools that does one thing really well. If you have comic or manga files scattered across drives, it turns that chaos into a clean, browsable library you can access from any device. The web reader alone is worth the setup, and OPDS support means you can use whatever reader app you prefer.

The resource footprint is tiny — it runs happily on a Raspberry Pi 4 — so there’s no reason not to give it a shot if you have any kind of comic collection.

Useful links: