Free tools Windows power users keep installed
One-click scans. No signup required.
iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more
Need a server to try this on? Antihost offers Linux VPS plans with NVMe storage, full root access and a 14-day free trial.
The supported way to self-host Ghost in production is to use Ghost-CLI on a VPS running 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 provisions the database, reverse proxy, HTTPS, service account and systemd service, after which you keep site-specific settings in config.production.json and install your theme through Ghost Admin.
What self-hosting Ghost involves
Self-hosting means your publication runs on infrastructure you control instead of on a managed Ghost(Pro) account. You are responsible for the virtual server, operating-system updates, DNS, backups, database availability, mail delivery and Ghost upgrades. In return, you can control the filesystem, configuration, reverse proxy and deployment process.
Do these 3 things before closing this tab:
1Clear out junk files and repair common Windows errors2Fix the driver behind crashes, sound loss and screen glitches3Repair Windows errors before they cause bigger problemsGhost can run on other operating systems, databases or hosting patterns, but Ghost describes the alternatives to its standard stack as not officially supported or widely adopted. For the least operational risk, use the stack below.
| Component | Recommended production choice | Why it matters |
|---|---|---|
| Operating system | Ubuntu 24 | Ghost’s current recommended server platform. |
| Runtime | Node.js 22 LTS | Provides the supported JavaScript runtime for Ghost. |
| Database | MySQL 8.0 | Stores posts, members, settings and other application data. |
| Web server | NGINX | Terminates HTTPS and reverse-proxies requests to Ghost. |
| Process manager | systemd | Keeps Ghost running and starts it after a reboot. |
| Memory | At least 1 GB | The minimum stated requirement; more headroom helps during upgrades, imports and traffic spikes. |
| Linux account | Non-root user | Limits the damage a compromised application or command can cause. |
Self-hosting versus managed hosting
A managed Ghost plan removes server maintenance, database administration, TLS configuration and much of the upgrade work. Self-hosting is the better fit when you need server-level access, custom environment variables, your own deployment pipeline or control over where persistent files live. The trade-off is that every operating-system, database, backup and incident task becomes yours.
#1 Best Overall
| Decision factor | Self-hosted Ghost | Managed Ghost hosting |
|---|---|---|
| Support status | Ghost-CLI and the recommended stack are the supported path; other architectures may not be officially supported. | Provider operates the supported service for you. |
| Operational workload | You maintain the VPS, DNS, backups, mail settings, security and upgrades. | Most infrastructure maintenance is handled by the provider. |
| Database responsibility | You own MySQL availability, credentials, hardening and recovery. | Database operations are part of the managed service. |
| Reverse proxy and SSL | Ghost-CLI can configure NGINX and SSL during installation; you still need to keep DNS and certificates healthy. | Handled as part of the hosted platform. |
| Theme and filesystem control | Full access to the persistent content area and server configuration. | Customization is bounded by the service’s controls. |
| Upgrade process | You schedule and verify Ghost, OS, Node.js and MySQL updates. | Provider controls the platform upgrade schedule. |
Prepare the VPS before installing Ghost
Complete these checks before running the installer:
- Point a registered domain, or the intended DNS records, at the VPS address. Decide whether the public site and administration area will use separate hostnames.
- Create a normal sudo-capable Linux account. Do not plan to operate Ghost as root.
- Choose a server with at least 1 GB of RAM. Leave additional capacity if you expect image-heavy publishing, membership activity, imports or development tools on the same machine.
- Use Ubuntu 24 and plan for Node.js 22 LTS, MySQL 8.0, NGINX and systemd.
- Have a mail service and its SMTP credentials ready. Production email is needed for member sign-in, invitations, password resets and other notifications.
- Decide where backups will be stored outside the VPS. A backup on the same disk does not protect against disk loss or a destroyed server.
DNS and hostname planning
Use the final public hostname when Ghost is installed. Ghost builds links and canonical URLs from its configured URL, so changing domains later requires a deliberate configuration change and a restart. If you use a separate administration hostname, create the corresponding DNS record before enabling HTTPS and document which address is for readers and which is for administrators.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Install Ghost with Ghost-CLI
Ghost’s documentation describes ghost install as its “one-stop-shop to get a running production install of Ghost.” The CLI is preferable to manually assembling every service because it knows the standard directory layout and can configure the database, NGINX, SSL, migration, Linux user and systemd stages together.
- Sign in as the non-root account. Use your normal SSH account and elevate only for commands that explicitly require administrative privileges.
- Install the Ghost-CLI package globally with npm. A standard installation command is
sudo npm install ghost-cli@latest -g. Run it from the non-root account so the CLI’s site files are owned by the intended user. - Create and enter the site directory. Choose a dedicated directory for the publication, then change into it before starting the installer. Do not place the installation inside a directory that you intend to replace during routine server maintenance.
- Run the production installer. Execute
ghost install. Answer the prompts for the site URL, MySQL setup, NGINX, SSL and the Linux service account. Use the final HTTPS URL when prompted if the certificate is being configured during installation. - Allow the setup stages to complete. Ghost-CLI can create a restricted MySQL user, configure NGINX as a reverse proxy, request SSL, run database migrations, create a low-privilege Linux user and register a systemd service.
- Verify the result. Open the public URL over HTTPS, sign in to the Ghost Admin URL, create a test post and send a test email before importing real content.
Do not run routine Ghost commands as root. Ghost-CLI manages permissions for the standard layout and creates a low-privilege ghost user. Running ad-hoc copy, extraction or theme commands as root can leave files owned by the wrong account and cause confusing permission failures later.
Rank #2
What the installer does not remove from your responsibility
- DNS records must resolve to the correct VPS address.
- Mail credentials must be valid and kept secret.
- Backups must be tested; installation does not create a recovery strategy for you.
- OS, database, Node.js and Ghost updates still need a schedule.
- Any firewall, provider account security and SSH hardening remain your responsibility.
Understand the Ghost installation layout
Ghost-CLI uses a predictable structure. Keeping persistent content separate from versioned Ghost files is important because upgrades replace core versions while your themes, images and other site data must remain.
| Path or directory | Purpose | What to do with it |
|---|---|---|
.config.[env].json |
Environment-specific configuration files used by Ghost-CLI. | Protect permissions and keep secrets out of public repositories. |
content |
Persistent site data, including themes, images and other uploaded content. | Back up this directory and preserve it across upgrades. |
current |
The version currently selected to run. | Do not edit files here as a customization method. |
system |
Service-related installation data. | Let Ghost-CLI manage it. |
versions |
Installed Ghost core versions used by the upgrade process. | Do not store custom themes or hand-edited core files here. |
Keep custom themes and uploaded assets under content. Editing files in a versioned Ghost core directory is temporary: the next upgrade can overwrite the change and make it difficult to reproduce.
Configure production settings in config.production.json
For a self-hosted installation, a custom configuration file overrides Ghost’s defaults. Production settings belong in config.production.json at the installation root, alongside the Ghost installation rather than inside a versioned core directory.
Required production areas
The production configuration must contain valid JSON and define three areas:
url: the complete public URL, includinghttps://when SSL is enabled.database: the MySQL client and connection details for the Ghost database.mail: the SMTP transport and authentication details Ghost uses to send messages.
A structural example looks like this:
{
"url": "https://blog.example.com",
"database": {
"client": "mysql",
"connection": {
"host": "127.0.0.1",
"user": "ghost_site",
"password": "use-a-long-random-secret",
"database": "ghost_production"
}
},
"mail": {
"transport": "SMTP",
"options": {
"host": "smtp.example.net",
"port": 587,
"auth": {
"user": "mail-user",
"pass": "use-a-mail-secret"
}
}
}
}
Replace the example hostnames, usernames, database name and secrets with the values created for your installation. Do not add comments: comments make JSON invalid. Keep the file readable by the Ghost service account and out of source-control repositories that other people can access.
Change settings safely
- Back up the existing configuration file and record which value you are changing.
- Edit only valid JSON. Check commas, quotation marks, braces and the data type of each value.
- Confirm that the URL exactly matches the hostname readers use. A mismatch can produce incorrect canonical links, redirects or admin behavior.
- Save the file with permissions that allow Ghost to read it but do not expose secrets to unrelated users.
- From the installation directory, run
ghost restart. - Open the site and Admin area, load a post, and send a test email. If the service fails, restore the previous file and restart again.
Environment variables as an alternative
Ghost also accepts environment variables whose names match its configuration keys. This is useful for containerized deployments and for keeping passwords out of a checked-in JSON file. Whichever method you choose, ensure the process receives the same url, database and mail values and restart Ghost after a change. Do not mix multiple sources casually; document which source is authoritative so a later deployment does not silently replace a working value.
Enable HTTPS and harden the installation
HTTPS protects login credentials and other private traffic between browsers and the publication. Ghost recommends HTTPS for both the public publication and the administration area because credentials otherwise travel in plaintext.
Use the installer’s SSL stage
During ghost install, allow Ghost-CLI to configure NGINX and SSL after DNS points to the VPS. Confirm that the browser shows the expected certificate and that both the home page and /ghost/ administration path load over HTTPS. If you later change hostnames, update DNS and certificate configuration before changing the production URL.
Rank #4
Consider a separate admin domain
Ghost’s hosting guidance recommends a separate administration domain as an additional defense. It does not replace strong passwords, account protection or HTTPS, but it reduces the chance that the admin endpoint is exposed at the same obvious hostname as the publication. Plan the DNS record and certificate for that hostname before asking the installer to configure it.
Harden MySQL and permissions
- Run
mysql_secure_installationafter setup, following the prompts to remove unsafe defaults and tighten the database installation. - Use the restricted database account created for Ghost rather than a MySQL administrator account in the production configuration.
- Keep the Linux service account low privilege and avoid shell work as root.
- Use Ghost Admin for theme and image uploads. Uploading and extracting files manually can change ownership or permissions and prevent Ghost from reading them.
- Store configuration and backup credentials separately from publicly accessible content.
Install and activate your own Ghost theme
Theme installation is separate from Ghost core installation. A theme is a deployable set of templates, styles, scripts and assets; it does not belong in the versioned Ghost core directories.
Upload a finished theme through Ghost Admin
- Prepare the theme as a
.zipfile. The archive should contain the theme files at its root rather than an extra directory layer. - Sign in to Ghost Admin.
- Open Settings → Site → Theme.
- Choose Upload theme and select the ZIP file.
- Use the preview option to inspect the theme before making it live.
- Activate it only after checking the home page, post pages, navigation, membership forms and responsive layouts.
Ghost Admin is the safest routine path because Ghost can maintain the expected ownership and permissions. Keep the original ZIP and a dated copy of the previous active theme so you can roll back quickly.
Develop a custom theme locally
For substantial changes, work locally instead of editing production files. A practical workflow is:
Best Value
- Start from Ghost’s official Starter theme or another theme whose license permits your intended use.
- Run a local Ghost instance for development and use representative posts, images, navigation items and membership forms.
- Modify templates, styles and client-side assets locally.
- Build the production assets required by the theme’s tooling before packaging it.
- Zip the finished theme with the correct top-level structure.
- Upload the ZIP to the live site through Settings → Site → Theme.
- Preview the uploaded version, test key templates and activate it only when the checks pass.
Theme release checklist
- Back up the current theme and content before uploading a replacement.
- Check the home page, tag and author pages, post pages and any custom routes.
- Test primary and secondary navigation, search or member links used by your design, and all forms.
- Inspect the layout at narrow and wide viewport sizes.
- Verify images, fonts, scripts and external assets load over HTTPS.
- Open a draft and a published post to catch template errors that a static home page will not reveal.
- Record the theme version and activation date so a later rollback is unambiguous.
Backups, upgrades and routine maintenance
Self-hosting is dependable only when recovery is planned. Back up both the database and the persistent content directory, including themes and images, to storage outside the VPS. A configuration backup is also useful, but it contains secrets and must be protected separately.
Crashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minutePC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11Before a Ghost upgrade
- Confirm that a recent database backup can be read and that the content backup includes the active theme and images.
- Record the current Ghost, Node.js, MySQL and Ubuntu versions.
- Check the theme against the target Ghost version in a staging or local instance when possible.
- Schedule a maintenance window and notify collaborators if the publication will be briefly unavailable.
- Run the Ghost-CLI upgrade using the documented process for your installation, then watch the migration and service output.
- Open the home page, a post, the Admin area and a member form. Send a test message if mail configuration was touched.
Do not “upgrade” by replacing the whole installation directory and deleting content. Ghost’s layout is designed to keep persistent content separate from versioned core releases.
After operating-system or runtime changes
Ubuntu, Node.js and MySQL updates can affect a working publication even when Ghost itself is unchanged. Apply one class of change at a time, keep a recovery path, and verify that systemd starts Ghost after a reboot. If a change requires a configuration edit, validate the JSON and run ghost restart rather than repeatedly killing processes by hand.
Troubleshoot common self-hosting failures
| Symptom | Likely cause | Recovery path |
|---|---|---|
| The installer cannot obtain a certificate. | DNS does not resolve to the VPS, the hostname is wrong, or port access is blocked. | Verify the A/AAAA records and hostname, wait for DNS changes to propagate, then rerun the SSL step after the site is reachable. |
| The site loads but redirects to the wrong hostname. | The url value does not match the public HTTPS address. |
Correct url in config.production.json, validate the JSON and run ghost restart. |
| Ghost will not start after editing configuration. | Invalid JSON, a missing required area or a typo in a database or mail value. | Restore the last known-good file, validate punctuation and data types, then restart. Add changes one at a time. |
| Admin works but member email does not arrive. | SMTP host, port or credentials are wrong, or the mail service rejects the connection. | Check the mail object, test the credentials with the mail provider and inspect service logs without exposing the password. |
| A newly uploaded theme is not visible or cannot be activated. | The ZIP structure is wrong, the theme is invalid or files have incorrect ownership. | Rebuild the ZIP with theme files at its root, upload through Ghost Admin and avoid root-owned manual copies. |
| An upgrade removed a customization. | The change was made inside a versioned Ghost core directory. | Move the customization into a supported theme or configuration file, then redeploy it after testing. |
| Images or themes fail after a manual copy. | Ownership or permissions no longer match the Ghost service account. | Use Ghost Admin for uploads where possible and restore the standard Ghost-CLI ownership and permission model. |
| The publication is unavailable after a reboot. | The systemd service is disabled, failed, or depends on a broken runtime or database. | Check the Ghost service status and logs, confirm MySQL and Node.js are available, then restart through Ghost-CLI rather than launching a second unmanaged process. |
A practical launch sequence
Use this order when taking a new self-hosted publication live:
- Provision Ubuntu 24 with at least 1 GB RAM, a non-root user and a registered domain.
- Install Node.js 22 LTS, MySQL 8.0, NGINX and Ghost-CLI according to the supported stack.
- Run
ghost installfrom the intended site directory and let it configure the database, reverse proxy, SSL, migration, service account and systemd. - Confirm the HTTPS URL and Admin access before importing content.
- Run
mysql_secure_installation, verify the restricted database account and document where backups will be stored. - Create or edit
config.production.jsonfor the final URL, database and mail settings; restart Ghost after every configuration change. - Upload the custom theme through Ghost Admin, preview it and test every important template before activation.
- Capture an initial database, content and configuration backup, then write down the restore steps.
Bottom line
For a maintainable self-hosted Ghost publication, use Ghost-CLI on the recommended Ubuntu 24, Node.js 22 LTS, MySQL 8.0, NGINX and systemd stack. Keep production settings in a valid, protected config.production.json (or deliberately managed environment variables), preserve the content directory, enforce HTTPS and database hardening, and treat every theme upload or upgrade as a reversible deployment. That combination gives you server-level control without sacrificing Ghost’s supported installation and upgrade path.
Quick wins for a faster PC:
Repair Windows errors before they cause bigger problemsFix Now →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Clear out junk files and repair common Windows errorsFree Scan →Quick Recap
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.

