Halloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsPC HealthRecommendedCrashes, freezes, slowdowns? Check your PC nowSpot repairable issues before they interrupt work.Check PCHalloween DealsAmazon USOctober picks are moving - compare before checkoutAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
World desk12 min

How to Self-Host a Ghost Blog on a VPS

A practical, end-to-end guide to running Ghost on your own Ubuntu VPS, from DNS and MySQL preparation through Ghost-CLI, Nginx, SSL, verification, troubleshooting, and backups.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

To self-host Ghost, rent an Ubuntu VPS, point your domain to its IP address, create a non-root sudo user, install a Ghost-supported Node.js release, MySQL 8.0 or 8.4, and Nginx, then run Ghost-CLI inside a directory owned by that user. Ghost-CLI can configure the database connection, Nginx reverse proxy, systemd service, and Let’s Encrypt SSL certificate for you. The safest setup depends on matching the Node.js release to the Ghost version you install and completing DNS before requesting SSL.

how to self host ghost

Self-hosting means your Ghost installation runs on infrastructure you control instead of on Ghost’s managed hosting. The VPS supplies the CPU, memory, storage, public IP address, and operating system. You remain responsible for operating-system updates, database health, backups, DNS, and recovery.

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.

A normal production request travels through your domain’s DNS record to the VPS, reaches Nginx, and is then handed to the Ghost process running under systemd. Ghost stores content and settings in MySQL. Node.js is the runtime, while Ghost-CLI is the installation and administration layer that connects those pieces.

What Ghost-CLI does

  • Installs Ghost in a directory you specify.
  • Checks the installation and asks for the site URL and MySQL details.
  • Can write the Nginx configuration needed to proxy web traffic to Ghost.
  • Can request and renew a Let’s Encrypt certificate when DNS already resolves to the VPS.
  • Can create a systemd service so Ghost starts at boot and can be managed as a background service.

You can configure Nginx and systemd manually, but the CLI route is less error-prone for a first installation because the prompts collect the values Ghost needs and apply the related configuration together.

#1 Best Overall
Sale
TOZO A1 Wireless Earbuds Bluetooth 5.3 Light Weight in Ear Headphones | IPX5 Waterproof,2 Mics for AI Calls,Immersive Premium Sound Bass Headset with Charging Case,32 EQ via App Black
  • [Ultra-Lightweight Ear Buds Designed for Small Ears] Each earbud weighs only 3.7g and features a compact, ergonomic in-ear design made especially for small ears. Secure, low-profile, and comfortable for workouts, all-day wear or overnight sleeping.The ultra-slim profile sits flush in your ear with no hard edges poking or rubbing, so you can even sleep on your side without discomfort.
  • [Immersive Stereo Sound with TOZO OrigX Technology] TOZO OrigX tuning delivers clear vocals, balanced mids, and natural stereo sound for music, podcasts, and videos.
  • [Long Battery Life for Daily Use] Get up to 7 hours of playtime on a single charge, with up to 32 hours total using the charging case—ideal for workdays, commuting, and extended listening sessions.
  • [Bluetooth 5.3 & Stable Connection] Bluetooth 5.3 provides fast pairing, stable wireless performance, and reduced dropouts as you move around home or office.
  • [Deep Bass with Clear Vocals] High-performance drivers produce punchy bass while keeping vocals clean and detailed for everyday listening.

ghost on vps: requirements and sizing

Choose the operating system, memory, database, and runtime before creating the server. The official Ghost Ubuntu guide covers Ubuntu 22.04, 24.04, and 26.04. Ghost-CLI is intended to run on Ubuntu and should not be run as root.

Requirement Supported or recommended value Qualification
Operating system Ubuntu 22.04, 24.04, or 26.04 Release coverage stated in the official Ghost guide; verify the current list before provisioning.
Memory 1 GB minimum Ghost documentation’s floor, not a performance guarantee.
Memory for a more comfortable site 2 GB recommended Recommendation from DreamHost’s guide; workload, themes, traffic, and integrations change the result.
Memory when sending newsletters 4 GB suggested DreamHost guidance for newsletter workloads; this is not a measured benchmark.
Database MySQL 8.0 or 8.4 The supported production choice in the official documentation.
Web server Nginx 1.9.5 or later The version cited by Ghost for SSL-capable setups.
Service manager systemd Ghost-CLI can create the service definition when you accept that prompt.
Network identity A registered domain and a public VPS IP Required for a normal public installation and Let’s Encrypt validation.

Do not treat the 1 GB figure as an automatic promise that every theme, image-processing task, import, or newsletter send will be smooth. It is a minimum documented floor. A 2 GB VPS gives more room for the operating system, MySQL, Nginx, Ghost, and short-lived maintenance spikes; 4 GB is the safer tier if newsletter sending is part of the plan.

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

Node.js is a release-matching decision

Node.js support changes with Ghost releases. Current guides in circulation disagree: one recommends Node.js 22 LTS, while another describes Ghost 6 as supporting Node.js 22 or 24 LTS; older Ghost 5.x material refers to Node.js 18 and 20. Do not copy a version from an old tutorial. Check the official installation documentation for the exact Ghost release you intend to install, then install the supported LTS line before running Ghost-CLI.

Why MySQL matters

Use MySQL 8.0 or 8.4 for production. MariaDB and PostgreSQL are not the supported production path in the cited Ghost guidance. Selecting a different database can leave you outside the documented compatibility envelope and complicate upgrades or support.

install ghost on ubuntu: prepare the VPS

1. Create the server and record its IP address

Provision an Ubuntu VPS in a region close to your audience or operations team. Record the public IPv4 address (and IPv6 address if you will publish one). Keep the provider’s root credentials only for initial account setup; day-to-day Ghost commands should run as a separate sudo user.

2. Point DNS before installing SSL

At your DNS provider, create an A record for the hostname visitors will use, such as blog.example.com, pointing to the VPS IPv4 address. If you will serve the root domain, use the root-domain record required by that DNS provider. Add an AAAA record only when the VPS and your firewall are correctly configured for IPv6.

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

Wait until the hostname resolves to the new VPS before choosing SSL in the installer. Let’s Encrypt must reach the domain during validation; propagation commonly takes 5 to 30 minutes, but resolver caching can make the practical wait longer. Test from a network outside the VPS with a DNS lookup and confirm that the returned address is the server you just created.

Rank #2
Sale
Smart Watch for Men Women Compatible with iPhone Samsung Android Phone 1.69 inch Full Touch Screen IP68 Waterproof Bluetooh Fitness Tracker Heart Rate/Sleep Monitor (Black)
  • 【IP68 Waterproof Multifunctinal Smart Watch】Torjalph fitness activity tracker smart watch is IP68 waterproof technology ,you can wear it when swimming,handwashing,it's rain-proof which means that you perform multiple exercise modes outside without worrying about sweat or rain corroding your fitness smart watch,and this watch equipped with a 230 mAh large capacity battery magnetic charging ,and this sports activity tracker watch can be used 5-7 days If fully charged.
  • 【Larger 1.83'' Full Screen Watch & Multi-dial Selection】1.83 inch full HD color touch screen smart watch for men / women provides excellent 240*284 resolution image quality ,This Bluetooth smart watch offers a better touch experience and remarkable immersion and ,more than 200 watch faces for you to choose from App"Da Fit ", you can change the dial style according to your mood to wear keeping the world on your wrist
  • 【Accurate Activity Tracker Smart Watch 】sports watch activity tracker uses sweat and dust resistant breathable silicone strap, our Fitness Tracker Smart Watch for Android iOS Phones supports 12 sports modes,walking,running,bicycle,swimming,badminton,basketball,football,rope skipping. This bluetooth calls smart watch for men women is lightweight and stylish, bringing more convenient and relaxing sports experience while also providing more protection.
  • 【Your 24 Hour Personal Daily Health Monitor】Fitness watch for women men full touch screen IP67 waterproof bluetooth smartwatch for Android iOS Phones with heart rate blood pressure monitor multifunction Andriod smart watch with steps counter sleep monitor sports fitness watch, monitoring blood oxygen saturation allows you to understand your physical condition in real time to track fitness progress ,to know your health status in time.
  • 【More Functions Bluetooth Call Smart Watch】This fitness activity smart watch full screen for iPhone and Android phones includes a bunch of new features including:The bluetooth smart watch can hang up the phone, receive and display WhatsAPP /Text /Facebook /Twitter /Messenger reminder.Support sedentary reminder, alarm clock, stopwatch, timer,weather information,music control, remote camera control compatible with Android 5.0 and above or iOS 9.0 and above smartphones.

