Skip to main content

Komga on GKE Autopilot

Komga on GKE Autopilot

Komga is a free, open-source, self-hosted media server for comics, manga, and digital book collections (Kotlin/Java, Spring Boot). It provides a clean web reading UI, OPDS feeds, collections, read lists, and full-text search over your library. This module deploys Komga on GKE Autopilot on top of the App_GKE foundation, which provisions and manages the shared Google Cloud and Kubernetes infrastructure.

This guide focuses on the cloud services Komga uses and how to explore and operate them from the Google Cloud Console and the command line. For the mechanics that are common to every GKE application — Workload Identity, ingress, autoscaling, CI/CD, Cloud Armor, IAP, Binary Authorization, VPC Service Controls, backups, and the deployment lifecycle — refer to the App_GKE foundation guide rather than repeating them here.


What Komga costs on RAD, and how that compares​

Komga on RAD's GKE Autopilot module costs about US$42 a month in a Google Cloud project you own, plus a one-off 40-credit (US$4.00) module fee. GKE suits Komga running beside other Kubernetes workloads; for the lowest cost, the Cloud Run module runs the same Komga for about US$33 a month. If you only need it occasionally, a RAD-managed project can be deleted and restored within 30 days for a handful of credits, so that US$42 becomes a few dollars a month instead. See Pause it for free, below.

What you pay on RAD​

