Publishing, checked 2026-09-07
Ghost: Docker configuration reference
Self-hosted publishing platform for blogs and newsletters, with built-in members and Stripe subscriptions.
At a glance
- Image:
ghost - Tags:
latest,6-alpine,6-bookworm,6.62.0,6.62.0-alpine - Licence: MIT
- Source: https://github.com/TryGhost/Ghost
- Docs: https://docs.ghost.org/
Ports
| Port | What listens | Source |
|---|---|---|
2368 | Default HTTP listener inside the container. Map it to whatever host port the reverse proxy expects. | source for port 2368 |
Environment variables
| Variable | Required | What it does | Example | Source |
|---|---|---|---|---|
url | Yes | The public URL of the site. Every internal link, RSS entry, sitemap and email is generated from this value, so a wrong or missing one rewrites links across the whole site. | https://blog.example.com | source for url |
database__client | Yes | Database driver. Production mode requires an external MySQL 8 server; SQLite via database__connection__filename only works in development mode. | mysql | source for database__client |
database__connection__host | Yes | Hostname of the MySQL server, nested under the database__connection key using the double-underscore config syntax. | db | source for database__connection__host |
mail__transport | No | Mail transport for member and staff emails. Required in production; without it, invites, password resets and newsletters cannot send. | SMTP | source for mail__transport |
NODE_ENV | No | Node environment. The Docker image defaults to production, unlike a bare Ghost install which defaults to development. | production | source for NODE_ENV |
Volumes that must persist
| Path | What is in it | Source |
|---|---|---|
/var/lib/ghost/content | Themes, images, uploaded files and the SQLite database file in development mode. Everything Ghost cannot regenerate lives here. | source for /var/lib/ghost/content |
Behind a reverse proxy
- Route the domain to container port 2368. Production mode needs X-Forwarded-For, X-Forwarded-Host and X-Forwarded-Proto set correctly by the proxy. source for this reverse-proxy note
- The url config value must exactly match how the site is reached, including http versus https. A mismatch breaks Portal, member auth redirects and email links. source for this reverse-proxy note
- Docker secrets are supported: append _FILE to a nested variable such as database__connection__password_FILE to read it from a file instead of the environment, from Ghost 6.58.0 onward. source for this reverse-proxy note
What it needs alongside it
| Dependency | Why | Source |
|---|---|---|
| MySQL 8 | Required application database in production mode. SQLite is only supported in development mode and is not persisted the same way. | source for MySQL 8 |
Release timeline
| Version | Date | Breaking | What changed | Source |
|---|---|---|---|---|
v6.62.0 | 2026-09-01 | No | Released the React tag details screen and fixed unsubscribe links affecting the wrong member when logged in. | source for release v6.62.0 |
v6.61.0 | 2026-08-27 | No | Added email-able gift subscriptions and Portal gift subscription links. | source for release v6.61.0 |
v6.60.0 | 2026-08-25 | No | Added new analytics fields to the automations list and removed the gift card and email preview on mobile. | source for release v6.60.0 |
v6.59.0 | 2026-08-19 | No | Fixed migrations failing on MySQL older than 8.0.28 and fixed navigation markup for themes without the icons flag. | source for release v6.59.0 |
v6.58.0 | 2026-08-18 | No | Added support for Docker secrets in config loading via the _FILE variable suffix, and released the React member details screen. | source for release v6.58.0 |
If it is not coming up
- 502 Bad Gateway (Traefik) — build succeeds and container runs, but your-domain.com returns 502 Bad Gateway
- ECONNREFUSED / ENOTFOUND / connection to server at "postgres" port 5432 failed
- Coolify volume data lost after redeploy / a new empty volume is created every deploy
Read from the upstream documentation, repository and container registry by Keita Emsden on 2026-09-07. Every row links the page it came from. Upstream changes without telling anyone, so check the source link before you rely on a value.