ghost

by harish2k01

Helm chartv0.3.7App 6.77.0-alpineMITVerified publisher

Deploys Ghost publishing platform on Kubernetes

About this chart

Ghost Helm Chart

Browse the Helm chart catalog to explore available charts and installation commands.

This chart deploys Ghost, a publishing platform for blogs, newsletters, memberships, and content sites, using the official ghost container image.

See CHANGELOG.md for app/chart changes and migration notes. The commented env examples in values.yaml cover optional runtime settings; leave them unset to inherit Ghost's defaults. Use Secret references for credentials rather than putting them in plain env values.

[!NOTE] This is an unofficial community Helm chart maintained by harish2k01. It is not affiliated with or endorsed by the upstream project. For chart issues, questions, or improvements, please open an issue in the harish2k01/helm-charts repository.

Install

helm repo add harish2k01 https://harish2k01.github.io/helm-charts
helm repo update
helm install ghost harish2k01/ghost

Install From OCI

This chart is also published as an OCI chart in GHCR. Use the same values and namespace flags with the OCI reference:

helm install ghost oci://ghcr.io/harish2k01/helm-charts/ghost --version 0.3.5

Database Configuration

The default values deploy a MySQL 8 StatefulSet and configure Ghost to use it. For production, replace the inline database password with an existing Kubernetes Secret.

env:
  url: https://blog.example.com

mysql:
  auth:
    existingSecret: ghost-db
    passwordKey: password

To use an external MySQL 8 database instead, disable the internal StatefulSet and provide Ghost database settings yourself:

mysql:
  enabled: false

env:
  url: https://blog.example.com
  NODE_ENV: production
  database__client: mysql
  database__connection__host: mysql.example.svc.cluster.local
  database__connection__user: ghost
  database__connection__database: ghost

secretEnv:
  existingSecret:
    name: ghost-db
    keys:
      - envName: database__connection__password
        secretKey: password

Production Hardening

The chart includes production-oriented controls similar to larger application charts:

serviceAccount:
  automountServiceAccountToken: false

podSecurityContext:
  fsGroup: 1000
  fsGroupChangePolicy: OnRootMismatch

securityContext:
  allowPrivilegeEscalation: false
  capabilities:
    drop:
      - ALL
  runAsNonRoot: true
  runAsUser: 1000
  runAsGroup: 1000
  seccompProfile:
    type: RuntimeDefault

resources:
  requests:
    cpu: 250m
    memory: 512Mi
  limits:
    memory: 1Gi

networkPolicy:
  enabled: true

podDisruptionBudget:
  enabled: true
  minAvailable: 1

Use extraInitContainers, sidecars, extraEnv, extraVolumes, extraVolumeMounts, scheduling controls, and Service load balancer settings for cluster-specific integrations.

Web Access

Expose Ghost with Gateway API:

env:
  url: https://blog.example.com

httpRoutes:
  main:
    enabled: true
    parentRefs:
      - name: gateway
        namespace: gateway-system
        sectionName: https
    hostnames:
      - blog.example.com

Or with Ingress:

env:
  url: https://blog.example.com

ingress:
  enabled: true
  className: nginx
  hosts:
    - host: blog.example.com
      paths:
        - path: /
          pathType: Prefix
  tls:
    - secretName: ghost-tls
      hosts:
        - blog.example.com

Ghost Admin is available at https://blog.example.com/ghost.

Persistence

Ghost stores uploaded media, themes, adapters, and logs under /var/lib/ghost/content:

persistence:
  content:
    enabled: true
    size: 10Gi
    storageClassName: ""

To reuse an existing claim:

persistence:
  content:
    existingClaim: ghost-content

Values