In a Google Cloud project you ownIn a project RAD manages for you
Module fee, once per deployment40 credits (US$4.00 at the top-up price)36.0 credits (10% lower)
Build timeA few credits per buildThe same
Google Cloud running costBilled by Google to your own billing account, about US$42 a month for the default configuration (table below)Metered hourly in credits; RAD publishes 67 credits a day, about 2010 a month (about US$201 at the top-up price, US$161 at the Scale plan's rate)
Who owns whatYou own the project and its billing; RAD deploys and updates itRAD owns the project, with guardrails, quotas and budget alerts; you get console access, and a minimum purchased balance is held in reserve

10 credits cost US$1 on a one-off top-up, and less on a monthly plan. In a project RAD manages, the database, file server and network are shared by every application in the project, so a second application does not add a second database.

Default running cost in your own project (us-central1, Google list prices):

Resource (module default)Per month
GKE Autopilot pod, 1x vCPU / 1 GiBUS$36.08
Cloud NAT and networkingUS$5.00
Cloud Storage (add-ons, backups)US$1.00
GKE cluster management feeshared across every GKE app in the project; $0 if this is your only cluster, else ~73
Totalabout US$42

How it compares​

  • No vendor sells a hosted Komga SaaS — it is self-hosted by design.
  • Komga is light (1 vCPU/1 GiB), so a small self-managed VPS (well under the usual 2 vCPU/4 GB, US$24/month comparison class) can run it directly, plus your own time for backups and patches; a GKE pod carries the cluster's own baseline cost regardless of how little the app itself needs.
  • Or see the Cloud Run guide for the lower-cost option, which also scales to zero when nobody's reading.

Pause it for free: delete a RAD-managed project, restore it when you need it​

If Komga runs in a project RAD manages for you, you have a second option that goes well beyond scaling to zero: delete the whole project, and restore it within 30 days for close to nothing. This suits Komga you only need occasionally — a course project, a demo, a short-lived evaluation — far better than running it continuously.

  • How it works. Deleting a RAD-managed project unlinks its billing first, then asks Google to delete the project. Google does not remove the project immediately: it keeps it, recoverable, for 30 days. Because billing is already unlinked, nothing is charged while it waits. Unlike deleting one module, this does not tear down Komga's own compute one by one — the whole project, and everything in it, simply stops.
  • Restoring costs a handful of credits, not a rebuild. Within 30 days, the project's owner can restore it. RAD asks Google to undelete the project and reattaches its billing account, then asks you to run Update on each deployment to confirm everything came back. Because nothing was individually destroyed, that Update finds the same resources already there — it is a check, not a rebuild, and an Update never charges the module fee again. For Komga behind a small Services_GCP and Project_GCP, that is a handful of credits (under US$1) in total, against the 45 credits a full redeploy costs.
  • What this needs. You must own the project (not a bring-your-own one RAD only manages billing for), and you restore it yourself within the 30 days — after that, Google deletes it for good. Restoring is admitted like creating a new project: your purchased credit balance must still clear the tier's floor (100 credits for the sandbox tier most study and demo use fits). Google says most services are fully working again within 36 hours of a restore.
  • One real gap: the backup bucket does not survive. Komga's nightly backups are written to a bucket inside the project, and that bucket is not protected by Cloud Storage's soft-delete, so it is very likely gone as soon as you delete the project — even though the project itself is recoverable for 30 days. If you've customised Komga and want to keep that work, copy a backup out (to Google Drive, or a bucket outside the project) before you delete, the same as the redeploy workflow below. For a default installation with nothing irreplaceable in it, this does not matter.

Pay only while you use it, the other way: delete and redeploy​

GKE keeps at least one pod running, so it never scales to zero on its own. The option above only applies to a RAD-managed project; in your own project, or once the 30-day window has passed, the way to stop paying is to delete the deployment and deploy it again when you need it.

  • What a redeploy costs. The module fee again plus the builds: about 45 credits (US$4.50), because RAD recreates the project and shared services before Komga. Deleting saves money only once Komga would otherwise sit unused for about four days or more, both in your own project (about US$1.40 a day) and in a RAD-managed one (67 credits a day).
  • Delete everything Komga uses. Most of the running cost here is the compute itself and, on GKE, the cluster management fee once this project runs more than one cluster — so deleting Komga while something else shares the project and its cluster saves only Komga's own pod.
  • Keep your data first. Nightly backups go to a bucket inside the deployment and are deleted with it, so copy the latest backup out before deleting if you want to keep it.

Lab sessions and Managed Environments​

  • Lab sessions, for training. A trainer runs a Komga session for a class. Each participant gets Komga in their own Google Cloud project for 15 minutes to 24 hours, within an allowance the trainer sets. Either the trainer funds every place up front, or each participant pays for their own. Everything is deleted when the session ends, and unused credits go back to the trainer.
  • Managed Environments, for consultancies. A partner runs Komga for a client from a ring-fenced wallet it funds, and settles with the client directly. If the wallet runs low, billing pauses and the data is kept, so nobody receives an unexpected charge. At the end of the engagement the partner hands the project over, and the deployments become the client's own.

Credits can be bought in more than 20 currencies, including XAF, XOF, NGN, GHS, KES and ZAR, by card, bank transfer or mobile money.

Sources (8 October 2026): Google Cloud list prices from the Cloud Billing Catalog API; RAD fees and the 67-credit daily estimate from radmodules.dev/pricing; Delete and restore projects for the 30-day recovery window and what it says about Cloud Storage objects without soft delete. Prices change; check each source before relying on a figure.

1. Overview​

Komga runs as a single JVM pod, recommended as a StatefulSet with a block PVC. The deployment wires together a minimal set of Google Cloud services — there is no external database:

CapabilityGoogle Cloud serviceNotes
ComputeGKE AutopilotJVM (Spring Boot) pod, 1 vCPU / 1 GiB by default; single replica
DatabaseNoneKomga uses an embedded SQLite database under /config — no Cloud SQL instance is created
Object storage / block storageCloud Storage (GCS FUSE) or PVCstateful_pvc_enabled = true (default) mounts a real block PVC at /config; disable it to use a GCS-FUSE-backed bucket instead
SecretsSecret ManagerNone generated — Komga has no injectable service secret
IngressCloud Load BalancingExternal LoadBalancer, optional custom domain + managed certificate

Sensible defaults worth knowing up front:

  • No external database. Komga stores its library index, users, reading progress, and settings in an embedded SQLite database — confirmed via upstream issue #1327 (open, unimplemented feature request for external DB support). database_type = "NONE", enable_redis forced false.
  • Official prebuilt image. container_image_source = "prebuilt" deploys gotson/komga directly — no Cloud Build step. enable_image_mirroring = true mirrors it into Artifact Registry (digest-aware copy) to avoid Docker Hub rate limits.
  • Block-storage PVC is the recommended layout. stateful_pvc_enabled = true by default runs Komga as a StatefulSet with a per-pod PVC mounted at /config — gcsfuse's lack of real file locking corrupts SQLite WAL files, so a real block volume is preferred over GCS FUSE for production use.
  • Single instance only. min_instance_count = 1 and max_instance_count = 1 — Komga serves one shared SQLite library from one volume; do not scale beyond 1.
  • Runs as root. Komga's container has no USER directive (confirmed via local container testing), so no gcsfuse/PVC uid/gid mount-option workaround is needed.
  • No generated secrets. The admin account is created interactively through Komga's first-run setup wizard at / — there is no master key or JWT secret to seed ahead of time.
  • Health endpoint is /actuator/health. Confirmed via local container testing to return 200 {"status":"UP"} unauthenticated. The versioned /api/v1/actuator/health path is auth-gated (401) — do not point probes at it.
  • JVM heap sizing is optional. jvm_heap_max (blank by default) sets -Xmx via JAVA_TOOL_OPTIONS.

2. Google Cloud Services & How to Explore Them​

All commands assume you have run gcloud container clusters get-credentials <cluster> --region <region> --project <project> and that PROJECT, REGION, and NAMESPACE are set. The namespace and other identifiers are reported in the deployment Outputs.

A. GKE Autopilot — the Komga workload​

Komga's pod is scheduled on Autopilot, which bills for the CPU/memory the pod actually requests. With stateful_pvc_enabled = true (default) the workload is a StatefulSet with a stable pod identity and its own PVC.

  • Console: Kubernetes Engine → Workloads → select the Komga workload to see the pod, revisions, and events. Kubernetes Engine → Services & Ingress shows the external IP.
  • CLI:
    kubectl get pods,svc,pvc -n "$NAMESPACE"
    kubectl logs -n "$NAMESPACE" statefulset/<service-name> --tail=100

See App_GKE for how Autopilot, scaling, and the workload type (Deployment vs StatefulSet) are managed.

B. Storage — Komga's persistent state​

By default, a real block PersistentVolumeClaim is mounted at /config, holding the embedded SQLite database, Lucene search index, thumbnail cache, and logs. If stateful_pvc_enabled = false, a Cloud Storage bucket is mounted at the same path via the GCS FUSE CSI driver instead (light use only — see the caveats in Komga_Common).

  • Console: Kubernetes Engine → Storage (PVCs); Cloud Storage → Buckets (if GCS-FUSE mode).
  • CLI:
    kubectl get pvc -n "$NAMESPACE"
    gcloud storage buckets list --project "$PROJECT" # if using the GCS bucket

See App_GKE for CMEK options and StorageClass details.

C. Secret Manager​

Komga has no generated service secret — the admin account is created through the web setup wizard. Secret Manager only holds entries you add yourself via secret_environment_variables.

  • Console: Security → Secret Manager.
  • CLI:
    gcloud secrets list --project "$PROJECT" --filter="name~komga"

D. Networking & ingress​

By default the workload is exposed through an external Cloud Load Balancing IP. A custom domain with a Google-managed certificate can be enabled, and a static IP can be reserved so the address survives redeploys.

  • Console: Network services → Load balancing; VPC network → IP addresses.
  • CLI:
    kubectl get ingress,svc -n "$NAMESPACE"
    gcloud compute addresses list --project "$PROJECT"

See App_GKE for custom domains, Cloud CDN, and static IP details.

E. Cloud Logging & Monitoring​

Pod stdout/stderr flow to Cloud Logging; GKE metrics flow to Cloud Monitoring, with optional uptime checks and alert policies.

  • Console: Logging → Logs Explorer; Monitoring → Dashboards / Alerting.
  • CLI:
    gcloud logging read 'resource.type="k8s_container" AND resource.labels.namespace_name="'"$NAMESPACE"'"' \
    --project "$PROJECT" --limit 50

3. Komga Application Behaviour​

  • No first-deploy database setup. There is no db-init job — Komga runs its own Flyway schema migrations against the embedded SQLite database on first boot (confirmed via local container logs: org.flywaydb.core.FlywayExecutor, Successfully validated 90 migrations).
  • First-run setup wizard. Open the service URL and complete the setup wizard at / to create the initial admin user — there is no seeded credential and no API/CLI path to create one non-interactively.
  • Add a library after first login. Once logged in, add a "library" pointing at a mounted media path and trigger a scan. This is a manual operator step; no init job seeds it.
  • Health path. Startup and liveness probes target /actuator/health (unauthenticated, 200 {"status":"UP"} once ready). Do not use /api/v1/actuator/health — confirmed via local testing to return 401 Unauthorized even when the app is fully healthy.
  • Single shared library, single instance. Komga's SQLite database is a single file on one mounted volume — running more than one replica risks concurrent writers corrupting it. Keep max_instance_count = 1.
  • Block PVC over GCS FUSE. When stateful_pvc_enabled = true, enable_gcs_storage_volume is auto-set false inside Komga_Common to avoid a double-mount at /config. If the project's SSD quota is constrained, override stateful_pvc_storage_class = "standard" (HDD) — Komga's SQLite access pattern does not need SSD IOPS.

4. Configuration Variables​

Variables are grouped exactly as they appear on the deployment platform. Only settings specific to or notable for Komga are listed; every other input is inherited from App_GKE with its standard behaviour and defaults.

Group 1 — Project & Identity​

VariableDefaultDescription
project_id(required)Target Google Cloud project.
regionus-central1Region for the workload and regional resources.

Group 2 — Deployment Environment​

VariableDefaultDescription
tenant_iddemoShort suffix that makes resource names unique per environment.
support_users[]Emails granted project access and monitoring alerts.
resource_labels{}Labels applied to all resources for cost/ownership tracking.

Group 3 — Application Identity​

VariableDefaultDescription
application_namekomgaBase name for resources. Do not change after first deploy.
application_versionlatestImage tag, passed straight through as the gotson/komga tag.

Group 4 — Runtime & Scaling​

VariableDefaultDescription
deploy_applicationtrueSet false to provision infrastructure only.
container_image_sourceprebuiltDeploys the official gotson/komga image directly — no build step.
cpu_limit1000mCPU per pod.
memory_limit1GiMemory per pod; raise for very large libraries.
min_instance_count1Keep at 1 to avoid cold starts during the Lucene index rebuild on boot.
max_instance_count1Do not increase — Komga serves one shared SQLite library.
jvm_heap_max""Optional JVM -Xmx via JAVA_TOOL_OPTIONS (e.g. "512m", "1g").
timeout_seconds300Maximum request duration (0–3600 seconds).
enable_cloudsql_volumefalseKomga has no Cloud SQL — keep false.
enable_image_mirroringtrueMirror the Komga image into Artifact Registry before deployment.

Group 5 — Environment Variables & Secrets​

VariableDefaultDescription
environment_variables{}Extra non-secret settings.
secret_environment_variables{}Map of env var → Secret Manager secret name.
secret_propagation_delay30Seconds to wait after secret creation before proceeding.
secret_rotation_period2592000sSecret Manager rotation notification frequency.

Group 6 — GKE Backend & Cluster​

VariableDefaultDescription
service_typeLoadBalancerHow the Kubernetes Service is exposed — set LoadBalancer for direct external access.
workload_typenull (auto → StatefulSet)Auto-resolves to StatefulSet when stateful_pvc_enabled = true.
session_affinityNoneNo sticky routing required — single replica.
network_tags["nfsserver"]Node/pod network tags; nfsserver is required when enable_nfs = true.
termination_grace_period_seconds60Seconds to wait after SIGTERM before SIGKILL (lets Komga flush writes).
enable_network_segmentationfalseCreate Kubernetes NetworkPolicy resources.

Group 7 — StatefulSet​

VariableDefaultDescription
stateful_pvc_enabledtrueEnable a per-pod block PVC — recommended for Komga (gcsfuse corrupts its SQLite WAL database). Auto-selects StatefulSet.
stateful_pvc_size20GiPer-pod PVC storage size — size to hold the config, library metadata, and SQLite database.
stateful_pvc_mount_path/configContainer mount path for the PVC — Komga's KOMGA_CONFIGDIR.
stateful_pvc_storage_classstandard-rwoStorageClass for PVCs. Override to standard (HDD) if SSD quota is constrained.
stateful_headless_servicenullCreate a headless Service for stable pod DNS names.
stateful_pod_management_policynullPod creation order: OrderedReady (safe for Komga) or Parallel.
stateful_update_strategynullUpdate strategy: RollingUpdate or OnDelete.
stateful_fs_group3000Pod-level fsGroup. Komga runs as root, so not strictly required, but left set for consistency.

Group 8 — Resource Quota​

VariableDefaultDescription
enable_resource_quotafalseCreate a Kubernetes ResourceQuota in the namespace.
quota_memory_requests / quota_memory_limits""Requires a binary suffix (e.g. 4Gi, 8192Mi) when enabled — bare integers are treated as bytes and block pod scheduling.
quota_cpu_requests / quota_cpu_limits / quota_max_pods / quota_max_services / quota_max_pvcs""Additional quota dimensions.

Group 9 — Reliability Policies​

VariableDefaultDescription
enable_pod_disruption_budgettrueProtect availability during node upgrades.
pdb_min_available1Minimum pods available during voluntary disruptions.

Group 10 — Observability & Health​

VariableDefaultDescription
startup_probeHTTP /actuator/health, 15s delayStartup probe.
liveness_probeHTTP /actuator/health, 30s delayLiveness probe.
startup_probe_configHTTP /actuator/healthApp_GKE-level infrastructure probe.
health_check_configHTTP /actuator/healthApp_GKE-level liveness probe.
uptime_check_configdisabledOptional Cloud Monitoring uptime check.
alert_policies[]Optional metric alert policies.

Group 11 — Jobs & Scheduled Tasks​

VariableDefaultDescription
initialization_jobs[]Komga needs no default init job.
cron_jobs[]Scheduled Kubernetes CronJobs, e.g. for library-maintenance tasks.
additional_services[]Sidecar or helper services deployed alongside Komga.

Group 12 — CI/CD & GitHub Integration​

Standard App_GKE Cloud Build / Cloud Deploy integration — see App_GKE. Key inputs: enable_cicd_trigger, github_repository_url, github_token, enable_cloud_deploy.

Group 13 — Filesystem (NFS)​

VariableDefaultDescription
enable_nfsfalseNFS is off by default.
nfs_mount_path/mnt/nfsMount path inside the container.

Group 14 — Cloud Storage & Artifact Registry​

VariableDefaultDescription
create_cloud_storagetrueCreate the auto-provisioned storage bucket (used when stateful_pvc_enabled = false).
storage_buckets[]Additional buckets to provision.
gcs_volumes[]Additional GCS Fuse volume mounts via the CSI driver — e.g. a separate read-mostly comics/books library bucket.
manage_storage_kms_iam / enable_artifact_registry_cmekfalseCMEK options.
max_images_to_retain7Maximum recent Artifact Registry images to keep.
delete_untagged_imagestrueAutomatically delete untagged images.
image_retention_days30Days after which images are eligible for deletion.

Group 15 — Redis​

Not applicable — enable_redis is forced false inside Komga_GKE. All Redis variables are declared for convention parity.

Group 16 — Database Backend​

Not applicable — database_type is fixed to NONE. All database-related variables are declared for convention parity and forwarded to the foundation with no effect.

Group 17 — Backup & Maintenance​

VariableDefaultDescription
backup_schedule0 2 * * *Automated backup cron (UTC).
backup_retention_days7Retention; raise to 30–90 for production/compliance.
enable_backup_import / backup_source / backup_uri / backup_formatrestore optionsRestore from a backup on deploy.

Group 18 — Custom SQL Scripts​

Not applicable — Komga has no SQL database. Declared for convention parity only.

Group 19 — Custom Domain, Static IP & Networking​

VariableDefaultDescription
enable_custom_domaintrueProvision Ingress for custom hostnames + managed certificate.
application_domains[]Hostnames to serve.
reserve_static_iptrueStable external IP across redeploys.

Group 20 — Identity-Aware Proxy (IAP)​

VariableDefaultDescription
enable_iapfalseRequire Google sign-in in front of Komga's own auth.
iap_authorized_users / iap_authorized_groups[]Who may access.
iap_oauth_client_id / iap_oauth_client_secret""Required when IAP is enabled (sensitive).

Group 21 — Cloud Armor​

VariableDefaultDescription
enable_cloud_armorfalseAttach a Cloud Armor (WAF) policy to the Ingress backend.
admin_ip_ranges[]CIDRs allowed privileged access.
cloud_armor_policy_namedefault-waf-policyPolicy name.
enable_cdnfalseEnable Cloud CDN on the GKE Ingress backend.

Group 22 — VPC Service Controls & Audit Logging​

VariableDefaultDescription
enable_vpc_scfalseEnforce a VPC-SC perimeter (requires organization_id).
vpc_cidr_ranges / vpc_sc_dry_run(set)Access level CIDRs / dry-run mode.
enable_audit_loggingfalseDetailed Cloud Audit Logs.

5. Outputs​

These values are returned on a successful deployment and are the quickest way to locate and explore the running resources.

OutputDescription
service_nameKubernetes Service name.
namespaceNamespace the workload runs in.
service_cluster_ipIn-cluster ClusterIP.
stage_service_cluster_ipsMap of ClusterIPs for stage-specific services.
service_external_ipExternal LoadBalancer IP (when a static IP is reserved).
service_urlURL to reach Komga.
storage_bucketsCreated Cloud Storage buckets.
network_name / network_exists / regionsVPC network, presence, available regions.
container_image / container_registryDeployed image and Artifact Registry repo.
monitoring_enabled / monitoring_notification_channelsMonitoring status and channels.
initialization_jobsNames of the setup jobs (empty by default).
statefulset_nameName of the StatefulSet.
deployment_id / tenant_id / resource_prefixNaming identifiers.
project_id / project_numberProject identifiers.
cicd_enabled / cicd_configurationCI/CD status and details (repo, trigger, registry).
github_repository_url / github_repository_owner / github_repository_nameCI/CD GitHub details.
artifact_registry_repository / cloudbuild_trigger_name / cloudbuild_trigger_idRegistry and build trigger.
kubernetes_readyWhether the cluster/workload is ready.
vpc_sc_enabled / vpc_sc_perimeter_name / vpc_sc_dry_run_modeVPC-SC status.
audit_logging_enabled / artifact_registry_cmek_enabledAudit logging and CMEK status.

6. Configuration Pitfalls & Sensible Defaults​

Risk: Critical (data loss / outage / security) — High (service degraded) — Medium (cost or partial degradation) — Low (minor).

Inherited plan-time validation. This module passes its configuration through the App_GKE foundation engine, which validates values and combinations at plan time. Most mistakes below are caught up front rather than at apply or runtime.

SettingSensible valueRiskConsequence if wrong
max_instance_count1 (never increase)CriticalMultiple pods writing the same SQLite file concurrently risks database corruption.
Health probe path/actuator/healthCritical/api/v1/actuator/health is auth-gated (401) — using it as the probe path means the pod never becomes Ready even though Komga is fully healthy.
stateful_pvc_enabled vs enable_gcs_storage_volumeLet Komga_Common auto-toggleCriticalEnabling both mounts two volumes at the same /config path — a double-mount conflict.
stateful_pvc_storage_classstandard-rwo, override to standard under SSD pressureMediumSSD-backed PVCs draw the tight SSD_TOTAL_GB quota; a scale-to-zero campaign can exhaust it.
First-run setup wizardComplete promptly after deployHighAn unclaimed setup wizard leaves the instance without an admin account; anyone who reaches the URL first can claim it.
min_instance_count1MediumRestarting the single pod triggers cold-start latency including a Lucene index rebuild.
memory_limit1Gi, raise for large librariesMediumUndersized memory can OOM-kill during a large library scan.
container_image_sourceprebuiltMediumSwitching to custom with no Dockerfile fails the build — Komga needs no custom build.
quota_memory_requests / _limitsbinary units (4Gi, 8192Mi)CriticalBare integers are bytes and block all pod scheduling in the namespace.
enable_pod_disruption_budgettrueMediumDisabling allows GKE to evict the pod during maintenance with no protection.

For the foundation behaviour referenced throughout — IAM and Workload Identity, autoscaling, ingress and certificates, CI/CD, Cloud Armor, IAP, Binary Authorization, VPC-SC, backups, and image mirroring — see App_GKE. Komga-specific application configuration shared with the Cloud Run variant is described in Komga_Common.

Need RAD to do something it does not do yet? Request it on the roadmap, or vote on what is already there.