Just like movies and music, cartoon It is also one of the resources that need to be sorted out. Hundreds of thousands of comic books are matched with complete metadata, and then sorted neatly, like works of art. Let alone enjoy this feeling! However, AV has a variety of mature solutions such as Emby/Jellyfin/Plex, but comic books do not. At present, I find that the cartoon management program that is easy to use is probably only Komga

about

Komga is a Free Admission And Open Source Comic media management procedures. Support common CBZ CBR PDF EPUB The format of the cartoon or file can be read directly on the webpage, and the metadata of the cartoon can be modified and edited. On the mobile side, you can use the official Tachiyomi extension plug-in, any reading app that supports the OPDS protocol. Komga's built-in account system can create accounts at will and assign reading permissions to different accounts. It also supports binding third-party channels (Google, Github and Facebook). In addition, the author is also trying to promote and improve the metadata specification of comics ComicInfo.xml It can be speculated that there may be special cartoon metadata generation software in the future.

See the following demonstration for specific use examples.

deploy

Deploy on NAS

To shine in the crowd DSM 7.1 Take the system as an example to introduce the specific steps of installing Komga using Docker suite.

Install Docker Suite

See the tutorial here: Portal

Install Komga

Search "gotson/komga" or "komga" in the "Registry" to download the latest latest edition.

At present, simplified Chinese is officially supported, and there is no need to download the Chinese version that has not been updated for a long time.

After the image is downloaded, find the image in the Image list, and double-click to install it.

It is recommended to select "bridge" for network settings, or "use the same network as the Docker Host". This will directly use the default twenty-five thousand and six hundred Port. You can also choose bridge Then customize one.

Click Next. The Container Name can be used freely. Check Enable Automatic Restart.

Click Advanced Settings, and click Add in the upper left corner to add a time zone variable.

Fill in "Variable" on the left TZ , filled in the value on the right Asia/Shanghai To resolve the possible inconsistency between the time zone in the container and the local time zone. Click Save.

Click Next. In port settings, the "local port" on the left can be used freely, such as two thousand three hundred and thirty-three , the right "container port" is fixed.

The port of the current version is twenty-five thousand and six hundred

Click Next. In Storage Space Settings, click Add Folder.

stay /docker Add a new one in the folder komga Folder, filled in by "Loading Path" on the right /config This is the Komga data file storage path.

Select the path to store the comics locally. For example, mine is /media/book , the right "load path" can be freely used, such as /book or /comic

Click Next and Finish to start Komga.

Deploy on Linux

Install Docker

Refer to the tutorial here: Portal

Install Komga

For example, I directly root Directory and place Komga in myapp Folder, where you create a Komga Folders are used to store program data, while comics are directly placed in /root/comic Medium. Next, just create a docker-compose.yml File, fill in the following contents:

 version: "3.9" services: Komga: image: gotson/komga:latest container_name: komga ports: -2333:25600 # 2333 on the left can be modified arbitrarily environment: - TZ=Asia/Shanghai volumes: - ./ komga:/config - /root/comic:/comic #  - /book:/book restart: unless-stopped

use docker compose up -d Start the container and Komga can start successfully. use docker compose down Stop the container.

The approximate directory tree structure is as follows. You can change it as you like:

 root ├── comic └── myapp ├── docker-compose.yml └── komga

Deploy on Windows

Install using Microsoft Store

Now, you can use the Microsoft Store Install Komga directly, but pay 7 yuan RMB.

Installing with EXE

Officially provided a Download Page , you can directly download the exe program to install Komga.

Run directly using Java

Komga is a Java program that can run directly in a Java 8+or 1.8+environment.

Therefore, the official installation recommendation is Github Releases Page Download .jar File, run with the following command (when running formally x.y.z Replace with specific version number):

 java -jar komga-x.y.z.jar

Of course, first you need to install the Java environment, or use java -version Check whether Java is installed, such as:

 PS C:\Users\admin> java -version java version "18.0.1.1" 2022-04-22 Java(TM) SE Runtime Environment (build 18.0.1.1+2-6) Java HotSpot(TM) 64-Bit Server VM (build 18.0.1.1+2-6, mixed mode, sharing)

Then download the Komga program file and execute the run command, such as:

 java -jar komga-0.157.4.jar

The console will run a pile of code and pop up the Java network firewall window.

The default data storage path is %USERPROFILE%\.komga

use javaw replace java The command enables background terminal free operation:

 javaw -jar komga-0.157.4.jar

However, I will not use the Java control program, and the official tutorial does not provide the command to close the program. What's more, I don't want to check.

It seems that you can kill the Java process directly to end Komga

But I think running .jar The method of the program is inconvenient to update, so I tried to use the package manager again scoop How to install Komga.

Installing with Scoop

Install Scoop:

 iwr -useb get.scoop.sh | iex

Please refer to Official Tutorial Or other Chinese courses, skip here.

To add a software source:

 scoop bucket add java extras

Install Java. If Java has already been installed, do not install it:

 scoop install java/temurin-lts-jdk

Install Komga:

 scoop install komga

The general installation process is as follows:

 PS C:\Users\admin> scoop install komga Updating Scoop... Updating 'extras' bucket... Installing 'komga' (0.157.4) [64bit] from extras bucket komga-0.157.4.jar (132.2 MB) [================================================================================] 100% Checking hash of komga-0.157.4.jar ...  ok. Linking ~\Scoop\apps\komga\current => ~\Scoop\apps\komga\0.157.4 Creating shim for 'komga'. Persisting config 'komga' (0.157.4) was installed successfully! Notes ----- Default URL is  http://localhost:8080 'komga' suggests installing 'java/oraclejdk' or 'java/openjdk'.

Start Komga:

 komga

The default data storage path is %USERPROFILE%\scoop\apps\komga\current\config

Update Komga:

 scoop update komga

Uninstall Komga:

 scoop uninstall komga

Similarly, I don't know how to persist background processes

So my suggestion is to install a Docker running container on the computer to facilitate control

Reverse proxy

If you need to bind the domain name, you can use the Nginx reverse proxy Komga.

stay server Add a paragraph to the configuration:

 location / { proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_pass  http://your_server_url:8080 ; proxy_http_version 1.1; }

If you are using Caddy v2, configure as follows:

 komga.yourdomain.com { reverse_proxy  http://your-komga-server:25600 }

Reference Official Documents about HTTPS Part of the configuration.

to configure

initialization

Access ip: port to arrive at Komga's web interface. For example, I can visit 127.0.0.1:2333.

The default language of Komga is English. At present, no fixed initial language configuration has been found.

So click in the lower left corner Translation Switch to Simplified Chinese

 Change language
Change language

Then follow the instructions to create a User Account.

 Create Account
Create Account

When everything is ready, Komga's main interface is displayed in front of you.

Create comic book library

Click the+button next to "Library" on the left to create a comic library.

  • Fill in any name you like, such as "comic"
  • Click the "Browse" button to find the location where you saved the comic. If the container is filled in, it is the path inside the container, such as the path in the previous tutorial /comic
  • His "next book" should be the wrong translation. It is the "next step" that is right

  • You can check:

    • Automatically empty the dustbin after each scan
    • Automatically convert to CBZ format
  • Other options are evaluated by themselves

Just leave the "Metadata" as default, and click the "Add" button to finish.

Edit Metadata

A cartoon with perfect metadata, roughly including the following information:

  • title
  • author
  • Serials
  • language
  • Reading direction
  • brief introduction
  • press
  • schools
  • label
  • ……

 Like this
Like this

If the cartoon file exists ComicInfo.xml The metadata file will be directly recognized by Komga, so there is no need to complete the metadata manually. But generally, there is no such thing, so it needs to be supplemented manually.

For example, click the Edit button in the upper right corner of the series page to add all information except the author.

 Metadata editing
Metadata editing

Cartoon writers need to edit in a single volume of cartoons. You can provide detailed information about the author, lead draft, painter, colorer, engraver, cover author, editor in chief and even translator of the cartoon.

Careful friends may notice that I have two more icons in the upper right corner. This is an oil monkey script KoMI Thanks.

However, this script only supports English metadata. If someone uses domestic comic websites or Panzhihua Group Plan The introduction of Jiasheng's cartoon will be a great help for metadata supplement.

Import comics

Komga Support Import comics However, instead of uploading comics directly from the web page to Komga, it refers to importing comics from the repository, newly added or replace Existing comics.

The official said:

This screen allows you to import files other than the existing library You can only import files into an existing sequence, in which case Komga will move or copy the files to the directory of the selected sequence

If you have selected a number for a book and a book with that number already exists, you can compare the two books. If you decide to import the book Komga will upgrade existing books to use new files, effectively replacing old files with new ones

I think it's hard to understand. It needs several specific operations to understand.

After testing, if your file structure is like this:

 comic ├── test |☆ - Cartoon 1 |L -- Comic 2 └── test2 ☆ - Cartoon 3 L -- Better quality comics 2
  • You have /comic/test Set as a comic library
  • be known as test 's folder is automatically recognized as a comic series
  • take test2 In Cartoon 3 Add to test series
  • use test2 In Better quality comics 2 replace test In Cartoon 2

Whether new or replaced, it is necessary to determine the changed comic series and determine the number.

If it is new, set the number to the number not occupied by the current series.

If it is a replacement, you can click the cartoon details or image preview button for comparison.

When I tested, it was probably the cartoon file /root/comic/ The user has insufficient permissions and has not been able to move successfully. If you also encounter this situation, add two items to the environment variable:

 Omit in front environment: - TZ=Asia/Shanghai - PUID=0 - PGID=0 Omitted later

There will be a prompt for successful import. If there is no prompt, there must be no file access permission.

Assign Permissions

If you want some comics not to be seen by other Komga users, you can click "Server Settings" and select a specific user to modify his access permissions.

 Permission assignment
Permission assignment

arrangement

Create folders by series

It is found during the use that if there is no embedded cartoon file ComicInfo.xml For files, Komga will judge the comic series according to the folder.

Suppose your comics are stored in /comic In the folder, a secondary folder is created according to the series, and the comic is marked with a number in the secondary folder, such as:

 comic ▄ - Fire Shadow │Γ - Huoying 1 │Γ - Huoying 2 │   └── …… ▄ - Pirates │☆ - Pirate 1 │☆ - Pirate 2 │   └── …… L -- Dunk ☆ Slam 1 ▄ - Slam Dunk 2 └── ……

Then you will get the following display effect:

The comics in each series are as follows:

However, if your cartoons are very messy, not only are they not classified by series, but also do not carry volume numbers and numbers, and they are thrown into them /comic Folder. Then the scene will be quite chaotic, such as:

So before adding comics, you need at least Create folders by series , just sort out your cartoon resources.

Embedded metadata

At the beginning, I mentioned that Komga supports identification embedded in CBR / CBZ In file ComicInfo.xml Data.

This is a metadata standard that began with ComicRack, an ancient program, and is now in disrepair. So the author, together with ambitious people, created a ComicInfo.xml Items for: The Anansi Project

A complete version 2.0 ComicInfo.xml It looks like this:

 <? xml version="1.0" encoding="utf-8"?> <xs:schema elementFormDefault="qualified" xmlns:xs=" http://www.w3.org/2001/XMLSchema "> <xs:element name="ComicInfo" nillable="true" type="ComicInfo" /> <xs:complexType name="ComicInfo"> <xs:sequence> <xs:element minOccurs="0" maxOccurs="1" default="" name="Title" type="xs:string" /> <xs:element minOccurs="0" maxOccurs="1" default="" name="Series" type="xs:string" /> <xs:element minOccurs="0" maxOccurs="1" default="" name="Number" type="xs:string" /> <xs:element minOccurs="0" maxOccurs="1" default="-1" name="Count" type="xs:int" /> <xs:element minOccurs="0" maxOccurs="1" default="-1" name="Volume" type="xs:int" /> <xs:element minOccurs="0" maxOccurs="1" default="" name="AlternateSeries" type="xs:string" /> <xs:element minOccurs="0" maxOccurs="1" default="" name="AlternateNumber" type="xs:string" /> <xs:element minOccurs="0" maxOccurs="1" default="-1" name="AlternateCount" type="xs:int" /> <xs:element minOccurs="0" maxOccurs="1" default="" name="Summary" type="xs:string" /> <xs:element minOccurs="0" maxOccurs="1" default="" name="Notes" type="xs:string" /> <xs:element minOccurs="0" maxOccurs="1" default="-1" name="Year" type="xs:int" /> <xs:element minOccurs="0" maxOccurs="1" default="-1" name="Month" type="xs:int" /> <xs:element minOccurs="0" maxOccurs="1" default="-1" name="Day" type="xs:int" /> <xs:element minOccurs="0" maxOccurs="1" default="" name="Writer" type="xs:string" /> <xs:element minOccurs="0" maxOccurs="1" default="" name="Penciller" type="xs:string" /> <xs:element minOccurs="0" maxOccurs="1" default="" name="Inker" type="xs:string" /> <xs:element minOccurs="0" maxOccurs="1" default="" name="Colorist" type="xs:string" /> <xs:element minOccurs="0" maxOccurs="1" default="" name="Letterer" type="xs:string" /> <xs:element minOccurs="0" maxOccurs="1" default="" name="CoverArtist" type="xs:string" /> <xs:element minOccurs="0" maxOccurs="1" default="" name="Editor" type="xs:string" /> <xs:element minOccurs="0" maxOccurs="1" default="" name="Publisher" type="xs:string" /> <xs:element minOccurs="0" maxOccurs="1" default="" name="Imprint" type="xs:string" /> <xs:element minOccurs="0" maxOccurs="1" default="" name="Genre" type="xs:string" /> <xs:element minOccurs="0" maxOccurs="1" default="" name="Web" type="xs:string" /> <xs:element minOccurs="0" maxOccurs="1" default="0" name="PageCount" type="xs:int" /> <xs:element minOccurs="0" maxOccurs="1" default="" name="LanguageISO" type="xs:string" /> <xs:element minOccurs="0" maxOccurs="1" default="" name="Format" type="xs:string" /> <xs:element minOccurs="0" maxOccurs="1" default="Unknown" name="BlackAndWhite" type="YesNo" /> <xs:element minOccurs="0" maxOccurs="1" default="Unknown" name="Manga" type="Manga" /> <xs:element minOccurs="0" maxOccurs="1" default="" name="Characters" type="xs:string" /> <xs:element minOccurs="0" maxOccurs="1" default="" name="Teams" type="xs:string" /> <xs:element minOccurs="0" maxOccurs="1" default="" name="Locations" type="xs:string" /> <xs:element minOccurs="0" maxOccurs="1" default="" name="ScanInformation" type="xs:string" /> <xs:element minOccurs="0" maxOccurs="1" default="" name="StoryArc" type="xs:string" /> <xs:element minOccurs="0" maxOccurs="1" default="" name="SeriesGroup" type="xs:string" /> <xs:element minOccurs="0" maxOccurs="1" default="Unknown" name="AgeRating" type="AgeRating" /> <xs:element minOccurs="0" maxOccurs="1" name="Pages" type="ArrayOfComicPageInfo" /> <xs:element minOccurs="0" maxOccurs="1" name="CommunityRating" type="Rating" /> <xs:element minOccurs="0" maxOccurs="1" default="" name="MainCharacterOrTeam" type="xs:string" /> <xs:element minOccurs="0" maxOccurs="1" default="" name="Review" type="xs:string" /> </xs:sequence> </xs:complexType> <xs:simpleType name="YesNo"> <xs:restriction base="xs:string"> <xs:enumeration value="Unknown" /> <xs:enumeration value="No" /> <xs:enumeration value="Yes" /> </xs:restriction> </xs:simpleType> <xs:simpleType name="Manga"> <xs:restriction base="xs:string"> <xs:enumeration value="Unknown" /> <xs:enumeration value="No" /> <xs:enumeration value="Yes" /> <xs:enumeration value="YesAndRightToLeft" /> </xs:restriction> </xs:simpleType> <xs:simpleType name="Rating"> <xs:restriction base="xs:decimal"> <xs:minInclusive value="0"/> <xs:maxInclusive value="5"/> <xs:fractionDigits value="2"/> </xs:restriction> </xs:simpleType> <xs:simpleType name="AgeRating"> <xs:restriction base="xs:string"> <xs:enumeration value="Unknown" /> <xs:enumeration value="Adults Only 18+" /> <xs:enumeration value="Early Childhood" /> <xs:enumeration value="Everyone" /> <xs:enumeration value="Everyone 10+" /> <xs:enumeration value="G" /> <xs:enumeration value="Kids to Adults" /> <xs:enumeration value="M" /> <xs:enumeration value="MA15+" /> <xs:enumeration value="Mature 17+" /> <xs:enumeration value="PG" /> <xs:enumeration value="R18+" /> <xs:enumeration value="Rating Pending" /> <xs:enumeration value="Teen" /> <xs:enumeration value="X18+" /> </xs:restriction> </xs:simpleType> <xs:complexType name="ArrayOfComicPageInfo"> <xs:sequence> <xs:element minOccurs="0" maxOccurs="unbounded" name="Page" nillable="true" type="ComicPageInfo" /> </xs:sequence> </xs:complexType> <xs:complexType name="ComicPageInfo"> <xs:attribute name="Image" type="xs:int" use="required" /> <xs:attribute default="Story" name="Type" type="ComicPageType" /> <xs:attribute default="false" name="DoublePage" type="xs:boolean" /> <xs:attribute default="0" name="ImageSize" type="xs:long" /> <xs:attribute default="" name="Key" type="xs:string" /> <xs:attribute default="" name="Bookmark" type="xs:string" /> <xs:attribute default="-1" name="ImageWidth" type="xs:int" /> <xs:attribute default="-1" name="ImageHeight" type="xs:int" /> </xs:complexType> <xs:simpleType name="ComicPageType"> <xs:list> <xs:simpleType> <xs:restriction base="xs:string"> <xs:enumeration value="FrontCover" /> <xs:enumeration value="InnerCover" /> <xs:enumeration value="Roundup" /> <xs:enumeration value="Story" /> <xs:enumeration value="Advertisement" /> <xs:enumeration value="Editorial" /> <xs:enumeration value="Letters" /> <xs:enumeration value="Preview" /> <xs:enumeration value="BackCover" /> <xs:enumeration value="Other" /> <xs:enumeration value="Deleted" /> </xs:restriction> </xs:simpleType> </xs:list> </xs:simpleType> </xs:schema>

If you want to embed this metadata file into CBR / CBZ In the cartoon, manual editing is very unrealistic.

At present, one of the methods I have found is: Calibre Medium, using Embed Comic Metadata Plug in. After editing the cartoon metadata, use this plug-in to ComicInfo.xml Embedded in the cartoon file.

Search for "Embedded Comic Metadata" in "Preferences" and "Plug ins" to install the plug-in.

After installation, the operation button of Embed Comic Metadata will appear on the navigation bar of Calibre.

Complete metadata needs to be supplemented first. You can use Calibre's built-in tools to download metadata. Or, go to the domestic comic website to manually query the comic data.

After everything is ready, return to the main interface and import directly without any settings.

 Insert Metadata
Insert Metadata

It is convenient to embed metadata, but you need to import Calibre to edit metadata first. I think this is very troublesome.

The following contents can be seen in the cartoon file imported into metadata:

Embedded ComicInfo.xml The contents are as follows:

 <? xml version="1.0"?> <ComicInfo xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance " xmlns:xsd=" http://www.w3.org/2001/XMLSchema "> <Title>Concealment (1)</Title> <Series>Concealed things</Series> <Number>1.0</Number> <Summary>Concealing is the work of drawing? The cartoonist Mr. Kokushi Goto is serializing some indecent cartoons in the weekly juvenile comic magazine! But at the thought that it might be discovered by Ji, the only daughter in Grade 4 of primary school, he was afraid that he could not sleep well every night. Love and laughter cartoonist dad? Daughter story, here's the opening! </Summary> <Year>2017</Year> <Month>11</Month> <Day>14</Day> <Writer>Kumita Kangzhi</Writer> <Publisher>Dongli Publishing House</Publisher> <LanguageISO>zh</LanguageISO> </ComicInfo>

I noticed a ComicTagger After a search, I found that this is a tool for embedding metadata. Unfortunately, No Chinese

It seems that manual editing is not very difficult, so I won't play with it here. You can go to ComicTagger by yourself if you need Github Home Explore.

read

The reading on the webpage will not be introduced. Here we will talk about other devices.

Tachiyomi

Available on Android Tachiyomi Read the comics in Kmoga.

You can stay in Tachiyomi Github Releases Download the latest version of the app on the Plug in download page Download the Komga plug-in. Or in here Download my backup.

After the security is completed, the configuration is also quite simple. Fill in Komga's address, user name and password, save them and restart Tachiyomi.

Note that the account password will not be displayed until it is restarted.

Then in the source, open Komga to see your comics.

OPDS reader

In the official Komga document, for OPDS reader support It is explained as follows:

Komga should work with any OPDS reader, unfortunately most readers badly implement the OPDS protocol 😞.

Komga should be able to be used on any OPDS reader. Unfortunately, most readers do not follow the OPDS protocol well 😞。

So I suggest Android users use Tachiyomi and Apple users use the web.

If you really want to use a reader that supports OPDS to watch comics on Komga, you need to fill in the URL format:

 http(s)://your-server(:8080)(/baseUrl)/opds/v1.2/catalog

For example:

 http://127.0.0.1:2333/opds/v1.2/catalog

summary

Komga has powerful functions, which I haven't fully understood yet. And if you really want to make the comics on Komga look good, you can't avoid manually embedding data, which will be a very long process

reference resources