Skip to content
Greffon
Tutorial

Self-Host Ghost with Greffon

Ghost runs blogs and member-funded newsletters for a lot of independent writers. Here is the honest setup for running it on a greffer you own, email and all.

GLGreffon Labs5 min read
~/blog/self-host-ghost

Ghost is a modern publishing platform: a blog, a newsletter engine, and a membership system in one. Plenty of independent writers run it on Ghost's own hosted service, which is fine until you want your content, your member list, and your revenue to sit on hardware you control. Self-hosting answers that plainly. Greffon takes the fiddly parts (a database, a reverse proxy, a certificate) off your plate so you can graft Ghost and start writing.

Why own your publishing

Ghost is an open-source Node.js application backed by a MySQL database. When you publish on someone else's hosted Ghost, your posts, your subscriber emails, and your members all live on their account. Grafting Ghost onto a greffer means the content and the member list live on a machine you own. The catalog entry bundles Ghost with its MySQL database in one greffon, so you do not stand up a separate database server by hand.

Graft it from the catalog

On a greffer you do not write a compose file or wire a reverse proxy. Pick Ghost from the catalog and graft it onto your greffer. Greffon generates the database password, issues the certificate, and routes the app, so Ghost comes up reachable over HTTPS without you assembling that plumbing yourself. The database password is shared only between the bundled Ghost and MySQL containers, never something you have to type.

Create your admin account quickly
Ghost does not ship with a default login. The first person to visit /ghost on your new site creates the owner account. Open that page and claim the owner account as soon as the greffon starts, before you share the URL with anyone.

The URL Ghost bakes in

Ghost is fussier than most apps about its address. It bakes the configured site URL into emails, RSS feeds, canonical links, and asset paths, so that value needs to be the real public URL of your site, not a placeholder. Greffon defaults it to the instance URL it assigns, which is correct out of the box. If you later put Ghost on a custom domain, update the URL setting and restart so the change propagates everywhere Ghost embedded it.

To reach your site from outside its own network, you have two honest options. Tunnel mode has a greffer connect outbound to the manager's tunnel and serve its apps with no inbound ports open, which is the answer for a box behind NAT or CGNAT. Ghost is a plain HTTP app, so the tunnel carries it fully. If you would rather expose the greffer directly, port forwarding plus dynamic DNS works too. Either way the site stays on HTTPS.

Email is the part to plan

This is the section most Ghost walkthroughs underplay. Ghost leans on email heavily: member sign-in is passwordless and arrives by email, and the whole newsletter feature is email. Out of the box, self-hosted Ghost can send transactional mail (sign-in links, password resets) through an SMTP server you configure, but bulk newsletter delivery to your member list specifically requires a Mailgun account. That is a Ghost design choice, not a Greffon limitation.

No SMTP means no member sign-in
Member login links, staff invites, and password resets all go out over the SMTP settings. If you skip SMTP, the blog still renders, but nobody can sign in as a member and you cannot invite staff. Configure a real mail provider before you open membership to anyone.

Memory and storage

Ghost plus its MySQL database is heavier than a static blog. MySQL alone wants meaningful memory, and Ghost is a long-running Node process. Plan for a greffer with at least 1 GB of RAM for a small site, and more if you expect real traffic or a large member list. A 512 MB box that runs a static site comfortably will struggle here. Uploaded images and the database both grow over time, so keep an eye on disk as your archive builds up.

Back it up

Two things are worth not losing: the MySQL database (your posts, members, and settings) and the content directory (uploaded images and themes). Greffon handles TLS and routing today, and native one-click backups are coming in M2. Until then, bring your own backup tool (restic or borgbackup are the usual choices), back up the greffon's data on a schedule, and store a copy off the greffer. If you also run Ghost's own JSON content export now and then, you have a portable copy of your posts independent of the database files.

A backup you have not restored is not a backup
Before your archive grows large, test a restore once on a throwaway greffon. A member list and years of posts are not the kind of thing you want to discover is unrecoverable the day you need it back.

FAQ

Is self-hosted Ghost the same as Ghost(Pro)?
It is the same open-source application. Ghost(Pro) is the company's hosted service, which funds development and bundles email delivery and updates. Self-hosting gives you the same software on your own machine, with the email setup and updates now your responsibility.
Can I send newsletters from a self-hosted Ghost?
Transactional email (sign-in links, resets) works through any SMTP server you configure. Bulk newsletter sending to your members specifically requires a Mailgun account, which is how Ghost wires its newsletter feature. That is a Ghost requirement, not a Greffon one.
Do I need to set up MySQL myself?
No. The catalog entry bundles Ghost with its MySQL database in one greffon, and Greffon generates the database password automatically. The two containers talk to each other privately; you never type that password.
What happens if I change my domain later?
Update the site URL setting and restart the greffon. Ghost bakes its URL into emails, feeds, and asset links, so the restart is what propagates the new address everywhere it embedded the old one.
GL
Greffon Labs
We build Greffon, the simplest way to turn any machine into a server you own.

Ready to turn on your greffer?

Install in minutes. Deploy each app in seconds. Your server, your apps.

Read the docs