Ghost Blog Deployment Guide on DigitalOcean 2026
Ghost เป็นแพลตฟอร์มเขียนบล็อกและจดหมายข่าวที่เบากว่า WordPress และมีระบบสมาชิก/สมัครสมาชิกแบบชำระเงินในตัว
Ghost is a lightweight blogging and newsletter platform with built-in paid membership and subscription systems—ideal for developers and writers who want speed and direct server control. DigitalOcean offers a Marketplace 1-Click App that installs Ghost with Nginx, MySQL, and SSL pre-configured. This guide walks through everything from choosing the right Droplet specs, setting up your domain and email, to backing up and troubleshooting common issues.
Contents
What is Ghost and How Does It Differ from WordPress?
Ghost is an open-source blogging and newsletter platform written in Node.js and backed by MySQL. Unlike WordPress (which is PHP + MySQL with a plugin-centric architecture), Ghost is built from the ground up as a "digital publishing platform." It ships with membership and paid subscription features tied to Stripe without needing third-party plugins like MemberPress or WooCommerce Subscriptions. Ghost's admin panel is a single-page app that loads fast, features a block-based editor with code injection capability, and renders the front-end through pre-compiled Handlebars themes—naturally faster than systems burdened with many plugins. On the server level, Ghost runs a Node.js process via a process manager (Ghost-CLI uses systemd automatically) alongside Nginx as a reverse proxy and MySQL as the database. Check the installed version with ghost --version and Node.js with node -v before starting any work, as Ghost enforces strict Node version compatibility. When choosing between the two on DigitalOcean, consider your content focus: if you're primarily building a blog, newsletter, or media site with paid memberships, Ghost's built-in features get you running faster and require less maintenance. But if you need a full ecommerce store, complex page builder, or many specialized plugins, WordPress's larger plugin ecosystem remains more practical. Both run on DigitalOcean Droplets equally well—the difference is the underlying stack and long-term maintenance approach.
- Ghost = Node.js + MySQL, WordPress = PHP + MySQL
- Ghost includes membership and paid subscriptions tied to Stripe natively—no add-on plugins needed
- Admin panel is a single-page app with fast load times; themes pre-compile with Handlebars
Deploying via the Marketplace 1-Click App
One thing that surprised us: the fastest and safest way to install Ghost on DigitalOcean is via the Marketplace 1-Click App, which pre-provisions Nginx, MySQL, Node.js, and Ghost-CLI on boot—no manual compilation needed. Start by logging into your DigitalOcean Control Panel, click Create > Droplets, then select the Marketplace tab and search for "Ghost." Choose the official image. Next, select your Droplet specs: for a starter blog or personal site with modest traffic, the Basic plan with 1 GiB RAM / 1 vCPU / 25 GB SSD at $6/month is sufficient, as Ghost's official guidance recommends at least 1 GB of RAM. If you expect higher readership or members, step up to 2 GiB RAM / 2 vCPU / 60 GB SSD at $18/month to handle build processes and growing media libraries. Choose a region closest to your readers; for Thailand-based audiences, sgp1 (Singapore) offers the lowest latency, with blr1 (Bangalore) as a close second. Next, add an SSH key instead of a plain password for better security, then click Create Droplet. Once the Droplet boots, SSH in with ssh root@your_droplet_ip. The system will run a setup wizard automatically on first login, or you can manually trigger it by visiting your Droplet's IP directly in a browser. Verify Ghost installed successfully and the service is running with ghost ls, which displays the instance name, status, URL, and version. Alternatively, check the systemd service directly with systemctl status ghost_yourdomain-com. The Marketplace image incurs no extra charge beyond the standard Droplet price, and billing is per-second with a minimum 60-second charge per session.
- Marketplace images carry no extra fee—pay only the standard Droplet price
- Starter recommendation: Basic 1 GiB RAM / 1 vCPU / 25 GB SSD at $6/month
- Scale up to 2 GiB RAM / 2 vCPU / 60 GB SSD at $18/month as traffic grows
- For Thailand-based readers: choose sgp1 (Singapore) or blr1 (Bangalore) region
- Verify status with
ghost lsandsystemctl status
Setting Up a Domain and Email
Once your Droplet is ready, point your domain to the Droplet's IP by creating a DNS A record at your domain registrar or in DigitalOcean Networking—route your subdomain or root domain to the Droplet's IPv4 and wait for propagation. When DNS resolves correctly, run the setup wizard via browser at http://droplet-ip or use the server-side command ghost setup, which prompts for your full domain name, admin email, and admin password for the first account. To change the URL later (e.g., switching from http to https or changing domains), use ghost config url https://yourdomain.com followed by ghost restart every time to apply the new settings. The Marketplace Ghost image includes a script that automatically configures Let's Encrypt SSL via ghost setup ssl during wizard setup, giving you free HTTPS without manual certbot management. Email is a commonly overlooked part: Ghost requires an external SMTP service for transactional emails like member invitations, password resets, and paid subscription notifications. Ghost recommends Mailgun because it integrates seamlessly into the setup wizard, though any standard SMTP provider works. Configure it in the config.production.json file under the mail block or via environment variables. After email setup, test by sending a newsletter from Admin Settings > Email newsletter and check the logs with ghost log. If you see SMTP authentication errors, verify your domain's SPF/DKIM records, as misconfigured records can cause emails to land in spam or be rejected outright.
- Create a DNS A record pointing your domain to the Droplet IP before running setup
- Run
ghost setupto enter your domain, admin email, and password - Change the URL later with
ghost config urlfollowed byghost restart
Customizing Themes and Basic SEO
Ghost ships with the Casper theme, which is already optimized for speed and SEO fundamentals like JSON-LD structured data, Open Graph tags, and an auto-generated sitemap.xml at /sitemap.xml—no plugins needed like on WordPress. To use a custom theme, upload it via Admin > Settings > Design > Change theme > Upload theme as a .zip file matching Ghost's theme spec. Before uploading a custom theme, validate it with the official gscan linter tool by running gscan . in the theme directory to catch errors and warnings before deploying, preventing broken pages after upload. On the post level, Ghost's editor includes separate fields for meta title, meta description, and social preview image—letting you tweak your Google snippet without plugin dependencies. You set the canonical URL for the entire site via ghost config url during setup, which automatically applies to every page's canonical tag. For code injection like Google Search Console verification tags or tracking scripts, go to Admin > Settings > Code injection and paste into Site Header or Site Footer without editing the theme directly. After modifying any theme or config on the server, run ghost restart to load the changes into the Node process. Connect Google Search Console from day one so Ghost's auto-generated sitemap.xml gets crawled and indexed faster.
- Casper theme includes structured data, Open Graph, and auto-generated sitemap.xml
- Validate custom themes with
gscan .before uploading to production - Set meta title, description, and social image per-post directly in the editor
Backing Up Ghost Content
A point users often miss: ghost-CLI has a built-in backup command: ghost backup creates a zip file containing a JSON export of all content (posts, authors, tags, members, settings) in the instance directory—ideal for quick content-level backups but doesn't include all image and media files in content/images. For a complete backup covering the database and all media, dump MySQL separately with mysqldump -u root -p ghost_prod > ghost_backup.sql and archive the entire content directory with tar -czvf content_backup.tar.gz content/, which includes images, themes, data, and settings in one file. Set up a cron job to run both commands regularly (e.g., nightly) and copy backup files off the Droplet immediately, since storing them on the same disk defeats the purpose—if the Droplet fails, your backups fail with it. A practical option is to ship backups to DigitalOcean Spaces, an S3-compatible object storage service starting at $5/month with built-in CDN—perfect for offsite backup storage without managing a separate storage server. Another layer to add is Droplet Snapshots at $0.06/GiB/month, which back up the entire server (OS, config, all files) and act as a safety net before major updates or config changes. Schedule snapshots regularly (e.g., weekly) and test at least one restore to confirm your recovery process works when needed.
ghost backupsaves JSON content but doesn't include all media files- Full backup:
mysqldumpthe database +tar -czvfthe content directory - Store backups offsite on DigitalOcean Spaces ($5/month with CDN) instead of on the same disk
- Droplet Snapshots ($0.06/GiB/month) back up the entire server before major updates
When to Use This Feature (Real-World Use Cases)
Ghost on DigitalOcean works best when content is the core of your business, not ecommerce or complex marketing sites. Ideal use cases include independent writers or creators opening a paid newsletter through Stripe—Ghost's native membership system eliminates the need for external add-ons. Another fit is corporate blogs or SaaS documentation sites that prioritize speed and low maintenance over plugin flexibility, since Ghost avoids the creeping bloat that accumulates with heavy WordPress installations as sites grow. Media outlets or news organizations benefit from the built-in Content API for headless deployments, letting them feed content to separate front-end apps (JAMstack). Conversely, Ghost is a poor fit for complex ecommerce sites, community forums, or platforms requiring many specialized plugins—WordPress's larger plugin ecosystem still serves those cases better. Teams also matter: if your team can manage Node.js infrastructure themselves and wants direct server control, Ghost on Droplet offers more flexibility than managed hosting. But you're responsible for updates, security, and backups entirely. See the separate WordPress on Droplet guide for comparison details.
- Ideal: newsletters/blogs with Stripe-based paid membership as the core model
- Ideal: corporate blogs/SaaS docs prioritizing speed and low maintenance
- Ideal: media outlets using the Content API for headless deployments
- Poor fit: complex ecommerce, forums, or sites requiring many specialized plugins
Common Errors and Solutions
Worth highlighting here — the most common problem is choosing a Droplet with insufficient RAM. Ghost requires around 1 GB minimum per official guidance; using less causes install or update hangs. Fix by resizing the Droplet up or temporarily adding a swap file to support high-memory operations during updates like ghost update. Another frequent issue: SSL renewal fails because a Cloud Firewall or ufw blocks ports 80/443, preventing Let's Encrypt validation. Check with ufw status and open required ports before renewing. A third mistake: forgetting to run ghost config url after changing domains or switching to https, which breaks CSS, JS, and image links. Solution: run the config command with the correct URL, then ghost restart every time. Member signup and notification emails also commonly fail silently—usually from incomplete SMTP setup—leaving no obvious error on the web page. Check logs with ghost log to see the actual mail transport error. Finally, the easiest mistake to prevent but most damaging: running ghost update without a backup first. If a new version conflicts with your theme or config, recovery is much harder without a recent backup. Use ghost doctor to check system health before every update.
- RAM below 1 GB causes install/update hangs—resize the Droplet or add swap temporarily
- SSL renewal fails if firewall blocks ports 80/443—check with
ufw status - Forgetting
ghost config urlafter domain changes breaks asset links - Member signup or notification emails fail silently from incomplete SMTP setup—check
ghost log
Best Practices
First practice: update Ghost consistently but carefully. Before every ghost update, run ghost backup so you have a clear rollback point if the new version breaks compatibility with your theme or config. For server security, open ufw to allow only essential ports: 22 (SSH), 80, and 443. Disable password authentication and use SSH keys exclusively, then enable DigitalOcean Cloud Firewall as an additional network-level defense at no extra cost. For data continuity, set Droplet Snapshots on a regular schedule alongside offsite content backups to Spaces (see the backup section above), giving you recovery options at both the server and data levels. For monitoring, enable free DigitalOcean Monitoring with one free Uptime Check per account—sufficient to track basic Ghost availability. Enable automated Droplet Snapshots on a consistent schedule together with offsite content backups to Spaces. For theme work, run gscan . every time before deploying a custom theme to production to catch errors early. When traffic starts straining your current Droplet, resize incrementally rather than waiting for slowness to hurt readers—see the separate Droplets review guide for comparing tier specs. Finally, keep critical config like mail settings and custom themes in version control separately so you can redeploy or migrate Droplets quickly without reconfiguring everything from scratch.
- Always run
ghost backupbeforeghost updatewith no exceptions - Open ufw to ports 22/80/443 only + disable password auth + enable DigitalOcean Cloud Firewall (free)
- Set automated Droplet Snapshots alongside offsite content backups to Spaces
- Enable free DigitalOcean Monitoring with Uptime Check to track basic site availability
- Run
gscan .before every custom theme deploy, and resize Droplets proactively before traffic maxes out
Frequently Asked Questions
ghost backup first so you have a rollback point if the new version conflicts with your theme or config.ghost backup and mysqldump.