Skip to content

Ghost on Dokploy

For anyone wrestling with getting Ghost set up on Dokploy this post is for you.

You should be able to use the Docker Compose below to get Ghost running on Dokploy. You should also change the passwords in the file to something more secure.

Terminal window
version: '3.1'
services:
ghost:
image: ghost:5-alpine
restart: always
depends_on:
- ghost_db
environment:
database__client: mysql
database__connection__host: ghost_db
database__connection__user: root
database__connection__password: password
database__connection__database: ghost
url: 'https://blog.example.com'
volumes:
- ghost:/var/lib/ghost/content
networks:
- dokploy-network
ghost_db:
image: mysql:8.0
restart: always
environment:
MYSQL_ROOT_PASSWORD: password
MYSQL_DATABASE: ghost
volumes:
- ghost_db:/var/lib/mysql
networks:
- dokploy-network
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost"]
interval: 10s
timeout: 5s
retries: 5
networks:
dokploy-network:
external: true
volumes:
ghost:
ghost_db:

In the domain settings, you should set the port to be 2368 and switch on the https option with None as the certificate. To then log in to your (hopefully now working) Ghost instance, head to blog.example.com/ghost and create an account.