KeyTypeDefaultDescription
replicaCountint1Number of Ghost replicas
image.repositorystringghostContainer image repository
image.tagstring6.77.0-alpineContainer image tag
image.pullPolicystringIfNotPresentContainer pull policy
serviceAccount.createbooltrueCreate a ServiceAccount for Ghost
serviceAccount.automountServiceAccountTokenboolfalseMount Kubernetes API token into the Ghost pod
podSecurityContextobject{fsGroup: 1000, fsGroupChangePolicy: OnRootMismatch}Pod-level security context
securityContextobjecthardened defaultsContainer-level security context
deployment.revisionHistoryLimitint3Number of old ReplicaSets to retain
deployment.strategyobject{type: Recreate}Deployment update strategy
env.urlstringhttp://localhost:2368Public URL where users access Ghost
env.NODE_ENVstringproductionGhost runtime environment
envFromlist[]Additional environment sources
extraEnvlist[]Additional Kubernetes EnvVar entries
secretEnv.createboolfalseCreate a Kubernetes Secret from secretEnv.values
secretEnv.namestring""Override generated Secret name
secretEnv.existingSecret.namestring""Existing Secret containing sensitive values
secretEnv.existingSecret.keyslist[]Existing Secret key mappings
extraInitContainerslist[]Extra init containers appended to the pod
sidecarslist[]Extra sidecar containers appended to the pod
mysql.enabledbooltrueDeploy a chart-managed MySQL StatefulSet
mysql.image.repositorystringmysqlMySQL image repository
mysql.image.tagstring8MySQL image tag
mysql.auth.databasestringghostMySQL database name
mysql.auth.usernamestringghostMySQL username
mysql.auth.passwordstringCHANGE_ME_GHOST_DB_PASSWORDMySQL password used when existingSecret is empty
mysql.auth.existingSecretstring""Existing Secret containing MySQL credentials
mysql.auth.passwordKeystringdb-passwordSecret key containing the Ghost DB password
mysql.persistence.enabledbooltruePersist MySQL data
mysql.persistence.existingClaimstring""Existing PVC for MySQL data
mysql.persistence.sizestring10GiMySQL PVC size
mysql.resourcesobject{}MySQL resource requests and limits
service.typestringClusterIPKubernetes Service type
service.portint2368Kubernetes Service port
service.targetPortstringhttpService target port
service.loadBalancerIPstring""Static LoadBalancer IP
service.loadBalancerSourceRangeslist[]Allowed source ranges for LoadBalancer services
service.extraPortslist[]Additional Service ports
containerPortslist[{name: http, containerPort: 2368, protocol: TCP}]Container ports
persistence.content.enabledbooltrueCreate or mount a content PVC
persistence.content.existingClaimstring""Existing PVC for /var/lib/ghost/content
persistence.content.sizestring10GiContent PVC size
persistence.content.storageClassNamestring""Content PVC storage class
extraVolumeslist[]Additional pod volumes
extraVolumeMountslist[]Additional container volume mounts
ingress.enabledboolfalseCreate a Kubernetes Ingress
httpRoutes.main.enabledboolfalseCreate a Gateway API HTTPRoute
podDisruptionBudget.enabledboolfalseCreate a PodDisruptionBudget
networkPolicy.enabledboolfalseCreate a NetworkPolicy
resourcesobject{}Container resource requests and limits
topologySpreadConstraintslist[]Pod topology spread constraints
nodeSelectorobject{}Pod node selector
tolerationslist[]Pod tolerations
affinityobject{}Pod affinity

Social Web (ActivityPub)

Enable activityPub.enabled with an enabled httpRoutes entry to route /.ghost/activitypub/, /.well-known/webfinger, and /.well-known/nodeinfo through a small Caddy proxy. The upstream defaults to Ghost's hosted service (https://ap.ghost.org); activityPub.target may point to a separately managed ActivityPub service. The public Host header and request paths are retained. The proxy does not deploy an ActivityPub database or server.

httpRoutes:
  main:
    enabled: true
    parentRefs:
      - name: public-gateway
    hostnames: [blog.example.com]
activityPub:
  enabled: true

Hosted ActivityPub is subject to Ghost's usage limits. Network operations are processed by the configured upstream. The proxy needs DNS and outbound HTTPS access; restrictive cluster policies must allow both. This option currently supports Gateway API HTTPRoute, not Ingress.

KeyTypeDefaultDescription
activityPub.enabledboolfalseEnable the optional Social Web proxy and routes.
activityPub.targetstringhttps://ap.ghost.orgActivityPub upstream URL.
activityPub.imagestringcaddy:2.11.9-alpineProxy container image.
activityPub.resourcesobjectSee values.yamlProxy resource requests and limits.

Caddy 2.11.8 and later images use a permitted-only executable capability. The proxy listens on unprivileged port 8080 with all capabilities dropped and none added, UID/GID 1000, no privilege escalation and a read-only root filesystem. Older Caddy image overrides can require their previous capability setup; use the corresponding older chart when reverting those images.

The proxy strips trailing slashes internally before forwarding requests. This prevents redirect loops between cached Ghost slash-adding redirects and the ActivityPub upstream's slash-removing redirects. The deployment configuration checksum also rolls out this normalization change to existing proxy pods.

Additional Ghost configuration

env.server__shutdownTimeout is in milliseconds and can apply first to HTTP draining and then to background-job cleanup. Allow both stages plus a margin in the pod's termination grace period. For busy workloads using a 60000 ms timeout, consider deployment.terminationGracePeriodSeconds: 150; the existing chart default of 60 seconds can truncate worst-case cleanup.

The generic env map supports Ghost nested configuration using __, with commented deployment examples in values.yaml. Put credentials in secretEnv or extraEnv with valueFrom.secretKeyRef, and mount custom configuration/adapters with extraVolumes/extraVolumeMounts. For the full supported configuration surface see the exact target defaults. See CHANGELOG.md for upgrade and compatibility details.

StatefulSet claim labels

Claim templates use stable identity labels so chart/app version changes do not modify immutable storage metadata. Normal workload labels still report the current versions. The following values merge explicitly pinned labels into each claim template:

  • mysql.persistence.claimTemplateLabels

For an existing StatefulSet created by an older chart, copy the labels from its current spec.volumeClaimTemplates[].metadata.labels into the corresponding map before the first upgrade. Keep any historical helm.sh/chart and app.kubernetes.io/version labels fixed there; they describe the original claim template, not the running app. This preserves the immutable template without deleting or replacing the StatefulSet/PVC. Empty defaults suit new installations. Helm lookup is not required, so GitOps/offline rendering remains deterministic. Do not remove pinned labels later without a separately planned migration. Storage size, claim names, access modes and other immutable fields have their own migration constraints.

Multiple HTTPRoutes

Use httpRoutes to define one or more routes, each with its own Gateway references, hostnames, annotations, and rules. The default main entry is disabled.

httpRoutes:
  internal:
    parentRefs:
      - name: internal-gateway
        namespace: ingress
        sectionName: https
    hostnames: [app.internal.example.com]
  external:
    parentRefs:
      - name: external-gateway
        namespace: ingress
        sectionName: https
    hostnames: [app.example.com]

Each map key is a lowercase DNS label of up to 40 characters and becomes the resource-name suffix (<app-fullname>-internal, for example). Long base names are shortened to keep the suffix and stay within 63 characters; collisions fail rendering.

KeyDefaultDescription
httpRoutesDisabled main entryNamed HTTPRoutes; defaults create no routes.
httpRoutes.<name>.enabledtrueSet false to omit an entry, including its attachments.
httpRoutes.<name>.parentRefsRequired when enabledGateway references, with optional namespace and listener section.
httpRoutes.<name>.hostnamesRequired when enabledIndependent explicit hostname list.
httpRoutes.<name>.annotations{}Per-route annotations.
httpRoutes.<name>.rulesPath prefix /Gateway API matches and filters. Backend references are always supplied by the chart using its application Service and HTTP port.

Each route has independent hostnames, attachments, annotations, and rules. Chart-specific backend behavior is retained; Ghost also includes its ActivityPub endpoints when enabled. Gateway API CRDs and a compatible controller are required; the referenced Gateway must allow attachment from this namespace.

Migration from the single-route option

httpRoute has been removed. Mo

Deploy ghost with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has ghost 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 chartghost is pinned at v0.3.7 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