Kavita is a self-hosted reading server for comics, manga, and e-books (open source, GPL-3.0). Store your files on the server, and Kavita sorts them into series, downloads cover art, and reads metadata from the files. Read directly in your browser using the built-in comic, manga, EPUB, and PDF readers. Kavita remembers where each account left off and offers reading lists, collections, and bookmarks. Multiple people can have their own accounts and reading progress.
This guide shows you two ways to get started: the easy way, using the One-Click App, which runs Kavita with your administrator account and HTTPS at your address, and a manual installation with Docker Compose. Afterward, you’ll create your libraries, upload files, and connect reading apps.
Kavita is a good choice if:
- You want to read your collection from anywhere. Your comics, manga, and books are all in one place, and you can pick up where you left off in your browser on a computer, tablet, or smartphone.
- You have a mix of formats. Kavita reads comic archives (CBZ, CBR, CB7, ZIP, RAR, 7Z), EPUB, PDF, and loose images in one interface.
- Several people will use it. Each account has its own reading progress. You can share libraries individually and set an age rating for each account.
- You use e-readers or reading apps. Many reading apps can access your collection through OPDS.
Kavita is less suitable if you mainly want to manage audiobooks or podcasts. Audiobookshelf is a better fit for that. For movies, TV shows, and music, use a media server such as Jellyfin. Also note that Kavita is a reading interface, not a file manager. Upload files to the server using SFTP, not through the web interface.
The quickest way to get Kavita running on your VPS is through its One-Click Apps. With a domain, the app is immediately accessible over HTTPS. You don’t need a reverse proxy, certificate, or firewall rules, and the One-Click App creates your administrator account during installation.
- A Linux VPS (Debian or Ubuntu) with One-Click Apps set up. See Set Up One-Click Apps for instructions.
- Kavita requires at least 1 vCore and 512 MB of RAM; 2 vCores and 2 GB are recommended. Allow 2 to 10 GB for the database, cover art, and cache, in addition to the space for your collection.
- Open your VPS in the ZapX dashboard and go to the One-Click Apps tab.
- Search for Kavita in the App catalog and click Install app.
- Use a custom subdomain or zap.cloud is already selected. Leave it enabled and enter a name, such as
books. Without a domain, Kavita would only be available over HTTP, and your password would be transmitted unencrypted. - No other details are needed. Under App configuration, you’ll see that a username and password are generated automatically. Click Queue installation. After two to three minutes, Kavita will show as Online on the app card.
If you open the address during the first few minutes, you may still see an error page (404 page not found). This is normal: Kavita isn’t accessible until your administrator account has been created.
The One-Click App creates your administrator account when it starts. You’ll also see the Login notice on the app card and in the app settings:
- Open the app settings (gear icon), then go to App environment > Automatically generated values. The username is listed under
SERVICE_USER_KAVITA; it iszapx. The password is listed underSERVICE_PASSWORD_KAVITA. Click the eye icon to reveal a value or the copy icon to copy it. - Open the app’s Access link.
- Sign in with the username
zapxand the password shown there, then click Sign in.
The One-Click App doesn’t offer public registration. Visitors will only see the login page. You’ll need to create any additional accounts yourself (see “Invite Additional Users”).
After your first login, change your password under Settings > Account. Click Edit next to Password. Also enter a real email address under Email; it will initially show only your username. Kavita needs an email address to reset a forgotten password later. Kavita won’t update the value under App environment: your new password will remain valid after an app restart or update.
The One-Click App creates two volumes:
kavita-mediais mounted in the container as the/mangafolder. Your comics, manga, and books go here. This is just a folder name—you can also store books and comics in it.kavita-configcontains Kavita’s database, settings, cover art, and automatic backups.
For instructions on uploading files to kavita-media and turning them into libraries, see “Create Libraries and Upload Files” below.
To check whether a new version is available, open the app settings (gear icon), go to App update, and click Check for updates. Install a new version by clicking Apply update. If the app is up to date, there’s no newer version in the app catalog. Accounts, reading progress, and libraries are preserved during updates. You can’t update Kavita from within its interface in the container.
A backup of your VPS from the Backups tab includes both volumes. Kavita also creates its own daily database backup in the kavita-config volume (Settings > Tasks > Kavita Backup). This protects you from a Kavita error, but not from losing your server.
The rest of this guide covers the manual installation of Kavita with Docker Compose on your VPS—for example, if you don’t use One-Click Apps on your server or want to manage Kavita yourself alongside other services. This is based on Kavita’s official Docker guide.
- A Linux VPS running Debian or Ubuntu, with SSH access. See First SSH Connection.
- Docker and Docker Compose. See Install Docker. Check the installation with
docker --versionanddocker compose version. - For HTTPS: a domain or subdomain whose A record points to your VPS IP address (e.g.,
books.example.com).
Kavita runs in a single container and includes its own database (SQLite). You’ll mainly need more resources when scanning large libraries and generating cover art:
| Minimum | Recommended | |
|---|---|---|
| CPU | 1 vCore | 2 vCores |
| RAM | 512 MB | 2 GB |
| Storage (excluding collection) | 2 GB | 10 GB |
Kavita listens on port 5000 inside the container. Don’t open this port; Kavita should only be accessible through a reverse proxy with HTTPS. With ufw, allow only SSH and the ports required by the reverse proxy:
sudo ufw allow OpenSSH
sudo ufw allow 80/tcp
sudo ufw allow 443/tcp
sudo ufw enable
sudo ufw status
In the Compose file below, port 5000 is bound only to 127.0.0.1. This means only the reverse proxy on the same server can access it, even if Docker sets its own firewall rules.
On a fresh manual installation, Kavita displays the “Register” page, and the first account created there becomes the administrator. Create your account through an SSH tunnel before setting up the reverse proxy (see “First Access and Administrator Account”). The registration page will then be closed. The One-Click App creates the account automatically, so this step isn’t necessary there.
Create a folder for Kavita, with subfolders for your collection:
mkdir -p ~/kavita/{config,comics,manga,books}
cd ~/kavita
Then create a compose.yaml file in the ~/kavita folder, for example, by running nano compose.yaml:
services:
kavita:
image: jvmilazz0/kavita:0.9.1
container_name: kavita
restart: unless-stopped
ports:
- "127.0.0.1:5000:5000"
environment:
- TZ=Europe/Berlin
volumes:
- ./config:/kavita/config
- ./comics:/comics
- ./manga:/manga
- ./books:/books
Important lines:
imageuses the official image with a fixed version number. Find the latest version in Kavita releases. Don’t usenightly; those are test versions.portsbinds Kavita to127.0.0.1only. The port won’t be accessible from outside.TZsets the time zone so daily tasks, such as scans and backups, run at the right time. Without this line, Kavita uses UTC../configcontains the database, settings, cover art, logs, and automatic backups../comics,./manga, and./booksare your media folders. In Kavita, they appear as/comics,/manga, and/books. You can choose different names or mount additional folders.
Start Kavita:
docker compose up -d
docker compose logs -f
On the first start, Kavita creates its database. After a few seconds, you’ll see Now listening on: http://[::]:5000. Press Ctrl+C to exit the log view; the container will keep running.
Create your account before setting up the reverse proxy. To do this, open an SSH tunnel. Run this command on your own computer:
ssh -L 5000:127.0.0.1:5000 root@SERVER_IP
- Open
http://localhost:5000in your browser. Kavita displays the Register page (“Complete the form to register an admin account”). - Enter a Username, an optional Email, and a Password with at least 6 characters, then click Register. This account will be the administrator.
- Sign in. The registration page will now be closed, and you’ll need to create any additional accounts yourself (see “Invite Additional Users”).
The email address doesn’t have to be real, but you’ll need it to reset a forgotten password later.
Set up nginx as a reverse proxy as described in Set Up a Reverse Proxy with nginx, then obtain a certificate as explained in SSL Certificate with Let's Encrypt. The server block for Kavita looks like this:
server {
listen 80;
server_name books.example.com;
location / {
proxy_pass http://127.0.0.1:5000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}
UpgradeandConnectionforward WebSockets. Kavita uses them to report scan progress and new content to the interface in real time.- Kavita runs at the root of the domain here. To use a subpath such as
/kavita, you’ll also need to set the Base Url in Kavita under Settings > General. Using a separate subdomain is easier.
Then run sudo nginx -t and sudo systemctl reload nginx, and obtain the certificate with sudo certbot --nginx -d books.example.com. Kavita will now be available at https://books.example.com.
The most important folder is ~/kavita/config, which contains the database, reading progress, and settings. Briefly stop the container to create a clean backup:
cd ~/kavita
docker compose stop
tar czf ~/kavita-config-$(date +%F).tar.gz config compose.yaml
docker compose start
Back up your media folders separately, for example, with rsync to another storage location. They rarely change and are often large. Kavita also creates its own daily backup in the config/backups folder. To restore, stop Kavita with docker compose down, extract the archive in the ~/kavita folder, and start Kavita again with docker compose up -d.
Create a backup first and read the release notes. Then enter the new version number for image in compose.yaml and run:
cd ~/kavita
docker compose pull
docker compose up -d
docker image prune -f
When it starts, Kavita automatically updates the database to the new version. The Running Migrations messages in the log are normal.
Kavita’s interface is in English, so this guide uses the English labels. Open settings using the gear icon in the top-right (Settings).
Kavita doesn’t have an upload feature in the web interface. Upload your files to the server using SFTP. See Connect over SFTP for instructions.
- One-Click App: The media folder is the Docker volume whose name ends with
_kavita-media. Find the exact name withdocker volume ls | grep kavita. Asroot, upload files to the_datasubfolder of this volume, that is, to/var/lib/docker/volumes/<Name of the volume>/_data. This folder is called/mangain Kavita. - Manual installation: Upload files to the folders under
~/kavita, for example,~/kavita/comics.
Kavita expects each series to have its own folder. If files are loose in the library folder, Kavita often won’t recognize the series correctly. Here’s an example of a working structure:
/manga
├── Comics
│ └── Mein Comic
│ ├── Mein Comic 001.cbz
│ └── Mein Comic 002.cbz
└── Books
└── Autor - Buchtitel
└── Buchtitel.epub
Create separate subfolders for comics, manga, and books, because each library has its own type. For exact file-naming rules, see the Kavita documentation.
- Open Settings > Libraries and click Add Library.
- Under General, enter a Name and choose a Type: Comic or Comic (Flexible) for Western comics, Manga for manga with volumes, Book for EPUB books, Light Novel, or Image for loose images. The type determines how Kavita interprets file names.
- Click Next, then Browse for Media Folders. Select your library folder—for example, in the One-Click App, choose
/manga>Books—and confirm with Share. - Under Advanced, use File Types to choose which files Kavita reads (Archive, Epub, Pdf, Image).
- Click Save. Kavita scans the library immediately, and after a short time, the series appear on the home page.
Kavita automatically finds new files during its daily scan. To start a scan right away, click the three dots next to the library in the sidebar.
Go to Settings > Users and click Invite. Enter an email address, select the libraries to share and the permissions (such as Download or Change Password), and, if needed, set an Age Rating Restriction. If email isn’t configured, Kavita will show you an invitation link that you can share yourself. The invited person can use the link to create an account with their own password.
If you want Kavita to send emails—for invitations, password reset links, or Send To Device to a Kindle, for example—enter an SMTP server under Settings > Email, and enter your Kavita server’s address under Host Name.
On a smartphone or tablet, simply open Kavita in your browser. You can add the page to your home screen from the browser menu so that it launches like an app.
For reading apps that support OPDS, find the OPDS URL under Settings > Auth Keys / OPDS. Add it to your app as a catalog. The address contains a personal key and should be treated like a password: don’t share it. Click Rotate to generate a new key; existing connections will then stop working. The Kavita documentation lists compatible apps.
- No uploads or file management in the browser. You’ll need to use SFTP to transfer files to the server, rename them, and move them.
- No DRM-protected books. Kavita can’t open purchased e-books with copy protection.
- Internet metadata such as descriptions and ratings is only available with Kavita+, a paid add-on from the Kavita developers. Without Kavita+, Kavita uses metadata in the files (such as
ComicInfo.xmlor EPUB details) and your folder names.
With Kavita, you can keep your comics, manga, and e-books on your own server and read them in a browser or reading apps, with separate reading progress for each account. The quickest way to get started is with the One-Click App: queue the installation, sign in with zapx and the generated password, upload files using SFTP, and create your first library. If you want to manage Kavita yourself, the manual Docker Compose installation gives you full control.
