Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: add Podman Guide #104

Merged
merged 25 commits into from
Oct 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
74 changes: 0 additions & 74 deletions website/docs/installation/thirdparty.md

This file was deleted.

15 changes: 15 additions & 0 deletions website/docs/installation/thirdparty/aur.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Install via AUR (Arch User Repository)

:::warning
This method is not officially supported.
:::

Komga is available as an [AUR](https://aur.archlinux.org/packages/komga/) package.

## Installation

It can be installed using `yay -S komga` (or any other AUR package manager).

## Run

Just run `komga`.
7 changes: 7 additions & 0 deletions website/docs/installation/thirdparty/freenas.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Install on FreeNAS

:::warning
This method is not officially supported.
:::

There is a [tutorial](https://blog.tommyku.com/blog/deploying-komga-on-freenas-jail/) to install Komga on FreeNAS jail.
9 changes: 9 additions & 0 deletions website/docs/installation/thirdparty/pikapods.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Run with PikaPods

:::warning
This method is not officially supported.
:::

PikaPods offers managed hosting for Komga and shares part of the revenue back to the project. From $2.9/month with $5 free welcome credit.

[![Run on PikaPods](https://www.pikapods.com/static/run-button.svg)](https://www.pikapods.com/pods?run=komga)
187 changes: 187 additions & 0 deletions website/docs/installation/thirdparty/podman.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,187 @@
# Run with Podman

:::warning
This method is not officially supported.
:::

## Usage

Here are some example snippets to help you get started creating a container.

Refer to [Run with Docker](../docker.md#registries) for information about images and version tags.

### podman
Create the container:
```
podman create \
--name=komga \
-p 25600:25600 \
--mount type=bind,source=/path/to/config,target=/config \
--mount type=bind,source=/path/to/data,target=/data \
docker.io/gotson/komga:latest
```
Start the container:
```
podman start komga
```
### podman quadlet file
:::info
These quadlet files were tested with podman version 4.5.3
:::
- Create the following quadlet file `~/.config/containers/systemd/komga.container`:

```
[Unit]
Description=Media server for comics/mangas/BDs/magazines/eBooks with API, OPDS and Kobo Sync support

[Container]
## General
AutoUpdate=registry
Image=docker.io/gotson/komga:latest

## Network
PublishPort=25600:25600

## Volumes
# %h is for user home directory.
# see https://man.archlinux.org/man/systemd.unit.5.en#SPECIFIERS for more info about this.
Volume=%h/path/to/config:/config
Volume=%h/path/to/data:/data

## Environment Variables
Environment=<ENV_VAR>=<extra configuration>

[Service]
# Add 143 exit code to prevent the systemd service entering a failed state when stopping it
SuccessExitStatus=0 143
# Extend Timeout to allow time to pull the image
TimeoutStartSec=900

[Install]
# Start komga on boot
WantedBy=multi-user.target default.target
```

- Run `systemctl --user daemon-reload` to generate the systemd service from the quadlet file.
- Run `systemctl --user start komga.service` to start the container.
- Make sure to create the folders under the Volumes section of the quadlet file before starting the container.

### podman quadlet files for using komf

:::info
These quadlet files were tested with podman version 4.5.3
:::

- Create the following quadlet files in `~/.config/containers/systemd/komga`

- `komga.pod`

```
[Pod]
# Komga
PublishPort=25600:25600
# Komf
PublishPort=8085:8085

[Install]
# Start the pod on boot
WantedBy=multi-user.target default.target
```

- `komga.container`

```
[Unit]
Description=Media server for comics/mangas/BDs/magazines/eBooks with API, OPDS and Kobo Sync support

[Container]
## General
AutoUpdate=registry
Image=docker.io/gotson/komga:latest
Pod=komga.pod

## Volumes
# %h is for user home directory.
# see https://man.archlinux.org/man/systemd.unit.5.en#SPECIFIERS for more info about this.
Volume=%h/path/to/config:/config
Volume=%h/path/to/data:/data

## Environment Variables
Environment=<ENV_VAR>=<extra configuration>

[Service]
# Add 143 exit code to prevent the systemd service entering a failed state when stopping it
SuccessExitStatus=0 143
# Extend Timeout to allow time to pull the image
TimeoutStartSec=900
```

- `komf.container`

Create a podman secret called `komga_password` for the komga admin password. Check [the official Podman documentation](https://docs.podman.io/en/latest/markdown/podman-secret-create.1.html) for more details on how to create a podman secret.

```
[Unit]
Description=Komga and Kavita metadata fetcher
After=komga.service

[Container]
## General
AutoUpdate=registry
Image=docker.io/sndxr/komf:latest
Pod=komga.pod

## Volumes
# %h is for user home directory.
# see https://man.archlinux.org/man/systemd.unit.5.en#SPECIFIERS for more info about this.
Volume=%h/path/to/config:/config

## Environment Variables
Environment="KOMF_KOMGA_BASE_URI=http://localhost:25600"
Environment="[email protected]"
Environment="JAVA_TOOL_OPTIONS=-XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=compact -XX:ShenandoahGuaranteedGCInterval=3600000 -XX:TrimNativeHeapInterval=3600000"
Secret=komga_password,type=env,target=KOMF_KOMGA_PASSWORD

[Service]
# Add 143 exit code to prevent the systemd service entering a failed state when stopping it
SuccessExitStatus=0 143
# Extend Timeout to allow time to pull the image
TimeoutStartSec=900
```

- Run `systemctl --user daemon-reload` to generate the systemd services from the quadlet files.
- Run `systemctl --user start komga-pod.service` to start the pod.
- Make sure to create the folders under the Volumes section of the quadlet files before starting the pod.

## Parameters

Refer to [Run with Docker](../docker.md#parameters) for information about parameters and lemory limit.

## Support info

- Shell access whilst the container is running: `podman exec -it komga /bin/bash`
- To monitor the logs of the container in realtime: `podman logs -f komga`

## Updating

Below are the instructions for updating containers:

### Via podman auto-update

- Add `AutoUpdate=registry` under the `[Container]` section of the quadlet file.
- Use any tag for the image that isn't version specific like the `latest` tag.
- Check if a new image is available: `podman auto-update --dry-run`
- Update containers: `podman auto-update`

### Automatic updates

- Follow the instructions on the previous section to configure `podman auto-update`
- Enable the systemd timer: `systemctl --user enable podman-auto-update.timer`
- By default the timer will update the containers daily at midnight. You can customize the timer by running `systemctl --user edit podman-auto-update.timer`
- Check [this page](https://man.archlinux.org/man/core/systemd/systemd.timer.5.en) for more info about systemd timers.

Example systemd timer override for weekly updates:
```
[Timer]
OnCalendar=weekly
```
7 changes: 7 additions & 0 deletions website/docs/installation/thirdparty/powershell-script.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Install via Powershell script

:::warning
This method is not officially supported.
:::

A [Powershell script](https://github.com/losslesspng/SetUpKomgaJava) to get up and running with Komga.
7 changes: 7 additions & 0 deletions website/docs/installation/thirdparty/qnap.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Install on QNAP

:::warning
This method is not officially supported.
:::

Komga is available on [My QNAP](https://www.myqnap.org/product/komga/).
29 changes: 29 additions & 0 deletions website/docs/installation/thirdparty/scoop.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Install via Scoop

:::warning
This method is not officially supported.
:::

Komga is available in [Scoop](https://github.com/ScoopInstaller/Scoop)'s [extras](https://github.com/ScoopInstaller/Extras) bucket.

## Installation

You need Scoop to use this installation method. Instruction to install Scoop can be found [here](https://github.com/ScoopInstaller/Scoop#installation).

### 1. (Skip if JDK is installed) Install JDK
Run `scoop bucket add java` and then run `scoop install java/temurin-lts-jdk`.

### 2. Install Komga
Run `scoop bucket add extras` and then run `scoop install komga`.

## Manage
### Run
Run `komga`.

Note: Default config dir is `%USERPROFILE%\scoop\apps\komga\current\config`

### Update
Run `scoop update komga`.

### Uninstall
Run `scoop uninstall komga`
12 changes: 12 additions & 0 deletions website/docs/installation/thirdparty/truenas.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Install on TrueNAS SCALE

:::warning
This method is not officially supported.
:::

1. Open _Apps_ then go to _Discover Apps_ and then search for _Komga_.
2. Click on _Komga_ and then click on _Install_.
3. Leave everything as default, except:
1. Optional: Under _Network Configuration_ you can change the _Web Port_. This is the port at which you can later access Komga.
2. Optional: Under _Storage Configuration_ you can add the location to wherever your media files are currently stored by clicking _Add_ next to _Additional Storage_.
6. Click _Install_.
9 changes: 9 additions & 0 deletions website/docs/installation/thirdparty/yunohost.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Install via YunoHost

:::warning
This method is not officially supported.
:::

YunoHost is a server operating system aiming to make self-hosting accessible to everyone.

[![Install Komga with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=komga)
19 changes: 18 additions & 1 deletion website/sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,24 @@ const sidebars = {

],
},
'installation/thirdparty',
{
type: 'category',
label: 'Third-party methods',
link: {
type: 'generated-index',
},
items: [
'installation/thirdparty/podman',
'installation/thirdparty/pikapods',
'installation/thirdparty/scoop',
'installation/thirdparty/powershell-script',
'installation/thirdparty/yunohost',
'installation/thirdparty/freenas',
'installation/thirdparty/truenas',
'installation/thirdparty/qnap',
'installation/thirdparty/aur',
],
},
{
type: 'category',
label: 'Configuration',
Expand Down