Ghost is the publishing platform that most often ends up self-hosted: the software is open source, the official Ghost(Pro) hosting charges by audience size, and the stack is small, a Node.js application and a MySQL 8 database. Dokploy ships Ghost as a one-click template, which gets you a running site in two minutes and leaves exactly three things for you to configure properly: the public URL, mail, and backups. This guide covers all of them, using the template as it stands in the Dokploy templates repository on 31 October 2026.
What the Dokploy Ghost template deploys
The template's Compose file runs two services with no published host ports, which is the correct Dokploy pattern (Traefik routes by domain, nothing is exposed directly):
ghostfrom the ghost:6-alpine image, with the database connection set to MySQL (database__client: mysql, hostdb, userroot, databaseghost), a volume on/var/lib/ghost/contentfor themes, images and uploads, andurlset tohttp://${GHOST_HOST}.dbfrom mysql:8.0 with a volume on/var/lib/mysql.
The template's variables file sets GHOST_HOST to the domain you enter and maps that domain to the ghost service on port 2368. Two defaults need attention before you publish: the MySQL root password is the literal example, and the Ghost URL is http://, not https://. Ghost uses url to build every link and to decide whether admin cookies are secure, so a site served over HTTPS with an http:// url produces redirect loops and mixed content.
Step 1: deploy the template
- On a server with Dokploy (the Starter preset on the MassiveGRID Dokploy hosting page, 2 vCPU and 4 GB for $9.58 a month, is more than Ghost needs; MassiveGRID installs Dokploy on request), create a project and choose Create Service, Template, then Ghost.
- Enter your domain. Make sure its A record already points at the server, otherwise the certificate request fails and you will recreate the domain later (see our domain troubleshooting post).
- Before the first deploy, open the Compose editor and change
MYSQL_ROOT_PASSWORDanddatabase__connection__passwordto the same generated secret, and change theurlline tohttps://${GHOST_HOST}. - Deploy. Watch the logs until MySQL reports it is ready and Ghost prints its "Ghost booted" line, then open
https://yourdomain/ghost/to create the owner account.
Because this is a Compose service, any later change to the domain or the environment needs a redeploy to take effect; Traefik reads Compose routes from container labels.
Step 2: mail, the setting everyone forgets
Ghost sends two kinds of email: transactional (staff invitations, password resets, member sign-in links) through any SMTP provider, and newsletters, which Ghost sends only through Mailgun for bulk delivery. Without the first, you cannot invite authors or let members log in. Add to the ghost service environment:
mail__transport: SMTP
mail__options__service: Mailgun # or omit and set host/port for another provider
mail__options__host: smtp.eu.mailgun.org
mail__options__port: 465
mail__options__secure: "true"
mail__options__auth__user: postmaster@mg.example.com
mail__options__auth__pass: ...
mail__from: "'Your Site' <hello@example.com>"
Double underscores map to Ghost's nested config keys. For newsletters, add your Mailgun domain and API key under Settings, Email newsletter in the Ghost admin after the site is up; Postmark, SES or Resend work for the transactional part but not for bulk newsletter sending in Ghost.
Step 3: backups that actually restore a site
Everything you write is in MySQL; themes and uploaded images are in the ghost content volume. Both need backing up, and because the template runs MySQL inside the Compose stack rather than as a Dokploy database service, use these two mechanisms:
- Volume Backups on the Compose service for both named volumes (
ghostanddb), to an S3 destination on a schedule. Named volumes are the only type Dokploy's volume backups support, which is why the template uses them. - A scheduled job that runs
mysqldump --single-transaction -uroot -p"$MYSQL_ROOT_PASSWORD" ghostinside thedbcontainer and writes to a mounted path that the volume backup picks up, for a consistent logical dump alongside the raw volume.
Also export from the Ghost admin (Settings, Import/export) before upgrades; it is a JSON of all content that imports into any Ghost instance. Our backup guide covers S3 destinations and restore tests.
Step 4: upgrades, themes and performance
- Upgrades: the image tag
ghost:6-alpinetracks Ghost 6 minor releases; redeploying pulls the newest and Ghost migrates its database on boot. Take a backup first. Ghost 6 requires MySQL 8, which the template provides. - Themes: upload through the admin; they live in the content volume. Custom themes that need
npmbuilds are built on your machine, not on the server. - Performance: Ghost idles at 150 to 300 MB and MySQL at 300 to 500 MB; a 2 vCPU, 4 GB server is comfortable for a site with tens of thousands of monthly readers. Put a CDN in front for image-heavy sites, and leave Ghost's own caching on.
- Members and payments: Stripe connects from the admin; your
urlmust be the public HTTPS domain for webhooks to work.
What it costs against Ghost(Pro)
Ghost(Pro) is priced by tier and audience size, and the Ghost Foundation's hosting pays for Ghost's development, which is a fair reason to choose it. Self-hosting on the MassiveGRID Starter preset is $9.58 a month for the server with no member or staff limits, plus Mailgun's pay-as-you-go charges if you send newsletters. Ghost(Pro) includes a global CDN, managed upgrades and Mailgun-backed sending in its price; self-hosting gives you unlimited staff users, any theme or integration, and a server you can also use for the rest of your stack. Check ghost.org/pricing for current tiers; they changed more than once in the last two years.
Frequently Asked Questions
Is there a Dokploy template for Ghost?
Yes. The Dokploy templates catalogue includes Ghost, deploying the ghost:6-alpine image with a MySQL 8 database and named volumes for content and data, routed by Traefik to port 2368 on the domain you enter. Change the default database password and set the url to https before the first deploy.
Why does my self-hosted Ghost redirect in a loop or show mixed content?
Because Ghost’s url setting does not match how the site is served. The template sets url to http://your-domain; behind Traefik with HTTPS it must be https://your-domain. Change the url environment variable on the ghost service and redeploy the Compose stack.
Can I send newsletters from self-hosted Ghost?
Yes, through Mailgun, which is the only bulk email provider Ghost supports for newsletters; add the Mailgun domain and API key in the Ghost admin under Email newsletter. Transactional mail (invites, sign-in links) can use any SMTP provider through the mail__ environment variables.
Dokploy hosting from $9.58 a month
A MassiveGRID VPS preset for Dokploy: 2 vCPU, 4 GB RAM and 64 GB NVMe for $9.58 a month on shared cores or $19.80 on dedicated cores, in New York, London, Frankfurt or Singapore, on a Proxmox HA cluster with Ceph storage, a 100% uptime SLA and a 15-day money-back guarantee. Run the one-line installer yourself or open a ticket and we install Dokploy for you.
Configure a Dokploy server