Self-host Ghost with Levelrail

Verified

A fast, modern publishing platform for blogs and newsletters, with built-in memberships.

  • AuthorTryGhostVerified by Levelrail
  • LicenceMIT
  • Memory512 MiB
  • Archarm64
  • Services2

How to self-host Ghost

  1. Pull the images

    2 images are pulled on your server.

    Show images
    • mysql:8.4
    • ghost:5
  2. Create the app

    2 services start in a single Compose app, with 2 named volume mounts for your data, on port 2368.

  3. Fill in the secrets

    3 secrets are generated and stored encrypted, 7 settings are preset, you do not have to fill in anything.

  4. Open it

    Without a domain the app gets an sslip.io address; add --domain SERVICE=HOST to use your own.

Ghost requirements

Memory
About 512 MiB
Architectures
amd64 image published, arm64 tested
Ports
2368
Domain
Optional, an sslip.io address is used without one
Settings
none to fill in
License
MIT, permissive license
  • Verified. Verified on arm64 with image tag 5. Our CI ran this exact image version and it answered on its health path. Evidence
  • Host ports. It publishes port 2368 on the host, so open them in the VPS firewall only if you want that.

Install Levelrail first

On a server with Levelrail running, run the command above, or open the dashboard: Apps, New app, Browse templates, then Ghost. New to Levelrail? Install it on a fresh VPS first.

docker pull ghcr.io/glincker/levelrail:latest

Then levelrail-cli login --device. See Getting started and the Ghost docs page.

Deploy Ghost your way

Every format below deploys the same pinned images. Pick the one that fits how you work.

Deploy Ghost from the CLI

levelrail-cli templates deploy ghost --name my-ghost

Deploy Ghost with the API

Create a token in the dashboard first. This one-click route deploys it as a trial app you can keep or remove.

curl -X POST -H "Authorization: Bearer $TOKEN" \
  https://levelrail.example.com/api/v1/service-templates/ghost/deploy

Ghost configuration

Ghost services

ServiceImagePortsVolumes
db mysql:8.4 none ghost_db_data -> /var/lib/mysql
ghost ghost:5 2368 ghost_data -> /var/lib/ghost/content

Ghost environment variables

VariableServiceValue
MYSQL_DATABASE db Preset by the template
MYSQL_PASSWORD db Generated at deploy
MYSQL_ROOT_PASSWORD db Generated at deploy
MYSQL_USER db Preset by the template
database__client ghost Preset by the template
database__connection__database ghost Preset by the template
database__connection__host ghost Preset by the template
database__connection__password ghost Generated at deploy
Show all 10 variables
  • database__connection__userghostPreset by the template
  • urlghostPreset by the template

Ports and volumes

Ports
2368
Volumes
2 named mounts: ghost_db_data -> /var/lib/mysql, ghost_data -> /var/lib/ghost/content

Ghost FAQ

How much memory does Ghost need?

The catalog lists about 512 MiB of memory for Ghost across its 2 services.

Does Ghost run on arm64?

For Ghost, arm64 is tested; amd64 is image published.

What licence is Ghost under?

Ghost is licensed under MIT, which is permissive, with few conditions on reuse.

Does Ghost need configuration before it starts?

No. The template fills in its own defaults and generates secrets at deploy time.

Which database does Ghost bundle?

The template includes MySQL, running as its own service.

Which ports does Ghost use?

Ghost listens on port 2368 inside the stack.

Where does Ghost keep its data?

In named volumes: ghost_db_data mounted at /var/lib/mysql and ghost_data mounted at /var/lib/ghost/content.

Can I deploy Ghost on Dokploy or Dokku?

The services and pinned images on this page can be run on any Docker host. The public Dokploy templates list has an entry with the id ghost for this app, so check that entry as well. Dokku deploys container images with its own commands, so the pinned image mysql:8.4, ghost:5 is what you deploy there.

levelrail-cli templates deploy ghost --name my-ghost