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 librariesuser: 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:
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:
- Enter your email and password
- Click Create User
- You’ll be logged into the dashboard
Add a Library
- Click the + button or go to Settings → Libraries
- Click Add Library
- Give it a name (e.g., “Marvel”, “Manga”, or just “Comics”)
- Set the root folder to
/data(or a subfolder like/data/Manga) - 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:
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)
- Install Mihon (Tachiyomi fork) from GitHub
- Go to Extensions → Browse
- Install the Komga extension
- Configure with your server URL:
http://your-server-ip:25600 - Enter your Komga credentials
- Browse and read from your library
Panels (iOS)
- Install Panels from the App Store
- Add an OPDS feed:
http://your-server-ip:25600/opds/v1.2/catalog - Enter your credentials
- 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:
- Add a new proxy host
- Domain:
comics.yourdomain.com - Forward to:
your-server-ip:25600 - Enable SSL with Let’s Encrypt
- Enable WebSocket support
Or with Caddy:
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
-Xmx512mto-Xmx1gor 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
userin Docker Compose matches the owner of your comic files - Check with:
ls -la ~/comics/ - Adjust the
user:line or runchown -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=-Xmx256mfor 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: