Deploy Ghost Blog
Before using the one-click template, here is a minimal Docker Compose file for self-hosting Ghost.
If you're new to Docker Compose, check out our guide on how to self-host a Docker Compose app. You can also browse more examples in our Docker Compose library.
Self-host Ghost with Docker Compose (minimal)
services:
ghost:
image: ghost:latest
ports:
- "2368:2368"
environment:
database__client: mysql
database__connection__host: db
database__connection__user: ghost
database__connection__password: ghostpass
database__connection__database: ghost
url: http://localhost:2368
volumes:
- ghost-content:/var/lib/ghost/content
db:
image: mysql:8
environment:
MYSQL_ROOT_PASSWORD: rootpass
MYSQL_DATABASE: ghost
MYSQL_USER: ghost
MYSQL_PASSWORD: ghostpass
volumes:
- dbdata:/var/lib/mysql
volumes:
ghost-content:
dbdata:
Deploy Ghost Blog on Hostim.dev (One-Click)
Ghost is a modern blogging platform with a built-in editor, membership features, and newsletter tools. With Hostim.dev, you can deploy Ghost in one click – fully preconfigured with MySQL, volumes, and HTTPS.
✍️ Write, publish, and manage your own blog – no infrastructure setup needed.
Guest project runs for 1 hour. Log in to save and extend to 5 days.
Why Host Ghost on Hostim.dev?
- One-click Docker deployment
- Built-in MySQL
- Persistent storage
- Automatic HTTPS
- Real-time logs & metrics
What's included
| Resource | Details |
|---|---|
| App | ghost image |
| Database | MySQL (auto-provisioned) |
| Volume | /var/lib/ghost/content |
| Domain | Free *.hostim.dev subdomain |
| SSL | Let’s Encrypt (auto-enabled) |
| Port | 2368 |
How to Deploy
- Go to your Hostim.dev dashboard.
- Click Create Project → Use a Template.
- Select Ghost Blog.
- Choose a resource plan.
- Deploy.
FAQ
Where does Ghost store posts, images, and themes?
All content is stored in /var/lib/ghost/content, backed by a persistent
volume.
Does Ghost require MySQL?
Yes. The official Docker image only supports MySQL/MariaDB in production.
How do I set the site URL?
Set the url environment variable to your final public domain, including
https://.
How do I back up a Ghost site?
Export posts via the Admin UI and back up both the MySQL database and the
content
volume.
Why can't I log into /ghost?
Make sure the URL matches your configured url environment variable.
Can I upload custom themes?
Yes. Upload themes directly in the Admin panel under Design → Themes.
Does Ghost support newsletters?
Yes, Ghost includes members, newsletters, and paid subscriptions out of the box.
How do I update Ghost?
Docker: docker compose pull && docker compose up -d
Hostim.dev: redeploy the app.
Alternatives
- WordPress — classic blogging with plugins
- Hugo — static site generator
- WriteFreely — minimalist blogging platform
Source + Docs
- GitHub: https://github.com/TryGhost/Ghost
- Website: https://ghost.org
Looking for something else? Browse all templates →