ghost
by harish2k01
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
| Key | Type | Default | Description |
|---|---|---|---|
replicaCount | int | 1 | Number of Ghost replicas |
image.repository | string | ghost | Container image repository |
image.tag | string | 6.77.0-alpine | Container image tag |
image.pullPolicy | string | IfNotPresent | Container pull policy |
serviceAccount.create | bool | true | Create a ServiceAccount for Ghost |
serviceAccount.automountServiceAccountToken | bool | false | Mount Kubernetes API token into the Ghost pod |
podSecurityContext | object | {fsGroup: 1000, fsGroupChangePolicy: OnRootMismatch} | Pod-level security context |
securityContext | object | hardened defaults | Container-level security context |
deployment.revisionHistoryLimit | int | 3 | Number of old ReplicaSets to retain |
deployment.strategy | object | {type: Recreate} | Deployment update strategy |
env.url | string | http://localhost:2368 | Public URL where users access Ghost |
env.NODE_ENV | string | production | Ghost runtime environment |
envFrom | list | [] | Additional environment sources |
extraEnv | list | [] | Additional Kubernetes EnvVar entries |
secretEnv.create | bool | false | Create a Kubernetes Secret from secretEnv.values |
secretEnv.name | string | "" | Override generated Secret name |
secretEnv.existingSecret.name | string | "" | Existing Secret containing sensitive values |
secretEnv.existingSecret.keys | list | [] | Existing Secret key mappings |
extraInitContainers | list | [] | Extra init containers appended to the pod |
sidecars | list | [] | Extra sidecar containers appended to the pod |
mysql.enabled | bool | true | Deploy a chart-managed MySQL StatefulSet |
mysql.image.repository | string | mysql | MySQL image repository |
mysql.image.tag | string | 8 | MySQL image tag |
mysql.auth.database | string | ghost | MySQL database name |
mysql.auth.username | string | ghost | MySQL username |
mysql.auth.password | string | CHANGE_ME_GHOST_DB_PASSWORD | MySQL password used when existingSecret is empty |
mysql.auth.existingSecret | string | "" | Existing Secret containing MySQL credentials |
mysql.auth.passwordKey | string | db-password | Secret key containing the Ghost DB password |
mysql.persistence.enabled | bool | true | Persist MySQL data |
mysql.persistence.existingClaim | string | "" | Existing PVC for MySQL data |
mysql.persistence.size | string | 10Gi | MySQL PVC size |
mysql.resources | object | {} | MySQL resource requests and limits |
service.type | string | ClusterIP | Kubernetes Service type |
service.port | int | 2368 | Kubernetes Service port |
service.targetPort | string | http | Service target port |
service.loadBalancerIP | string | "" | Static LoadBalancer IP |
service.loadBalancerSourceRanges | list | [] | Allowed source ranges for LoadBalancer services |
service.extraPorts | list | [] | Additional Service ports |
containerPorts | list | [{name: http, containerPort: 2368, protocol: TCP}] | Container ports |
persistence.content.enabled | bool | true | Create or mount a content PVC |
persistence.content.existingClaim | string | "" | Existing PVC for /var/lib/ghost/content |
persistence.content.size | string | 10Gi | Content PVC size |
persistence.content.storageClassName | string | "" | Content PVC storage class |
extraVolumes | list | [] | Additional pod volumes |
extraVolumeMounts | list | [] | Additional container volume mounts |
ingress.enabled | bool | false | Create a Kubernetes Ingress |
httpRoutes.main.enabled | bool | false | Create a Gateway API HTTPRoute |
podDisruptionBudget.enabled | bool | false | Create a PodDisruptionBudget |
networkPolicy.enabled | bool | false | Create a NetworkPolicy |
resources | object | {} | Container resource requests and limits |
topologySpreadConstraints | list | [] | Pod topology spread constraints |
nodeSelector | object | {} | Pod node selector |
tolerations | list | [] | Pod tolerations |
affinity | object | {} | 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.
| Key | Type | Default | Description |
|---|---|---|---|
activityPub.enabled | bool | false | Enable the optional Social Web proxy and routes. |
activityPub.target | string | https://ap.ghost.org | ActivityPub upstream URL. |
activityPub.image | string | caddy:2.11.9-alpine | Proxy container image. |
activityPub.resources | object | See values.yaml | Proxy 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.
| Key | Default | Description |
|---|---|---|
httpRoutes | Disabled main entry | Named HTTPRoutes; defaults create no routes. |
httpRoutes.<name>.enabled | true | Set false to omit an entry, including its attachments. |
httpRoutes.<name>.parentRefs | Required when enabled | Gateway references, with optional namespace and listener section. |
httpRoutes.<name>.hostnames | Required when enabled | Independent explicit hostname list. |
httpRoutes.<name>.annotations | {} | Per-route annotations. |
httpRoutes.<name>.rules | Path 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.
- Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
- Place the chartghost is pinned at v0.3.7 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
- 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