### Komf Extension - Add New Origin Example Source: https://wiki.kavitareader.com/guides/external-tools/komf When configuring the Komf browser extension, this is an example of how to input your Kavita install's IP address and port. This is used to establish the initial connection between the extension and your Komf backend. ```text http://192.168.0.100:5000 ``` -------------------------------- ### Install Node Packages and Angular CLI Source: https://wiki.kavitareader.com/contributing Navigate to the UI web directory and install necessary Node packages and the global Angular CLI. ```bash cd Kavita/UI/Web npm install npm install -g @angular/cli ``` -------------------------------- ### Start Kavita on macOS Source: https://wiki.kavitareader.com/installation/native Navigate to the Kavita directory and execute the Kavita binary to start the server on macOS. Ensure you are in the correct directory for appsettings.json to be found. The 'codesign' command is only needed on the first run. ```bash cd Kavita codesign -s - Kavita ./Kavita ``` -------------------------------- ### Install Kavita using Scoop Source: https://wiki.kavitareader.com/installation/native Use these commands to add the 'extras' bucket and install Kavita via Scoop. Ensure your service path is correct after updating if running as a service. ```bash scoop bucket add extras scoop install kavita ``` -------------------------------- ### Start Kavita Service Source: https://wiki.kavitareader.com/installation/native Manually start the Kavita service using the 'sc start' command. If 'sc' fails, try 'sc.exe'. ```powershell sc start kavita ``` -------------------------------- ### Install Shawl for Service Management with Scoop Source: https://wiki.kavitareader.com/installation/native Install the Shawl utility using Scoop to manage Kavita as a service. This is recommended for easier service management. ```bash scoop install shawl ``` -------------------------------- ### Configure Kavita Service to Auto Start Source: https://wiki.kavitareader.com/installation/native Set the Kavita service to automatically start on system boot using the 'sc config' command. This ensures Kavita is available after a restart. ```powershell sc config kavita start= auto ``` -------------------------------- ### Minimum Komf application.yml Configuration Source: https://wiki.kavitareader.com/guides/external-tools/komf This is the essential configuration for Komf to start. Ensure 'baseUri' points to your Kavita install and 'apiKey' is a valid Kavita authentication key. The 'database.file' specifies the SQLite database location. ```yaml kavita: baseUri: "http://localhost:5000" #or env:KOMF_KAVITA_BASE_URI apiKey: "YOUR_AUTH_KEY_HERE!" #or env:KOMF_KAVITA_API_KEY database: file: ./database.sqlite # database file location. ``` -------------------------------- ### Create Kavita systemd Service File Source: https://wiki.kavitareader.com/installation/native Save this content to `/etc/systemd/system/kavita.service` to configure Kavita as a systemd service. Customize `User`, `Group`, `WorkingDirectory`, and `ExecStart` to match your installation. ```ini [Unit] Description=Kavita Server After=network.target [Service] User=kavita Group=kavita Type=simple WorkingDirectory=/opt/Kavita ExecStart=/opt/Kavita/Kavita TimeoutStopSec=20 KillMode=process Restart=on-failure [Install] WantedBy=multi-user.target ``` -------------------------------- ### Manga Folder Structure Example Source: https://wiki.kavitareader.com/guides/scanner/manga Illustrates a recommended directory layout for organizing manga series and volumes within the library root. ```tree Library Root ┖── Series Name ┠── Series Name v01.cbz ┠── Series Name v02.cbz ┠── Series Name v03.cbz ┖── Specials ┖── Series Name Omakes SP01.cbz ┖── Series Name 2 ┠── Series Name 2 Vol.01 Ch.1.cbz ┠── Series Name 2 Vol.01 Ch.2.cbz ⋮ ┖── Series Name 2 Vol.02 Ch.6.cbz ``` -------------------------------- ### Legacy Comic Folder Structure Example Source: https://wiki.kavitareader.com/guides/scanner/comic Illustrates the expected folder hierarchy for the legacy comic parsing structure in Kavita. ```tree ┖── Series Name ┠── Series Name v01.cbz ┠── Series Name v02.cbz ┖── Series Name v03 c01.cbz ``` -------------------------------- ### Python Example for Kavita API Authentication and Scan Source: https://wiki.kavitareader.com/guides/api This Python script demonstrates how to connect to the Kavita API using an API key, check for authentication key expiration, and initiate a library scan. Ensure your API key is valid and the provided URL is correct. ```python import requests from urllib.parse import urlparse from datetime import datetime, timezone url = input("Paste in your full ODPS URL from your Kavita user dashboard (or url with auth key) (/preferences#clients): ") parsed_url = urlparse(url) host_address = parsed_url.scheme + "://" + parsed_url.netloc api_key = parsed_url.path.split('/')[-1] headers = { "x-api-key": api_key, "Content-Type": "application/json" } # Check if the Auth key is expired try: expiry_response = requests.get(host_address + "/api/plugin/authkey-expires", headers=headers) expiry_response.raise_for_status() expiry_time = expiry_response.json().get("expiresAt") if expiry_time is not None: expiry_dt = datetime.fromisoformat(expiry_time.replace('Z', '+00:00')) if expiry_dt <= datetime.now(timezone.utc): print("Error: Auth key has expired") exit() except requests.exceptions.RequestException as e: print("Error checking Auth key expiration:", e) exit() # Perform the scan scan_endpoint = "/api/Library/scan-all" response = requests.post(host_address + scan_endpoint, headers=headers) ``` -------------------------------- ### Add Kavita as a Service using Shawl Source: https://wiki.kavitareader.com/installation/native Configure Kavita to run as a service using Shawl. Replace the placeholder paths with your actual Kavita installation directory and executable path. Requires PowerShell run as administrator. ```powershell shawl add --name Kavita --cwd C:\Users\Diesel\scoop\apps\kavita\current -- C:\Users\Diesel\scoop\apps\kavita\current\Kavita.exe ``` -------------------------------- ### Example: Detailed Report Output Source: https://wiki.kavitareader.com/guides/external-tools/cbz-missing-sequence-checker Illustrates the output format of the detailed report, highlighting missing chapters and the number of gaps found. ```text ⚠ MISSING XYZ Series [49 CBZ files] ──────────────────────────────────────────────────────────────────────────── Chapter/Episode found : 48-80, 82-92 !! MISSING Ch/Ep : 81 (1 gap) ``` -------------------------------- ### Change Ownership of Kavita Directory Source: https://wiki.kavitareader.com/installation/native Recursively change the owner and group of the Kavita installation directory to the `kavita` user and group. This is necessary for the systemd service to access the files. ```bash sudo chown -R kavita:kavita /opt/Kavita ``` -------------------------------- ### Manga Filename Parsing Examples Source: https://wiki.kavitareader.com/guides/scanner/manga Demonstrates various filename formats supported by the Kavita scanner and how they are parsed into series name, volume, and chapter. ```text Filename| Parsed Series Name| Volume| Chapter ---|---|---|--- `Noblesse - Episode 406 (52 Pages).7z`| Noblesse| 406| `[Hidoi]_Amaenaideyo_MS_vol01_chp02.rar`| Amaenaideyo MS| 1| 2 `Transferred to another world magical swordsman v1.2`| Transferred to another world magical swordsman| 1| 2 `Okusama wa Shougakusei c003 (v01) [bokuwaNEET]`| Okusama wa Shougakusei| 1| 3 `Goblin Slayer Side Story - Year One 025.5`| Goblin Slayer Side Story - Year One| | 25.5 `Itoshi no Karin - c001-006x1 (v01) [Renzokusei Scans]`| Itoshi no Karin| | 1-6 `Beelzebub_53[KSH].zip`| Beelzebub| | 53 `Killing Bites Vol. 0001 Ch. 0001 - Galactica Scanlations (gb)`| Killing Bites| 1| 1 ``` -------------------------------- ### Example Directory Structure for Manga Scanning Source: https://wiki.kavitareader.com/guides/scanner/image Illustrates the recommended folder structure for organizing manga files to be scanned by Kavita. This structure helps Kavita correctly identify series, volumes, and chapters. ```tree ┖── Series Name ┠── Volume 1 ┠── Chapter 1 ┠── 01.png ┠── Chapter 2 ┖── 01.png ``` -------------------------------- ### Example: Unidentified Files Report Output Source: https://wiki.kavitareader.com/guides/external-tools/cbz-missing-sequence-checker Shows the output snippet for unidentified files, listing files that the checker could not resolve based on naming conventions. ```text ──────────────────────────────────────────────────────────────────────────── XYZ Series [1 file] ──────────────────────────────────────────────────────────────────────────── Prologue.cbz ``` -------------------------------- ### Updating Kavita with Scoop Source: https://wiki.kavitareader.com/installation/updating/updating-native If you installed Kavita using Scoop, use this command to update it to the latest version. ```powershell scoop update kavita ``` -------------------------------- ### Comic Library File Structure Example Source: https://wiki.kavitareader.com/guides/scanner/comicvine Illustrates the expected directory and file naming convention for the Comic library type. Kavita parses series and volume years from folder names, and can override this with ComicInfo.xml data. ```text Library Root ┖── Series Name (Starting Volume Year) ┠── Series Name (Vol Year) #01.cbz ┠── Series Name (Vol Year) #02.cbz ┠── Series Name (Vol Year) #03.cbz ┖── Series Name 2 (Starting Volume Year) ┠── Series Name 2 #01.cbz ┠── Series Name 2 #02.cbz ⋮ ┖── Series Name 2 #06.cbz ``` -------------------------------- ### Docker Run Command for Kavita Source: https://wiki.kavitareader.com/installation/docker/lsio This command can be used to run the Kavita Docker container directly. Remember to adjust the volume paths according to your setup. ```bash docker run -d \ --name=kavita \ -e PUID=1000 \ -e PGID=1000 \ -e TZ=Etc/UTC \ -p 5000:5000 \ -v /path/to/kavita/config:/config \ -v /path/to/data:/data `#optional` \ --restart unless-stopped \ lscr.io/linuxserver/kavita:latest ``` -------------------------------- ### Docker Compose for Nightly Kavita Branch Source: https://wiki.kavitareader.com/installation/docker/github Deploy the nightly build of Kavita using this Docker Compose setup. This is recommended for testing new features and bug fixes. Note the different configuration path and port mapping. ```yaml services: kavita: image: ghcr.io/kareadita/kavita:nightly # Using the nightly branch from ghcr.io container_name: kavita volumes: - /your/path/to/manga:/manga - /your/path/to/comics:/comics - /your/path/to/books:/books - /different/path/to/config/:/kavita/config # /kavita/config must not be changed environment: - TZ=Your/Timezone ports: - "5005:5000" restart: unless-stopped ``` -------------------------------- ### SWAG Reverse Proxy Configuration for Kavita Source: https://wiki.kavitareader.com/installation/remote-access/swag-example Place this configuration in `/nginx/proxy-confs/kavita.subdomain.conf`. Ensure Kavita and SWAG are on the same Docker network. Adjust `server_name`, `$upstream_app`, `$upstream_port`, and `$upstream_proto` if your setup differs. ```nginx ## Version 2022/08/22 # make sure that your dns has a cname set for kavita # if kavita is running in bridge mode and the container is named "kavita", the below config should work as is # if not, replace the line "set $upstream_app kavita;" with "set $upstream_app ;" # or "set $upstream_app ;" for host mode, HOSTIP being the IP address of kavita server { listen 443 ssl; listen [::]:443 ssl; server_name kavita.*; include /config/nginx/ssl.conf; client_max_body_size 0; # enable for ldap auth, fill in ldap details in ldap.conf #include /config/nginx/ldap.conf; # enable for Authelia #include /config/nginx/authelia-server.conf; location / { # enable the next two lines for http auth #auth_basic "Restricted"; #auth_basic_user_file /config/nginx/.htpasswd; # enable the next two lines for ldap auth #auth_request /auth; #error_page 401 =200 /ldaplogin; # enable for Authelia #include /config/nginx/authelia-location.conf; include /config/nginx/proxy.conf; include /config/nginx/resolver.conf; set $upstream_app kavita; set $upstream_port 5000; set $upstream_proto http; proxy_pass $upstream_proto://$upstream_app:$upstream_port; proxy_set_header X-Scheme $scheme; } # Needed for OPDS access while using Authelia/ldap location ~ /api { include /config/nginx/proxy.conf; include /config/nginx/resolver.conf; set $upstream_app kavita; set $upstream_port 5000; set $upstream_proto http; proxy_pass $upstream_proto://$upstream_app:$upstream_port; } } ``` -------------------------------- ### Special File Grouping with Subfolder Source: https://wiki.kavitareader.com/guides/scanner/managefiles This example shows how Kavita can parse the series name from a parent folder when a special file is located in a 'Specials' subfolder. The filename 'Again The After Story SP01.cbz' is grouped under the 'Again!!' series. ```text Library Root ┖── Again!! ┖── Specials ┖── Again The After Story SP01.cbz ``` -------------------------------- ### Running Kavita on macOS Source: https://wiki.kavitareader.com/installation/updating/updating-native After updating files on macOS, navigate to the Kavita directory and run the executable to ensure `appsettings.json` is acquired correctly. ```bash cd ~/Kavita ./Kavita ``` -------------------------------- ### Download Kavita Release using wget Source: https://wiki.kavitareader.com/installation/native Use wget to download a specific release of Kavita from GitHub. Replace `{version}` and `{arch}` with the desired version and architecture. ```bash wget https://github.com/Kareadita/Kavita/releases/download/{version}/kavita-linux-{arch}.tar.gz ``` -------------------------------- ### Docker Compose Configuration for Kavita Source: https://wiki.kavitareader.com/installation/docker/lsio Use this template to set up your Kavita Docker Compose file. Ensure you modify the folder paths to point to your media and configuration directories. ```yaml services: kavita: image: lscr.io/linuxserver/kavita:latest container_name: kavita environment: - PUID=1000 - PGID=1000 - TZ=Etc/UTC volumes: - /path/to/kavita/config:/config - /path/to/data:/data #optional ports: - 5000:5000 restart: unless-stopped ``` -------------------------------- ### Run Swagger API Locally Source: https://wiki.kavitareader.com/contributing Navigate to the API directory and run the API project in debug mode to access the Swagger UI. ```bash cd Kavita/API dotnet run -c Debug ``` -------------------------------- ### Unpack Kavita Archive Source: https://wiki.kavitareader.com/installation/native Extract the downloaded Kavita tarball to a writeable directory. Ensure the `{arch}` placeholder matches the architecture used in the download step. ```bash tar -xzf kavita-linux-{arch}.tar.gz ``` -------------------------------- ### Run Kavita with Docker Source: https://wiki.kavitareader.com/installation/docker Use this command to run Kavita using Docker, mapping ports and volumes. Ensure you replace placeholders with your actual directory paths and timezone. ```bash docker run --name kavita -p 5000:5000 \ -v /your/manga/directory:/manga \ -v /your/storage/directory/kavita:/kavita/config \ --restart unless-stopped \ -e TZ=Your/Timezone \ -d jvmilazz0/kavita:latest ``` -------------------------------- ### Configure rclone for Google Drive Mount Source: https://wiki.kavitareader.com/troubleshooting/faq This rclone configuration is provided by a user to improve performance when mounting Google Drive with Kavita. Ensure you adjust the cache directory and mount name to your specific setup. ```bash rclone mount [your mount name]: [local path to be mounted] \ --no-checksum \ --use-server-modtime \ --no-gzip-encoding \ --no-seek \ --allow-other \ --allow-non-empty \ --cache-read-retries 15 \ --cache-db-purge \ --buffer-size 512M \ --dir-cache-time 500h \ --timeout 500h \ --vfs-cache-max-age 500h \ --vfs-read-ahead 1G \ --vfs-read-chunk-size 32M \ --vfs-cache-max-size 25G \ --cache-dir=[your folder path here] \ --vfs-cache-poll-interval 10s \ --poll-interval 10s \ --attr-timeout 20s \ --vfs-cache-mode full ``` -------------------------------- ### Make Kavita Executable on macOS Source: https://wiki.kavitareader.com/installation/native Grant execute permissions to the Kavita binary on macOS. This is a necessary step before running the application. ```bash sudo chmod +x ~/Kavita/Kavita ``` -------------------------------- ### Add Kavita User and Group Source: https://wiki.kavitareader.com/installation/native Create a dedicated user and group named `kavita` for running the Kavita service. This command adds the user to the group as well. ```bash sudo adduser kavita ``` -------------------------------- ### Create EPUB Reading List Metadata Source: https://wiki.kavitareader.com/guides/metadata/epubs Add a 'display-seq' meta tag to a collection to designate it as a reading list. Kavita will order items based on this sequence, reordering if conflicts arise. ```xml 1 ``` -------------------------------- ### Configure Kavita Container Resources Source: https://wiki.kavitareader.com/installation/nas Optional settings to limit hardware resources for the Kavita container. Limiting resources may impact performance. ```yaml CPU Limit: Limited = 1 CPU Memory Limit: Limited = 1024 MB Memory Reservation: Limited = 1024 MB ``` -------------------------------- ### Docker Volume Mounts Source: https://wiki.kavitareader.com/installation/docker Alternative to bind mounts, these commands use Docker volumes for configuring Kavita's storage and configuration directories. ```bash --mount type=volume,target=/kavita/config \ --mount type=volume,target=/manga \ ``` -------------------------------- ### Configure Organizr iframe Ancestor Policy Source: https://wiki.kavitareader.com/installation/remote-access/swag-example Add these Nginx directives within the `location /` block of your SWAG configuration to allow Organizr to embed Kavita. Replace `https://organizr.yourdomain.tld` with your actual Organizr FQDN. ```nginx proxy_hide_header "Content-Security-Policy"; add_header Content-Security-Policy "frame-ancestors https://organizr.yourdomain.tld"; ``` -------------------------------- ### Docker Run for Stable Release Source: https://wiki.kavitareader.com/installation/docker/dockerhub This command deploys the stable Kavita image using a direct Docker run command. It maps necessary volumes and sets the timezone. ```bash docker run --name kavita -p 5000:5000 \ -v /your/manga/directory:/manga \ -v /your/storage/directory/kavita:/kavita/config \ --restart unless-stopped \ -e TZ=Your/Timezone \ -d jvmilazz0/kavita:latest ``` -------------------------------- ### Docker Run for Stable Kavita Release Source: https://wiki.kavitareader.com/installation/docker/github This command deploys the stable Kavita version using a direct Docker run command. It maps necessary volumes, sets the timezone, and exposes the required port. ```bash docker run --name kavita -p 5000:5000 \ -v /your/manga/directory:/manga \ -v /your/storage/directory/kavita:/kavita/config \ --restart unless-stopped \ -e TZ=Your/Timezone \ -d ghcr.io/kareadita/kavita:latest ``` -------------------------------- ### Set PDF Metadata with ebook-meta Source: https://wiki.kavitareader.com/guides/metadata/pdfs Use the `ebook-meta` command to set various metadata fields for a PDF file. Multiple flags can be used in a single command. ```bash ebook-meta -t "My Title" -a "Jane Doe" -s "Great Literature" -i 2.00 "filename with spaces.pdf" ``` -------------------------------- ### Drawer Theme Variables Source: https://wiki.kavitareader.com/guides/themes Set the background and text colors for the drawer component. ```css --drawer-bg-color: hex/rgb(a); --drawer-text-color: hex/rgb(a); ``` -------------------------------- ### Create EPUB Collection Metadata Source: https://wiki.kavitareader.com/guides/metadata/epubs Use meta tags to define a collection from a title. Kavita will generate a 'Collection' tag based on this metadata. ```xml A Dictionary of Modern English Usage collection ```