3. Log in with a non-root sudo user

Ghost-CLI should not be run as root. Create a normal account with sudo access; do not name it ghost, because Ghost-CLI creates a system user with that name and the two identities can conflict.

sudo adduser deployer
sudo usermod -aG sudo deployer
su - deployer

Replace deployer with your own username. Confirm that this account can use sudo before continuing. Keep the root shell available only for tasks that genuinely require it, such as installing operating-system packages or creating the initial directory.

4. Install Nginx, MySQL, and the correct Node.js line

Update Ubuntu’s package index and install Nginx and MySQL using the repositories and instructions appropriate to your Ubuntu release. Install the Node.js LTS release that the current Ghost documentation lists for your Ghost version. Because that compatibility matrix changes, pinning a number from an old article is unsafe.

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

After installation, verify that the commands are available and note their versions. The important check is not whether Node.js is merely modern, but whether it is explicitly supported by the Ghost release you selected.

5. Create a dedicated MySQL database and account

Create a database used only by this Ghost site and a MySQL user with a strong, unique password. Grant that user rights on the Ghost database rather than using the MySQL administrator account in the application.

sudo mysql
CREATE DATABASE ghost_prod;
CREATE USER 'ghost_app'@'localhost' IDENTIFIED BY 'use-a-long-unique-password';
GRANT ALL PRIVILEGES ON ghost_prod.* TO 'ghost_app'@'localhost';
FLUSH PRIVILEGES;
EXIT;

The database name, username, host, and password you choose here must match the values entered during ghost install. Store the password in a password manager; Ghost will need it after installation for migrations and normal operation.

ghost cms vps setup: install Ghost with the CLI

1. Install Ghost-CLI globally

As the non-root sudo user, install the current CLI package with npm:

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.
Rank #3
New Bee Guitar Cable 10ft Electric Instrument Bass AMP Cord
  • [Low Noise High Fidelity] New bee guitar cord with 22AWG oxygen-free-copper center conductors provides enhanced signal transfer, the PVC insulation material and the high-density stranded copper double shield provide noise rejection for quiet operation
  • [Ideal for Choice] New bee 1/4 straight and right angle metal connectors, ensures a secure connection in any instrument, pedal, or amp jack. L shape great fro on stage guitar stands
  • [Wide Compatible] Suitable for mixer, power amplifier, microphone, effector, decoder, equalizer, electoronic organ, electric guitar, electric bass and other electronic equipments. Widely used in the installation of smart home, karaoke speaker, professional stage audio, etc
  • [Easy Disassemble] Making incidental repairs quick and easy! Very nice, flexible cable
  • [Dont Hesite to Order] 24 hours customer services and professional technology team are standing by
sudo npm install -g ghost-cli@latest

Using sudo for the global npm installation does not mean the Ghost installer itself should be run as root. The site installation must be performed from a directory owned by your normal user.

2. Create an owned installation directory

A conventional location is /var/www/ghost. Create it with elevated privileges, then transfer ownership to the account that will run Ghost-CLI.

sudo mkdir -p /var/www/ghost
sudo chown deployer:deployer /var/www/ghost
cd /var/www/ghost

Use your actual username in the chown command. If the directory is owned by root, the CLI may stop with permission errors or create files that the Ghost service cannot later modify.

3. Run the installer from that directory

Start the interactive installer:

ghost install

Answer each prompt with the values prepared earlier. The exact wording can change between CLI versions, but the decisions are consistent:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  1. Blog URL: enter the fully qualified HTTPS address visitors will use, including the correct hostname.
  2. MySQL host: use the local host value supplied by your database setup unless MySQL is intentionally on another server.
  3. MySQL user and password: enter the dedicated application account, not the MySQL administrator.
  4. Database name: enter the database created for this site.
  5. Nginx: accept setup if this VPS will serve Ghost directly through Nginx.
  6. SSL: accept the Let’s Encrypt option only after DNS resolves to this VPS and the domain is reachable.
  7. systemd: accept service setup so Ghost starts on boot and can be controlled as a managed service.

Allow the CLI to finish its checks. It may pause while validating the URL, connecting to MySQL, writing Nginx files, obtaining the certificate, and creating the service. Do not interrupt the process during a database migration or certificate request.

ghost-cli install ssl nginx: what the automation configures

Nginx as the public entry point

Nginx listens for web requests on the VPS and forwards them to Ghost’s local application process. The generated configuration associates the hostname you entered with that Ghost instance. If you later change domains, update the Ghost URL and Nginx configuration together; changing only one side can create redirects, broken assets, or certificate mismatches.

Let’s Encrypt certificate issuance

When SSL is enabled, Ghost-CLI requests a Let’s Encrypt certificate for the configured domain and places the HTTPS handling in Nginx. Validation fails when DNS still points elsewhere, the hostname is misspelled, a firewall blocks the validation request, or another service is already answering for the domain. Fix the underlying DNS or network condition before rerunning the certificate step rather than repeatedly requesting certificates.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #4
BSIMB 15.6" Digital Family Calendar & Chore Chart, No Subscription Fees
  • Digital Family Calendar: BSIMB digital calendar wall touch screen puts an end to your chaotic life. Designed for busy families, the digital calendar keeps you organised and in step with your family. Assign different colours and tasks to each family member to make family scheduling easier and more intuitive.
  • Easy Setup and Auto-Sync: Plug in, connect to WLAN and auto-syn your electric calendar in minutes. Digital wall calendar compatible with Google calendar, iCloud calendar, Outlook calendar, Cozi calendar and Yahoo calendar. Add events directly on the device or through the ecalendar app. Electronic calendar stays current whether you're at work or traveling—no manual updates needed.
  • All-In-One Home Assistant: Smart calendar builds habits and encourage independence with personalised chores. Display daily meal plan to reduce the daily ‘What's for dinner?’ stress. To-do lists keep track of everything you want. Turning chores into valuable achievements with stars and rewards, making life easier and more enjoyable.
  • Manage Anytime Anywhere: BSIMB electronic calendar for family stay connected with the powerful ecalendar app. Access and manage your digital wall calendar anytime, anywhere with free features like stars & rewards, photo screensaver, chore charts, meals plans, to-do lists etc. Electronic planner paid features like Magic Import tailor advanced tools for users with special needs.
  • Stay in Touch with Loved Ones: Share photos or videos from your phone to electronic wall calendar with app, instantly update your life moment, and keep in touch with your family, especially those who are far away; you can also surprise your smart calendar digital wall by sending him a wish card; it's also great for keeping tech-illiterate elders in touch with the youngsters.

systemd service management

The systemd integration keeps Ghost running after logout and starts it again after a reboot. It also gives you a service boundary for status checks and restarts. Keep the installation directory and its ownership unchanged after setup; moving files without updating the service definition can prevent systemd from finding the application.

Verify the finished installation

Open the HTTPS URL in a private browser window and complete the initial Ghost administrator setup. Check that the browser shows a valid certificate, the administration route loads, and a test post can be saved and viewed publicly.

  • Confirm that the address bar uses HTTPS and the certificate name matches the hostname.
  • Open the site from a different network, such as a mobile connection, to rule out local DNS caching.
  • Create a short draft, publish it, and verify that images and theme assets load.
  • Log out of SSH and confirm that the site remains available; this tests that Ghost is running as a service rather than only in your terminal session.
  • Reboot during a maintenance window and verify that Nginx, MySQL, and Ghost return without manual intervention.

If the installer reports success but the browser returns a gateway error, check the service status and Nginx error log first. A running Nginx process with a stopped Ghost service produces a different symptom from a DNS or certificate problem, so identify which layer is failing before changing configuration.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Common failures and precise fixes

Let’s Encrypt cannot validate the domain

Use a DNS lookup from outside the VPS and compare the result with the server’s public IP. If it is different, correct the A or AAAA record and wait for caches to expire. If DNS is correct, check that Nginx is listening publicly and that the VPS network policy permits HTTP and HTTPS validation traffic. Run the SSL portion again only after the hostname resolves consistently.

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

Ghost-CLI refuses to run as root

Exit the root shell, switch to the non-root sudo account, confirm ownership of /var/www/ghost, and rerun the command from that directory. Do not bypass the check with unsafe permission changes.

Permission denied inside the installation directory

Inspect the directory owner and group. The account running Ghost-CLI must own the installation path and be able to create files there. Correct ownership with chown, then rerun the failed step. Avoid making the entire tree world-writable; that masks the ownership problem and weakens the server.

MySQL authentication fails

