What you are setting up
Kavita is a reading server. It reads comic and manga archives (cbz, cbr, zip, rar, 7zip and plain image folders) plus epub and pdf books, according to its README, and shows them in readers that work on a phone, a tablet or a desktop. Each person you invite gets their own login, reading progress and, if you want, an age rating limit.
It does not try to follow your folders as they are: Kavita groups files by their names and the metadata inside them. That is why a little tidying before the first scan saves you a lot of fixing later. If you keep audiobooks too, Audiobookshelf is the matching server for those.
Will a small server do?
Yes. The project's getting-started page says users have reported running Kavita on one 1 GHz core with 256 MB of memory, and every build ships with everything it needs. The one firm rule is the processor: it must support SSE4.2, because the image library that draws covers relies on it.
What actually grows is disk. Your collection lives there, and so do Kavita's covers, bookmarks and as many as 30 days of backup files. The first scan of a big library is slow, and the wiki notes that refreshing covers and analysing files lean hard on the disks, so local drives in the machine beat a network mount.
The server that fits
Start from how big your shelves are. For one household's library, a small cartridge server from the dedicated server list is plenty: it is a whole computer for one job. If the collection keeps growing, a server built to your specification lets you choose which drives go in and how many, with as many as 24 bays in the biggest models. Servers built to order need 4 to 24 hours when we hold the parts, and 5 to 10 working days when they have to be bought in.
- A ready server is handed over within 30 minutes of approval, after our payment and fraud checks.
- The port is unmetered, so friends reading big scans from their phones never run you over an allowance.
- The out-of-band console, a screen plus a power button that works even when the system will not boot, comes with rack servers and blades, and among cartridges with the m510 and m710x models; any other cartridge offers power on and off only.
- Month to month: no contract to sign.
For Kavita, avoid the X-Gene ARM cartridge. Ubuntu 16.04 and 18.04 are the only systems it takes, and this guide expects a current Ubuntu with a recent Docker, so choose any x86 server instead.
Up and running with Docker
You need a Docker Engine release numbered 28 or higher, plus its Compose plugin, installed from Docker's repository. Switch the firewall on before the container starts. Docker publishes a port that has no address in front of it on all of the server's addresses, 0.0.0.0 (IPv4) and [::] (IPv6). On IPv4 such a port is not filtered by ufw at all; on IPv6 the same goes once Docker manages IPv6 itself. Publishing on 127.0.0.1 instead keeps Kavita private, and from Docker Engine 28 that address answers only the server itself. As root:
- Let ufw handle IPv6 as well:
sed -i '/^IPV6=/c IPV6=yes' /etc/default/ufw - Keep your SSH session reachable:
ufw allow OpenSSH - Turn the firewall on without a prompt:
ufw --force enable - Make the folders:
mkdir -p /srv/kavita/config /srv/library/manga /srv/library/comics /srv/library/books - Save the file below as /srv/kavita/compose.yaml, then run
docker compose up -dfrom /srv/kavita.
services:
kavita:
image: jvmilazz0/kavita:latest
container_name: kavita
volumes:
- /srv/library/manga:/manga
- /srv/library/comics:/comics
- /srv/library/books:/books
- /srv/kavita/config:/kavita/config
environment:
- TZ=America/New_York
ports:
- "127.0.0.1:5000:5000"
networks:
- kavita
restart: unless-stopped
networks:
kavita:
ipam:
config:
- subnet: 172.30.50.0/24
gateway: 172.30.50.1
This is the wiki's Compose template with your own paths, the port pinned to loopback, and a fixed network of ours so the proxy step later has a known address. The same image is published as ghcr.io/kareadita/kavita if you prefer GitHub's registry; stay on the latest tag, since the wiki does not recommend nightly builds for your main library. Nothing secret goes in the environment here, and keep it that way: docker inspect shows every value in it.
Claim the admin account first
Kavita has no built-in username or password. In its source code (the RegisterFirstUser function), the very first sign-up is given the Admin role and later sign-up attempts are refused, so the first person to load the page decides who runs your library. Make sure it is you: from your own computer, connect with ssh -L 8085:127.0.0.1:5000 you@server-ip using your normal login, visit http://localhost:8085 and create the account with a strong password.
Then add an ordinary account for your own reading, as the wiki suggests, since an admin sees past every age filter. One more setting worth a look: anonymous usage statistics are switched on by default and first sent after 24 hours. You can turn them off in Server Settings.
Sort your folders so Kavita understands them
The wiki has two rules it will not bend. Nothing may sit loose at the top level of a library folder, and one series may not be spread over two neighbouring folders. Give every series a folder, put its volumes inside, and you are most of the way there.
- A good shape:
manga/One Series/One Series v01.cbz,One Series v02.cbz, with aSpecialsfolder for extras named with SP01, SP02. - Put the volume or chapter in the file name (v01 or vol. 1, ch. 1 or c01); a grouping folder for each publisher above the series is allowed.
- Ebooks are read from the details stored inside the epub, and the wiki suggests Calibre for correcting them.
- When you add a library, choose the type that matches (Manga, Image, Book, Light Novels, Comic or Comic (Flexible)) and pick /manga, /comics or /books, the paths inside the container.
Upload only titles you bought or have the rights to share, for example with rsync -rlt ~/comics/ you@server-ip:/srv/library/comics/ (give you ownership of /srv/library first).
Give it a web address with HTTPS
If only you and one or two others read, the wiki prefers a private VPN to a public site, and WireGuard on the same server does that job. For a wider circle, put a web server in front. Caddy, installed on the server itself, is the shortest of the wiki's examples, and it requests its own certificate, which only works once your name already leads to this server. So first create A and AAAA records for the name pointing at the server's addresses, then open the web ports by running ufw allow 80,443/tcp. The configuration goes in /etc/caddy/Caddyfile; apply it with systemctl reload caddy:
{
email you@example.com
}
kavita.example.com {
encode gzip
reverse_proxy 127.0.0.1:5000
}
One more step that matters with Docker. Kavita only believes forwarding headers that come from localhost, and the wiki warns that EPUB images can break otherwise. By our reading, Caddy reaches the container from the gateway of the Compose network, 172.30.50.1 in the file above. So stop the container with docker compose stop, open /srv/kavita/config/appsettings.json, add "KnownProxies": ["172.30.50.1"], as the first line inside the braces, run chmod 600 on the file, and start it again. The permission matters because, in Kavita's source (Program.cs), first start writes a random session key into this same appsettings.json. Finally enter your domain as the Host Name in Server Settings, so emails and OPDS links carry it.
Reading apps, OPDS and Kavita+
Every Kavita user has an OPDS link, already switched on, that reading apps can open; you copy it from your settings. Apps that understand OPDS-PS can stream comic pages one at a time instead of downloading whole files, and the wiki lists Panels, Chunky and KOReader among them. The link contains a personal key that logs in as you, so share it with nobody.
Kavita+ is a separate paid subscription from majora2007, Kavita's main developer, covering things that need an outside service: fetching metadata (Mangabaka, Hardcover, ComicBookRoundup), syncing reading progress to AniList, MAL, Hardcover and MangaBaka, and pulling in recommendations, reviews and ratings. One subscription unlocks it for everyone on your server, you can cancel and resume when you like, and it supports the three newest stable versions. The wiki promises nothing from the base app will be moved behind it, so your library works fully without it.
Backups and updates
You manage the server; we keep the hardware and the network running. Your copies are yours to make. Kavita helps: its source sets the backup task to daily, the wiki says that means midnight in your time zone, and 30 days are kept by default. Kavita's source (BackupService.cs) shows what each zip in /srv/kavita/config/backups holds: the database, the settings file with its session key, bookmarks, logs and some covers: those you locked on a series, volume or chapter, plus collection, library and reading-list covers. Other series, volume and chapter covers are left out, and so are your comics. As root, this stages private copies you can fetch, and clears staged copies older than 30 days:
install -d -m 700 -o you -g you /srv/kavita-out
printf '%s\n' '30 2 * * * root umask 077; cp -u /srv/kavita/config/backups/kavita_backup_*.zip /srv/kavita-out/ && chown you:you /srv/kavita-out/*.zip; find /srv/kavita-out -name "kavita_backup_*.zip" -mtime +30 -delete' > /etc/cron.d/kavita-out
chmod 644 /etc/cron.d/kavita-out
Fetch them from home with rsync -rt you@server-ip:/srv/kavita-out/ ~/kavita-copies/, and keep a copy of the library itself as well. To restore, the wiki's recipe is: stop Kavita, copy the contents of a backup zip into the config folder, start it. Before overwriting anything, run unzip -l against your chosen zip: it confirms the file is there and its listing opens, not that every file inside is sound. Then docker compose stop, unzip -o that zip into /srv/kavita/config, and docker compose start. Nothing is deleted first; matching files are simply replaced.
Updating is the wiki's pull-then-restart sequence, which Compose also runs as one command from /srv/kavita: docker compose up -d --pull always. Then clear out old images with docker image prune. If you are coming from a release older than v0.7.6, the wiki asks you to upgrade in steps rather than in one jump.
Questions people ask
- Is Kavita free, and what does its licence allow?
- Kavita is open source under GPL-3.0, according to the LICENSE file on GitHub. This is how we read it in general terms, not legal advice: you can run it, change it and let your readers use it over the web freely. The licence's conditions apply when you hand the program, or a changed version of it, to someone else: then its source goes with it under the same terms.
- Is there an official Kavita phone app?
- Not yet, says the wiki. You can add the website to your home screen so it opens full screen like an app, or use a third-party reader that speaks OPDS or Kavita's API.
- Do I have to buy Kavita+?
- No. Reading, users, collections, reading lists and OPDS all come with the free app. Kavita+ adds features that rely on outside services, such as fetched metadata and progress sync to sites like AniList.
- What happens to Kavita+ if I move Kavita to a new server?
- The licence is tied to one installation. The Kavita+ FAQ says a new machine, operating system or fresh install can show it as tied to another server; recent versions ask whether to overwrite, and older ones have a Reset button on the Kavita+ tab.
- Can friends read from my library?
- Yes. Invite them from the Users tab; without an email server set up you can create username-only accounts and tell them their password. Each account can be limited by age rating, and you decide whether it may download files.
- Will Kavita keep my own folder arrangement?
- No. The wiki's FAQ is firm that Kavita reads file names and embedded metadata and will never mirror folders. Tidy names and one folder per series give the best result.