komga

by HelmForge

Helm chartv1.6.1App 1.30.1Apache-2.0Verified publisher

Komga media server for comics and manga with persistent SQLite storage, library management, and S3 backup

About this chart

Komga Helm Chart

Deploy Komga on Kubernetes — a media server for comics, mangas, BDs, magazines, and eBooks with OPDS support.

Features

  • SQLite Database — zero database configuration, persistent via PVC
  • Dual Persistent Volumes — separate PVCs for config (/config) and library data (/data)
  • Java Tool Options — configurable JVM tuning via JAVA_TOOL_OPTIONS
  • Timezone Support — configurable via TZ environment variable
  • Ingress — optional with TLS and cert-manager support
  • Gateway API — optional HTTPRoute for clusters using Gateway API
  • External Secrets — optional ExternalSecret for S3 backup credentials
  • S3 Backup — scheduled CronJob with consistent SQLite exports, static credentials or workload identity, and config archive upload
  • Common Annotations — chart-wide metadata with resource-specific precedence

Design

See DESIGN.md for the chart architecture, production boundary, and explicit non-goals.

Installation

HTTPS Repository

helm repo add helmforge https://repo.helmforge.dev
helm repo update
helm install komga helmforge/komga

OCI Registry

helm install komga oci://ghcr.io/helmforgedev/helm/komga

Quick Start

persistence:
  config:
    enabled: true
    size: 2Gi
  data:
    enabled: true
    size: 100Gi

After deploying, port-forward to access the web interface and create your admin account:

kubectl port-forward svc/<release>-komga 25600:80

Upgrade Notes

Komga 1.30.1 supersedes 1.30.0 with fixes for temporary table concurrency, API Content Security Policy (CSP) headers, and NextUI styling. The chart's /config PVC covers both the main database and the session database. Back up that PVC before upgrading.

Chart upgrades preserve the root UID/GID behavior used by previous releases. The container now drops all Linux capabilities, so verify that existing /config and /data files are accessible to the configured runAsUser, runAsGroup, or fsGroup before upgrading. Set podSecurityContext.fsGroup to the storage group when an existing PVC is not root-readable. Both regular upgrades and --reuse-values upgrades retain the PVC claims.

helm upgrade komga helmforge/komga --namespace komga --reset-then-reuse-values

--reset-then-reuse-values applies new chart defaults while retaining explicit values from the previous release; those explicit values still take precedence.

Production Example

komga:
  timezone: "UTC"
  javaToolOptions: "-Xmx2g -XX:+UseG1GC"
  sessionTimeout: "7d"

persistence:
  config:
    size: 5Gi
  data:
    size: 500Gi

ingress:
  enabled: true
  ingressClassName: traefik
  annotations:
    cert-manager.io/cluster-issuer: letsencrypt
  hosts:
    - host: komga.example.com
      paths:
        - path: /
          pathType: Prefix
  tls:
    - hosts:
        - komga.example.com
      secretName: komga-tls

backup:
  enabled: true
  schedule: "0 3 * * *"
  s3:
    endpoint: https://s3.amazonaws.com
    bucket: my-backups
    prefix: komga
    existingSecret: komga-s3-credentials

Values

Common Metadata

KeyDefaultDescription
commonLabels{}Labels added to every rendered resource
commonAnnotations{}Annotations added to every rendered resource; resource-specific annotations take precedence

Image

KeyDefaultDescription
image.repositorydocker.io/gotson/komgaImage repository
image.tag"1.30.1"Image tag
image.pullPolicyIfNotPresentPull policy

Komga Configuration

KeyDefaultDescription
komga.port25600Container port
komga.contextPath/Base URL path for reverse proxy
komga.sessionTimeout30mSession timeout
komga.timezoneUTCTimezone
komga.javaToolOptions""Value passed to JAVA_TOOL_OPTIONS
komga.javaMemory""Deprecated alias for komga.javaToolOptions
komga.extraEnv[]Extra environment variables

Persistence

KeyDefaultDescription
persistence.config.enabledtruePersist /config (database)
persistence.config.size2GiConfig PVC size
persistence.config.existingClaim""Existing config PVC
persistence.data.enabledtruePersist /data (libraries)
persistence.data.size50GiData PVC size
persistence.data.existingClaim""Existing data PVC

Service

