easy Ghost self-hosting with docker-compose
You will need docker and docker-compose
For running this configuration you will need a machine with atleast 1GB of RAM. If your blog has estimate of less than 100K hits/day you will be fine with sqlite instead, consider using ghost-sqlite-compose which is more lightweight
SSL Certificate will be generated and refreshed automatically by Traefik. You only need to specify your domain and mail address for ACME notifications in a config file .env.
- Clone this repo and create default config from template
git clone https://github.com/linnik/ghost-mysql-compose.git
cd ghost-mysql-compose
cp env.template .env-
Fill config file named
.envwith credentials for mail sending and DB access. Leave no empty values! -
Launch!
docker compose up -d
docker compose ps-
Update the version variables in your existing
.env(or copyenv.templateto.envagain and re-enter your values). Verify what compose resolves withdocker compose config | grep image: -
Back up your database first:
docker compose exec mysql sh -c 'exec mysqldump -uroot -p"$MYSQL_ROOT_PASSWORD" "$MYSQL_DATABASE"' > ghostdb-$(date +%F).sql- Pull new images and restart:
docker compose pull
docker compose up -dThe v5 → v6 migration runs automatically on first boot and is one-way — a migrated database can't run on a 5.7.0 image again. On larger sites it can take a while: expect a slow first boot and possible 404s while the migration runs; watch docker compose logs -f ghost. Your existing Let's Encrypt certificates carry over to Traefik v3 — no re-issue needed.
Each Ghost version bump is tagged in git, e.g. git tag -a 6.56.0 -m "Ghost 6.56.0".
- Requires MySQL 8 — this stack uses 8.4 LTS (the 8.0 line reached EOL in April 2026)
- Node.js 22 is bundled in the image — no action needed
?limit=allno longer returns all items; API responses are capped at 100 — integrations must paginate- AMP feature removed
- Admin
session/API endpoint removed