Check the database name, username, host, and password character-for-character. Confirm that the account was granted privileges on the selected database and that MySQL is running. Re-enter the dedicated application credentials rather than the root password.

The site stopped after an Ubuntu kernel update

A MySQL crash after a kernel update can leave Ghost unavailable even though the VPS itself is online. Check MySQL and the Ghost service, then restart the affected service using the systemd or Ghost-CLI action created during installation. Review the service and database logs before rebooting repeatedly; the log usually identifies whether the failure is a database start problem, a port conflict, or an application error.

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

Node.js is rejected during installation

Do not force the installer past the compatibility check. Confirm the Ghost release and its current Node.js support matrix in the official Ghost documentation, install the matching LTS line, and run the installer again. Guides written for Ghost 5.x may mention Node.js 18 or 20, while newer Ghost releases may require a different LTS range.

Maintenance after launch

Updates

Keep Ghost, Node.js, Ubuntu, Nginx, and MySQL within the support boundaries for your Ghost release. Ghost-CLI-based installations generally keep the application layout and service configuration together, which makes the core update workflow simpler than reconstructing a container manually, but this is a vendor-guide claim rather than a guarantee for every environment.

Before an update, take a VPS snapshot or a verified database and content backup, record the current Ghost and Node.js versions, and confirm that you can log in through SSH with sudo. Use the update command documented for the Ghost-CLI version installed on your server; command names and prerequisites can change, so do not rely on an old copied snippet. Read the release notes for database migrations, Node.js requirements, and theme compatibility before approving the change.

Backups

A VPS snapshot alone is not a complete Ghost backup if it is stored on the same provider account or region. Keep an additional copy of the MySQL database and the Ghost content directory, including uploaded images and theme files, in storage that is independent of the running server. Periodically restore a backup to a temporary environment so you know it contains usable data rather than merely completing without an error.

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.

Operational checks

  • Watch available memory, disk space, and MySQL health; a full disk can prevent uploads, migrations, and log writes.
  • Renewal of the Let’s Encrypt certificate should be tested before expiry, especially after changing DNS or Nginx.
  • Review systemd and Nginx logs after Ubuntu, Node.js, MySQL, or Ghost changes.
  • Document the VPS IP, DNS records, database credentials location, backup location, and recovery owner.

Choosing between VPS sizes and installation styles

Decision Smallest practical choice When to choose more
Memory 1 GB, the documented minimum Choose 2 GB for more operating headroom; consider 4 GB for newsletter sending or heavier workloads.
Operating system An Ubuntu release listed by the current Ghost guide Prefer the newest supported release that your provider and required integrations support.
Database placement MySQL on the same VPS Separate database infrastructure can improve isolation, but adds networking, credentials, cost, and backup complexity.
Web configuration Ghost-CLI-managed Nginx Manual Nginx is appropriate when you already operate a reverse proxy or need a custom multi-site design.
Runtime The Node.js LTS line explicitly supported by your Ghost version Do not upgrade Node.js independently until Ghost’s compatibility documentation lists it.

For a single blog, one Ubuntu VPS with local MySQL and Ghost-CLI is usually the least complicated supported architecture. A multi-site or high-traffic deployment may justify separating services, but that is an operations decision rather than a prerequisite for running Ghost.

Final pre-launch checklist

  • Ubuntu version is listed as supported for the Ghost release.
  • Memory matches the workload: at least 1 GB, with 2 GB or 4 GB chosen when the documented guidance and workload warrant it.
  • Node.js version was checked against the specific Ghost release instead of copied from an older guide.
  • MySQL 8.0 or 8.4 is installed, with a dedicated database and application user.
  • The domain’s A record resolves to the VPS before SSL issuance.
  • A non-root sudo user, not a user named ghost, owns the installation directory.
  • Ghost-CLI was installed globally and ghost install was run from the owned directory.
  • Nginx, Let’s Encrypt SSL, and systemd were enabled only after their prerequisites passed.
  • The HTTPS site, admin area, publishing flow, reboot behavior, and backup restore path were tested.

When these checks pass, the VPS is not merely displaying a Ghost page; it has the DNS, runtime, database, proxy, certificate, and service pieces needed for a maintainable self-hosted installation.

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.

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
Windows Errors? Fix Them Before They SpreadFree repair scan
Outdated Drivers Are Slowing You DownFree scan - exact matches

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.