KeyDefaultDescription
service.typeClusterIPService type
service.port80Service port
service.ipFamilyPolicy""Optional Service IP family policy
service.ipFamilies[]Optional Service IP families

Ingress

KeyDefaultDescription
ingress.enabledfalseEnable ingress
ingress.ingressClassNametraefikIngress class (traefik, nginx, etc.)
ingress.hosts[]Ingress host rules
ingress.tls[]TLS configuration

Gateway API

KeyDefaultDescription
gateway.enabledfalseCreate an HTTPRoute
gateway.parentRefs[]Gateway parent references
gateway.hostnames[]HTTPRoute hostnames
gateway.path/HTTPRoute path match
gateway.pathTypePathPrefixHTTPRoute path match type

External Secrets

KeyDefaultDescription
externalSecrets.enabledfalseRender an ExternalSecret for backup credentials
externalSecrets.refreshInterval1hDefault sync interval for items without spec.refreshInterval
externalSecrets.items[]ExternalSecret definitions with complete spec blocks

Example projecting S3 backup credentials:

backup:
  enabled: true
  s3:
    endpoint: https://s3.amazonaws.com
    bucket: my-backups
    existingSecret: komga-backup-s3

externalSecrets:
  enabled: true
  items:
    - name: backup-s3
      spec:
        secretStoreRef:
          name: platform-secrets
          kind: ClusterSecretStore
        target:
          name: komga-backup-s3
          creationPolicy: Owner
        data:
          - secretKey: access-key
            remoteRef:
              key: komga/backup
              property: access-key
          - secretKey: secret-key
            remoteRef:
              key: komga/backup
              property: secret-key

Backup

KeyDefaultDescription
backup.enabledfalseEnable S3 backup CronJob
backup.schedule0 2 * * *Cron schedule
backup.includeLogstrueInclude /config/logs when present
backup.podSecurityContext{}Backup pod overrides merged over podSecurityContext; use fsGroup for shared PVC access
backup.serviceAccount.createtrueCreate a dedicated ServiceAccount for workload identity backups
backup.serviceAccount.name""Existing backup ServiceAccount name when creation is disabled
backup.serviceAccount.annotations{}Workload identity annotations for the backup ServiceAccount
backup.s3.endpoint""S3 endpoint URL
backup.s3.bucket""S3 bucket
backup.s3.region""AWS region for ambient workload identity
backup.s3.credentialsFromPodIdentityfalseUse EKS Pod Identity or IRSA instead of static keys
backup.s3.accessKey""S3 access key
backup.s3.secretKey""S3 secret key
backup.s3.existingSecret""Existing S3 credentials secret

Backup Behavior

The backup CronJob exports each SQLite database found in /config using sqlite3 VACUUM INTO, then packages those exported databases together with top-level application config files and optional logs before uploading the archive to S3. Search indexes are intentionally excluded because Komga can rebuild them.

Security

The default Pod does not receive a Kubernetes API token. Komga and the backup containers run with privilege escalation disabled and the runtime-default seccomp profile. The upstream image currently starts as root, and the chart preserves that UID and its filesystem access by default so upgrades can continue reading existing SQLite databases even when an older custom UID created restrictive files. Set runAsUser, runAsGroup, runAsNonRoot, or capability overrides only after confirming ownership and access on /config and /data.

Use TLS for external routes and an existing Secret or ExternalSecret for backup credentials. NetworkPolicy, storage encryption, and image admission are cluster responsibilities.

Security Scan

Security Scan: komga

FrameworkScore
MITRE + NSA + SOC273%

Security posture: acceptable with follow-up hardening candidates documented in DESIGN.md.

Architecture

Komga runs as a single Deployment with a Java-based server on port 25600. It uses SQLite for its database (stored in /config) and serves comic/manga libraries from /data.

The chart creates two separate PVCs:

  • config — small volume for SQLite database and application settings
  • data — large volume for comic/manga library files

Documentation

Troubleshooting

kubectl get pods,pvc -n komga
kubectl logs deployment/komga-komga -n komga
kubectl get events -n komga --sort-by=.lastTimestamp

If Komga cannot open its SQLite database after setting a custom UID or GID, restore the prior security context and correct ownership on the /config PVC before retrying. If a probe fails behind a subpath, ensure komga.contextPath and the probe paths describe the same route.

Deploy komga with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has komga on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartkomga is pinned at v1.6.1 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply