October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsClean PCRecommendedOne scan can reveal what keeps slowing WindowsLook for cleanup and repair opportunities.Run ScanOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
World desk13 min

How to Self-Host Ghost with Your Own Configuration and Theme

Set up Ghost on your own VPS with Ghost-CLI, configure production settings correctly, harden HTTPS and MySQL, and deploy a custom theme without losing it during upgrades.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The supported way to self-host Ghost is to run Ghost-CLI on a VPS using Ubuntu 24, Node.js 22 LTS, MySQL 8.0, NGINX and systemd. Start with at least 1 GB of memory, a registered domain and a non-root Linux user. Ghost-CLI can configure the database, reverse proxy, HTTPS certificate, permissions and service for you; you then maintain the server, edit config.production.json when needed and upload your theme through Ghost Admin.

This guide covers the complete path from an empty VPS to a working publication, explains exactly where production configuration lives, and shows how to develop and deploy a custom theme without losing it during Ghost upgrades.

As an Amazon Associate I earn from qualifying purchases.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

What self-hosting Ghost involves

Self-hosting means Ghost runs on infrastructure that you control instead of on Ghost’s managed hosting. You choose the VPS, operating-system user, database, domain and email transport, while also taking responsibility for updates, backups, monitoring, security and recovery.

Ghost’s current recommended production combination is Ubuntu 24, Node.js 22 LTS, MySQL 8.0, NGINX and systemd. Ghost can run in other environments, but those alternatives are not officially supported or widely adopted. For a small publication, 1 GB of memory is the stated minimum starting point; more memory gives you additional headroom for traffic, image processing, backups and other services.

#1 Best Overall
Muxiziu Halloween Ghost Figurine, Spooky & Cute Reading Ghost Statue for Bedroom, Desk, Party Decor, Book Lovers Gifts, Funny Light Up Ghost Halloween Decor Indoor (5 in)
  • Charming Design: Adorn your space with our charming resin ghost figurines, a perfect blend of whimsy and warmth. This cute ghost decor depicts a ghost holding a book and reading, emitting a soft glow. Crafted from high-quality resin materials, this cute ghost serves as an enchanting halloween decor item and a year-round home decor accent, ideal for book lovers and those who adore spooky home decor.
  • Soft Warm Glow: Create a cozy ambiance with the gentle illumination of our cute ghost statue. The warm light is easy on the eyes, making it perfect for use as a halloween bedroom decor, spooky home decor, or cute bookshelf decor. It provides just the right amount of light for nighttime reading or creating a calming atmosphere without being too bright or harsh.
  • Multifunctional designed: This mini ghost figurines is designed to be portable, so you can place it anywhere. Use it as halloween indoor decorations, desk decor, mantel decorations, or a centerpiece for your halloween party. Its compact size (5 inches) makes it great for bookshelf decor, spooky office decor, or halloween decorations indoor.
  • Perfect Gift for Halloween & Book Lovers: Searching for a thoughtful gift? This cute ghost figurine is an ideal present for halloween lovers, readers, collectors, and fans of funny home decor. It makes a memorable halloween gift, birthday gift, or holiday surprise that combines humor, function, and charm—sure to delight anyone who enjoys spooky gifts or book lover gifts.
  • Portable and Easy to Use: Enjoy hassle-free decorating with our portable halloween ghosts statue. Allowing instant placement on tables, shelves, or nightstands. Whether used for halloween 2026 decor, year-round indoor figurine, or party decorations, this ghost decor adds a playful yet elegant touch with zero setup required.
Component Purpose What you must maintain
Ubuntu 24 Server operating system Security updates, users and firewall policy
Node.js 22 LTS Runs Ghost Use the version supported by your Ghost release
MySQL 8.0 Stores posts, members, settings and metadata Database credentials, backups and upgrades
NGINX Receives web requests and proxies them to Ghost Configuration, logs and certificate renewal
systemd Starts and supervises the Ghost service Service health and restart behavior
Ghost-CLI Installs and manages Ghost Run administrative commands as the correct user

The standard Ghost directory layout separates versioned core files from persistent content. Ghost-CLI documents directories such as .config.[env].json, content, current, system and versions. Themes, images and other site data belong in content; the versioned Ghost code should be replaced through Ghost-CLI rather than edited in place.

Self-hosting or managed hosting?

Both approaches can run the same publishing software. The practical difference is who operates the server and who responds when something breaks.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Decision area Self-hosted Ghost Managed Ghost hosting
Support status Uses the supported Ghost-CLI production stack when deployed as documented. The provider operates the supported hosting environment.
Operational workload You handle operating-system patches, monitoring, backups, database care and incident recovery. The provider handles server operations and routine platform maintenance.
Upgrade process You schedule and run Ghost-CLI upgrades, then verify themes, integrations and email. Platform upgrades are generally managed for you, subject to the provider’s process.
Database responsibility You own MySQL credentials, backups, restoration tests and capacity planning. The service operator manages the database layer.
Reverse proxy and SSL Ghost-CLI can configure NGINX and SSL during installation; you still monitor renewals and changes. Proxying and certificates are part of the managed service.
Server-level customization Full control over the VPS, operating-system user, network and supporting services. Customization is limited to the controls exposed by the hosting service.
Theme customization Upload your own ZIP or develop locally and deploy it yourself. Theme upload and editing depend on the managed product’s controls.

Choose self-hosting when server-level control, custom infrastructure or predictable operating costs matter more than having someone else perform maintenance. Choose managed hosting when you do not want to administer Linux, MySQL, NGINX and backups. Self-hosting is not a way to avoid maintenance; it moves that work to you.

Prepare the VPS before installing Ghost

Complete these prerequisites before running the installer:

  • Provision a VPS running Ubuntu 24 with at least 1 GB of memory.
  • Register the publication’s domain and point it to the VPS according to your DNS provider’s instructions.
  • Create a normal, non-root Linux user with permission to administer the server through sudo.
  • Confirm that the server can reach package repositories and the domain will resolve to it.
  • Decide which email service will deliver password resets, member messages and other transactional mail.
  • Have a backup destination ready for the database and the entire content directory.

Do not plan to operate the site by logging in as root. Ghost-CLI creates and manages a low-privilege ghost user for the standard installation layout, and routine Ghost commands should be run as that user or the installation owner. Running commands as root can create permission mismatches that later prevent Ghost from reading themes or writing uploads.

Install Ghost with Ghost-CLI

Ghost describes ghost install as its one-stop command for getting a running production installation. The command asks questions about the site and can perform the major setup stages for you.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  1. Connect as the non-root user

    Open an SSH session with the account you created for administration. Use sudo only for operating-system tasks that require it; do not run the Ghost application commands as root.

  2. Install Ghost-CLI globally

    Install the CLI through npm. A typical global installation command is npm install ghost-cli@latest -g. The exact package-manager setup depends on how Node.js 22 LTS was installed, but the result must be a working ghost command for the installation user.

  3. Create and enter the site directory

    Choose a directory dedicated to the publication, create it with the correct owner and change into it. This directory becomes the installation root that contains Ghost’s configuration and its links to the persistent content and version directories.

  4. Run the installer

    From the intended directory, run ghost install. Answer the prompts with the publication URL, database details and administrator information. Use the complete public URL, including https:// when SSL is enabled.

    What’s actually slowing this PC down?

    Pick the symptom - the matching free tool is one click away.

    Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  5. Allow the setup stages to complete

    Ghost-CLI can create a restricted MySQL user, configure NGINX as a reverse proxy, obtain and configure SSL, run database migrations, create the low-privilege Linux user and register a systemd service. Let each stage finish instead of interrupting the process halfway through.

  6. Verify the result

    Open the public URL in a browser and confirm that HTTPS works before adding content. Open the admin area, sign in, publish a test post and check that an image upload succeeds. These checks catch DNS, certificate, permission and database problems while the installation is still new.

If the installer stops with a missing dependency or permission error, read the exact message, correct the prerequisite as the same non-root administrator and rerun the relevant Ghost-CLI command. Avoid deleting the installation directory to solve a problem; that can remove the persistent content data that contains themes and images.

Where Ghost keeps production configuration

For a self-hosted installation, production settings belong in config.production.json at the installation root. Ghost’s configuration documentation states that a custom configuration file can override Ghost’s default behavior. The file must be valid JSON: property names and string values use double quotes, commas separate properties, and comments are not allowed.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The three required production areas are url, database and mail. An illustrative structure looks like this:

{"url":"https://blog.example.org","database":{"client":"mysql","connection":{"host":"127.0.0.1","user":"ghost_app","password":"Example-only-secret-9f4d","database":"ghost_production"}},"mail":{"transport":"SMTP","options":{"host":"smtp.example.org","port":587,"secure":false,"auth":{"user":"mailer","pass":"Example-only-mail-secret-7c2a"}}}}

The values above demonstrate the shape, not credentials to reuse. Set a real public URL, the MySQL connection supplied for this Ghost installation and the SMTP credentials issued by your mail provider. Keep the file readable only by the account that needs it, and never commit production secrets to a public repository.

Key What it controls Important detail
url The canonical address Ghost uses for links, redirects and administration. Use the complete URL and include https:// when SSL is active.
database The MySQL client and connection information. Use the restricted application user created for Ghost rather than a broad administrative account.
mail The SMTP transport and authentication used for transactional email. Without working mail settings, password resets and member-related messages can fail.

Apply a configuration change safely

  1. Back up the existing config.production.json before editing it.
  2. Edit only the values you intend to change.
  3. Validate that the file is syntactically valid JSON and contains all three production areas.
  4. Save the file with its original ownership and restrictive permissions.
  5. Run ghost restart from the installation directory.
  6. Check the public site, admin login, a page link and an email-triggering action.

Ghost also accepts environment variables whose names correspond to Ghost configuration keys. This approach is useful for containerized deployments and for keeping secrets outside a checked-in JSON file. Whichever method you choose, keep the effective values consistent: a correct file cannot compensate for a wrong environment variable that overrides it.

HTTPS, administrator access and database hardening

Use HTTPS for both the publication and the admin area. Without encryption, credentials can travel in plaintext between a browser and the server. Ghost-CLI can configure SSL as part of installation, but you should still verify the certificate, redirects and renewal behavior after setup and after major NGINX changes.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Ghost’s hosting guidance also recommends placing administration on a separate admin domain as an additional defense. This does not replace strong passwords, software updates or account protection; it reduces exposure of the sign-in surface when the public site and administrative interface use different hostnames.

After MySQL is installed, run mysql_secure_installation and follow its prompts to remove insecure defaults and tighten the database installation. Keep the Ghost database user restricted to the database it needs. Store database and SMTP secrets outside tickets, shell history and public source repositories.

  • Use a non-root account for Ghost operations.
  • Keep Ubuntu, Node.js, MySQL, NGINX and Ghost updated on a planned schedule.
  • Back up MySQL and content independently so a database mistake does not destroy uploaded media and themes.
  • Test restoration, not just backup creation.
  • Review NGINX and systemd logs when the site becomes unavailable.

Install a theme through Ghost Admin

Ghost Admin is the safest path for adding a theme because it preserves the permissions and directory layout managed by Ghost-CLI. Do not copy theme files into versioned Ghost core directories.

  1. Sign in to Ghost Admin.
  2. Open Settings → Site → Theme.
  3. For an official theme, choose it from the available theme options and install it.
  4. For a premium or custom theme, choose Upload theme and select the theme’s .zip file.
  5. Use the preview option to inspect the theme before activation.
  6. Activate it only after checking the home page, an individual post, navigation, membership forms and responsive layouts.

The ZIP must contain the theme package in the format Ghost expects. If Ghost rejects it, check that you uploaded the ZIP itself rather than a parent folder containing another ZIP, and confirm that the theme declares the required files for your Ghost version.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Develop a custom Ghost theme locally

Uploading a ZIP is enough for a finished theme, but substantial design work is easier on a local development setup. A common starting point is Ghost’s official Starter theme.

  1. Start from a known theme structure

    Obtain the Starter theme and create a separate working copy for your publication. Keep the source in version control so you can review changes and return to a known-good revision.

  2. Run a local Ghost instance

    Use a local Ghost installation to render the theme against realistic posts, tags, navigation and membership components. This separates template errors from production infrastructure problems.

  3. Customize templates and styles

    Modify the theme’s templates, styles and client-side assets rather than editing Ghost core. Keep site-specific changes in the theme repository so a Ghost upgrade cannot overwrite them.

    Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  4. Build production assets

    Run the theme’s documented build process before deployment. The production ZIP should contain the generated assets as well as the templates and configuration files Ghost needs at runtime.

    Rank #4
  5. Package and upload

    Create a ZIP of the theme package, open Settings → Site → Theme in the live publication, choose Upload theme, and upload the new archive.

  6. Preview and activate

    Preview the uploaded version first. Test the home page, post pages, tag or archive pages, navigation, member sign-up and sign-in forms, images, typography and narrow-screen layouts. Activate only when those checks pass.

Keep deployed themes under the persistent content area. Ghost-CLI’s versioned core directories are disposable during an upgrade; the content directory is the part that must survive. Ghost recommends using Ghost Admin for theme and image uploads to avoid accidental permission changes.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Theme updates without breaking the publication

Treat every theme update as a deployment, not as an untracked file replacement.

  • Export or otherwise back up the current theme and verify that the database and content backups are recent.
  • Upload the new ZIP as a separate version so the current theme remains available for comparison.
  • Preview representative pages, including a post with images, a long headline, an embedded item and a membership form.
  • Check desktop and mobile layouts, menu links, canonical URLs and browser-console errors.
  • Activate the new version during a period when you can watch the site.
  • If a template error appears, reactivate the previously working theme and inspect the new package locally.

Never “fix” a theme by editing files inside Ghost’s core version directories. Such changes disappear on upgrade and make later troubleshooting harder because the server no longer matches the deployed source.

Upgrading Ghost while preserving configuration and themes

Ghost-CLI keeps releases in versioned directories and uses a current installation link, which allows core upgrades without moving persistent content. Before an upgrade, back up MySQL, the content directory and the production configuration. Record the active theme and any integrations that depend on a particular Ghost version.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  1. Confirm that the server meets the supported stack requirements and has enough free disk space.
  2. Back up the database, configuration and content.
  3. Run the Ghost-CLI upgrade command from the installation directory according to the version you have chosen.
  4. Allow migrations and the systemd service restart to finish.
  5. Open the site and admin area, then test publishing, image uploads, member forms and email.
  6. Resolve theme compatibility issues by updating the theme source and redeploying it through Ghost Admin.

Do not replace or rename the content directory during an upgrade. It contains the themes, images and other persistent data that the new Ghost version must continue to use.

Troubleshooting common self-hosting failures

The installer says the user is root

End the root shell, reconnect with the non-root administrator and rerun the Ghost-CLI step. Correct ownership on the intended installation directory before trying again. Continuing as root can leave files that the managed Ghost user cannot read or write.

The site shows a proxy or connection error

Check that the Ghost systemd service is running, that NGINX is pointing to the Ghost process and that the configured url matches the hostname in the browser. Review the Ghost and NGINX logs, then run ghost restart after correcting configuration.

Ghost refuses to start after editing config.production.json

Look for a missing comma, an unescaped quote, a trailing comma or a misspelled key. Confirm that url, database and mail are present, restore the last known-good backup if necessary and run ghost restart.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

HTTPS works on the public site but not in Admin

Verify that the production URL uses https://, that NGINX has a certificate for the admin hostname and that redirects do not send the admin area back to HTTP. If you use a separate admin domain, check its DNS and certificate independently.

Images or themes fail to upload

Use Ghost Admin instead of copying files over SSH. If uploads still fail, inspect ownership and permissions in the persistent content directory, confirm available disk space and review the Ghost service log. Do not solve the problem by making the entire installation world-writable.

Password resets or member emails never arrive

Review the mail section, SMTP host, port, authentication and encryption settings. Confirm that the credentials are valid with the mail provider and that outbound SMTP traffic is allowed. Restart Ghost after changing the configuration, then trigger a new test message.

A custom theme looks correct locally but fails in production

Rebuild the production assets, verify the ZIP structure and preview the package in Ghost Admin. Compare the local Ghost version with the live version and look for missing generated files, unsupported template features or case-sensitive filename differences.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

A practical operating checklist

Use this checklist after launch and whenever you change the server:

  • The public URL redirects to HTTPS and the certificate is valid.
  • The admin area is reachable only through the intended hostname.
  • The Ghost service starts correctly after a reboot.
  • MySQL backups complete and a restoration test has succeeded.
  • The content directory is included in backups.
  • Ghost, Ubuntu, Node.js, MySQL and NGINX receive planned updates.
  • The active theme is stored in source control and a rollback ZIP is available.
  • A test post, image upload, navigation link and member form work after upgrades.
  • SMTP delivery works for password resets and other transactional messages.
  • No routine Ghost command requires a root shell.

Key decisions before you go live

Self-hosted Ghost gives you control over the operating system, database, reverse proxy, configuration and theme files. That control is valuable when you need custom infrastructure or want to choose exactly how the site is operated. It also means that a reliable publication requires more than a successful installer: secure HTTPS, a restricted database user, tested backups, working SMTP, upgrade discipline and a rollback plan.

The cleanest workflow is to let Ghost-CLI build the standard production foundation, keep environment-specific values in config.production.json or protected environment variables, store all themes and media under content, and use Ghost Admin for uploads and activation. Develop substantial theme changes locally, preview every deployment and never modify versioned Ghost core files.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Crashes, No Sound, or Screen Glitches?Free driver scan
Windows Errors? Fix Them Before They SpreadFree repair scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.