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):

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

  1. 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.
  2. 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).
  3. Before the first deploy, open the Compose editor and change MYSQL_ROOT_PASSWORD and database__connection__password to the same generated secret, and change the url line to https://${GHOST_HOST}.
  4. 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:

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

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

Further Reading