---
title: "Deploy Komga"
description: "Organize and read your comics, manga and eBooks from any device."
category: "Other"
url: https://railway.com/deploy/komga-comic-server
---

# Deploy Komga

Organize and read your comics, manga and eBooks from any device.

**[Deploy Komga on Railway](https://railway.com/template/komga-comic-server)**

Machine-readable deploy manifest (JSON, validated by TemplateCI): https://railway.com/deploy/komga-comic-server/manifest.json

- **Creator:** blueorange
- **Category:** Other

## Template content

### Komga https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/komga.svg

- **Image:** gotson/komga:latest
- **Public domain:** Yes

## Documentation

# Deploy and Host Komga on Railway

![Komga logo](https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/komga.svg)

Komga is an open source **media server for comics, manga, BDs, magazines and eBooks**. Point it at folders of CBZ, CBR, PDF and EPUB files and it builds a browsable library with series, covers, metadata, collections and reading lists. Read in the built-in web reader, sync progress with Kobo e-readers and KOReader, or use OPDS apps such as Panels, Chunky and Moon+ Reader. It is MIT licensed with about 6,800 GitHub stars, and 1.30.1 shipped in November 2026. This template runs Komga on Railway with a persistent volume for its database and your books, a 512 MB Java heap, and a public HTTPS domain. Komga is free software with no paid tier, and hosting it on Railway costs about $5/month plus volume storage for your files.

---

## What This Template Deploys

| Service | Purpose |
|---|---|
| **Komga** | `gotson/komga:latest`, the official image, on port `25600` with a public domain. Web UI, web reader, REST API, OPDS feeds and Kobo and KOReader sync. |
| **Persistent Volume** | Mounted at `/config`. Holds Komga's database, thumbnails and settings, and is also where you store your books, for example under `/config/books`. |

---

## About Hosting Komga

Comic and manga collections grow quickly, and reading them across a tablet, phone and e-reader means copying files around. Komga keeps one library on a server and serves it to every device, remembering where you stopped. Hosting it on Railway means the library is reachable from anywhere over HTTPS, not only on your home network, and nothing depends on a computer staying switched on at home.

**Search and filters.** Full-text search covers series, books, authors, tags and publishers, and filters let you browse by status, genre, language, age rating or read progress.

**Libraries and series.** Each library is a folder. Komga groups files into series by subfolder, reads embedded metadata such as ComicInfo.xml and EPUB data, and lets you edit titles, summaries, authors, tags and age ratings.

**Web reader.** Read in the browser with paged, continuous vertical (webtoon) and double-page modes, left-to-right or right-to-left for manga.

**eBooks too.** EPUB files open in a dedicated reader, alongside PDFs and image-based comics.

**Collections and read lists.** Group series across libraries into collections, and build ordered reading lists for crossovers and events.

**Personal touches.** Mark books read or unread, keep per-series reading direction, see what's on deck next in each series, and pick up the next unread issue from the home page.

**Reading progress everywhere.** Progress is tracked per user and syncs to Kobo devices through Kobo Sync and to KOReader through its sync plugin.

**OPDS and API.** OPDS v1 and v2 feeds work with many reading apps, and a REST API powers third-party clients, including the Komga extension for Mihon, formerly Tachiyomi.

**Users and restrictions.** Create accounts for family or friends, limit them to certain libraries, and restrict content by age rating or labels.

---

## Deploy Komga in Under 5 Minutes

1. Click **Deploy on Railway**.
2. Wait for the service to start, then open the public domain.
3. **Create the admin account straight away.** Komga asks for the first user on its first visit, and anyone who opens the URL first could claim it.
4. Upload your books into a folder on the volume, such as `/config/books`, using the Railway CLI or a file browser service.
5. In Komga, add a library that points at that folder and run a scan.

---

## Common Use Cases

- **Comic collection:** serve DRM-free CBZ and CBR files to every device you own.
- **Manga reading:** read right-to-left or in webtoon mode, with progress synced across devices.
- **eBook library:** host EPUB and PDF books alongside comics in one app.
- **Kobo e-readers:** sync your library and reading position to a Kobo device.
- **Family library:** give each person an account with libraries and age limits that suit them.
- **Mobile apps:** connect OPDS readers on iOS and Android to read offline.
- **Webtoons:** read long vertical strips in continuous mode with smooth scrolling.
- **Magazines and PDFs:** keep magazine runs organized by series and issue number.
- **Reading lists for events:** follow a crossover across many series in the right order.
- **Archiving scans:** keep a long-term, searchable archive of your own scanned books.

---

## Configuration

| Variable | Required | Default | Description |
|---|---|---|---|
| `SERVER_PORT` | Optional | `25600` | Port Komga listens on |
| `PORT` | Auto-set | `25600` | Tells Railway which port to route |
| `JAVA_TOOL_OPTIONS` | Optional | `-Xmx512m` | Maximum Java heap size |
| `TZ` | Optional | `UTC` | Container timezone |
| `RAILWAY_RUN_UID` | Optional | `0` | Runs as root so Komga can write to the volume |

**Where your books go.** Railway gives each service one volume, so books live on the same volume as Komga's data. Make a folder such as `/config/books` and add it as a library. Grow the volume in Railway as your collection grows.

**Getting files onto the volume.** Use `railway ssh` or a small file manager service attached to the same project. Large collections upload faster as zipped batches that you unpack on the volume.

**Memory.** Raise `-Xmx512m` to `-Xmx1g` or more in `JAVA_TOOL_OPTIONS` for very large libraries or many simultaneous readers, and give the service matching memory.

**Scans and new files.** Turn on periodic scanning or folder watching per library so new issues appear automatically. Large libraries take a while on the first scan while Komga builds thumbnails and the search index.

**Metadata.** Komga reads ComicInfo.xml inside CBZ files and EPUB metadata. You can also edit series and book details in the UI, or import series details from Mylar `series.json` files and local cover art.

**Duplicate pages and conversions.** Library options can detect pages that repeat across books, such as scanner credits, and remove them, and can convert CBR and RAR archives to CBZ.

**Users and sharing.** Add accounts under **Server, Users**. Give each person access to only the libraries they need, and set age ratings or label limits for younger readers.

**Backups.** Komga's database and your books are both on the volume, so Railway volume backups protect everything at once.

**Kobo sync.** Create a Kobo Sync API key in your Komga account settings and follow Komga's Kobo guide to point your device at your Railway domain.

**Custom domain.** Add your own domain in Railway so OPDS and Kobo settings keep working if you ever move the service.

---

## Komga vs. Alternatives

| Feature | Komga on Railway | Kavita | Calibre-Web | Ubooquity |
|---|---|---|---|---|
| Hosting | Self-hosted | Self-hosted | Self-hosted | Self-hosted |
| License | MIT | GPL-3.0 | GPL-3.0 | Freeware |
| Comics and manga focus | ✅ | ✅ | ❌ | ✅ |
| EPUB support | ✅ | ✅ | ✅ | ✅ |
| Kobo sync | ✅ | ❌ | ✅ | ❌ |
| Metadata editing | ✅ | ✅ | ✅ | ❌ |
| OPDS | ✅ | ✅ | ✅ | ✅ |
| Price | About $5/month plus storage | Hosting cost | Hosting cost | Hosting cost |

Kavita has a polished reader and strong manga support. Calibre-Web is best for prose eBook libraries managed in Calibre. Komga stands out for comics, metadata editing and device sync.

---

## Dependencies for Komga Hosting

- A Railway account.
- Enough volume space for your collection; comics often take 30 to 100 MB per issue.
- Your comic, manga or eBook files in CBZ, CBR, PDF or EPUB format.

### Deployment Dependencies

- [Komga on GitHub](https://github.com/gotson/komga): source code and releases
- [Komga documentation](https://komga.org/): libraries, Kobo sync, OPDS and API guides
- [Komga on Docker Hub](https://hub.docker.com/r/gotson/komga): image tags

### Implementation Details

The image follows the `latest` tag, so a redeploy picks up new releases; the current one is 1.30.1. Komga stores its SQLite database, thumbnails and Lucene search index under `/config`, all on the volume. Komga leaves your book files untouched unless you run its optional file tools, such as converting CBR to CBZ or removing duplicate pages. Scans can run on a schedule or when you trigger them from the library menu.

---

## Frequently Asked Questions

**What is Komga?**
An MIT-licensed media server that organizes and serves comics, manga, magazines and eBooks to browsers, e-readers and reading apps.

**How much does it cost to host Komga?**
About $5/month on Railway, plus volume storage for your collection.

**How do I add my comics?**
Copy them into a folder on the `/config` volume, then add that folder as a library and scan it.

**Which formats does Komga support?**
CBZ, CBR, PDF and EPUB, plus ComicInfo.xml and EPUB metadata.

**Can I read on my Kobo or phone?**
Yes. Use Kobo Sync for Kobo devices, the KOReader sync plugin, or any OPDS reading app.

**How do I secure my server?**
Create the admin account on the first visit, then add separate users with library and age restrictions.

---

## Why Deploy and Host Komga on Railway?

Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.

By deploying Komga on Railway, you get your own comic, manga and eBook library that syncs reading progress across devices, without subscriptions or storage limits beyond your volume.


## Similar templates

- [Rocky Linux](https://railway.com/deploy/rocky-linux) — Hosted Rocky Linux 9 workspace with SSH and persistent storage. 🚀
- [Foundry Virtual Tabletop](https://railway.com/deploy/X5tR6G) — Self-hosted virtual tabletop for role-playing games (license required)
- [Letta Code Remote](https://railway.com/deploy/letta-code-remote) — Run a Letta Code agent 24/7. No inbound ports, just deploy.

Open this page in a browser: https://railway.com/deploy/komga-comic-server
