Want to build a popular blog without paying high monthly platform charges? Ghost is a great, lightweight alternative to WordPress that is built specifically for modern writers. You can run it on your own Virtual Private Server (VPS) and get full control over your data and greater control over your website’s performance, at a cost that depends on your VPS plan and additional services.
If you’re new to servers, don’t worry. This step-by-step guide shows you how to host a Ghost blog on a VPS, from installing Ghost to getting your blog ready to publish.
Why Run Ghost on a VPS?
Ghost runs on Node.js and stores your content in a MySQL database. This guide follows Ghost’s recommended Ubuntu setup, in which NGINX handles incoming web traffic and system keeps Ghost running. Installing these programs requires administrator access, which shared hosting plans often limit. A VPS gives you that access. If your current plan blocks it, choose a VPS to upgrade to before you start.
Here’s what you’ll need:
- A VPS running Ubuntu 24.04 LTS
- At least 1 GB of RAM (2 GB is a more comfortable starting point)
- Node.js 22 LTS
- MySQL 8
- A registered domain name
- The server IP address and root login credentials from your provider
Ghost’s documentation lists 1 GB as the minimum, so a busier website may need more.

Step-by-Step Installation Guide
Step 1: Connect to Your VPS
To set up Ghost, you’ll type commands into a terminal, a window that lets you control your VPS from your own computer. On Windows, search for PowerShell in the Start menu and open it. On a Mac, click the search icon at the top right of your screen, type Terminal, and open it. Copy the following command and paste it, replacing “123.45.67.89” with your server’s IP address:
The first time you connect, SSH may ask whether you trust the server. Type “yes” and press Enter, then enter your root password. Nothing appears on screen as you type the password, which is normal.
Stay in the same SSH session until the end of the guide. Copy each command, paste it into the window, and press Enter.
Step 2: Create a Non-Root User
Ghost can’t be installed as the root user, so you first need to create a regular one. Choose any username except ghost, because Ghost-CLI creates a system user with that name later. Replace “youruser” in the command below with the username you chose:
adduser youruser
When prompted, type a password and then type it again to confirm. You can press Enter to skip the remaining questions. Next, add the new user to the sudo group so it can run administrator commands:
usermod -aG sudo youruser
Then switch to the new account:
su – youruser
You’re now working as your regular user. Whenever a command begins with sudo, the server may ask for the password you just created.
Step 3: Install the Required Software
Once your regular user is set up, the next step is to install the necessary software that Ghost relies on. Begin by refreshing the server’s package list and updating the currently installed packages. You can accomplish the installation by entering the following command:
sudo apt update && sudo apt upgrade -y
Next comes NGINX, which receives the incoming web traffic for your blog:
sudo apt install nginx -y
After that, install MySQL, the database that holds your blog’s content and settings:
sudo apt install mysql-server -y
Ghost works with MySQL 8.0 and 8.4. When you run the installer later, Ghost-CLI logs in to the MySQL root account to create your blog’s database and a database user for it. For that reason, you need to set a password for the root account first. Open the MySQL prompt by running:
sudo mysql
The prompt changes to show that you’re now typing MySQL commands. Run the command below, replacing “YourStrongPassword” with your own strong password. Don’t use the placeholder itself as your password. Keep the straight single quotation marks inside the command.
ALTER USER ‘root’@’localhost’ IDENTIFIED WITH caching_sha2_password BY ‘YourStrongPassword’;
Finally, leave the MySQL prompt and return to the terminal:
exit
Now it’s time to install Node.js, which needs to be a version that Ghost supports. Current Ghost 6.x releases work with Node.js 22 and 24, and this guide uses Node.js 22 LTS. For Ghost 6.63 and later, use Node.js 22.23.1 or newer, or Node.js 24.20.0 or newer. Before you install anything, check Ghost’s compatibility documentation to find the minimum version your release requires.
Start with a few helper tools that let the server download and set up the Node.js package source:
sudo apt install -y ca-certificates curl gnupg
Then add the Node.js 22 package source:
curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash –
With the source added, install Node.js itself:
sudo apt install -y nodejs
Now check which Node.js version you have. It should meet the minimum your Ghost release requires:
node -v
After Node.js, install Ghost-CLI, the command-line tool that installs and configures Ghost 6.x on a VPS:
sudo npm install -g ghost-cli@latest
You can confirm the installed Ghost-CLI version with:
ghost –version
Ensure that web traffic can reach your server before you move on. If you use UFW (Ubuntu’s firewall), allow SSH and NGINX traffic with these commands:
sudo ufw allow OpenSSH
sudo ufw allow ‘Nginx Full’
If UFW isn’t enabled yet, add these rules first and then enable it. Run the following command only if you want to activate the firewall:
sudo ufw enable
Also check your VPS provider’s firewall and allow incoming TCP ports 80 and 443 there. Port 80 handles the SSL certificate check, and port 443 lets visitors reach your website over HTTPS. Leave SSH open as well, so you can continue managing your server.
Step 4: Point Your Domain to the VPS
Your server has all the software it needs, so the next step is to point your domain to it. You do this process on your domain registrar’s website, so you can step away from the terminal for now.
Open the domain’s DNS settings and add an A record. Enter @ as the host and your VPS’s IP address as the value. This connects the bare domain, such as yourdomain.com, to your server. If you plan to use a subdomain instead, add the record for that subdomain.
Note: The hostname you enter during the Ghost installation must point to your VPS. Ghost requests an SSL certificate during setup, and the certificate service needs to reach your server through that hostname. DNS changes can take time to spread, so wait for the record to update before you continue.
Before continuing, verify that your domain resolves to your VPS’s IP address. An online DNS lookup tool can tell you whether the A record has been updated. If you use a subdomain, enter that exact subdomain as the blog URL during the Ghost installation.
Step 5: Install Ghost
Your domain now points to your VPS, so you can install Ghost. Return to your SSH session, where you’re still logged in as your regular user, and create a folder for the blog:
sudo mkdir -p /var/www/ghost
The root user owns that folder for now. Hand ownership to your own account, swapping “youruser” for the username you picked earlier:
sudo chown youruser:youruser /var/www/ghost
Set the folder permissions next:
sudo chmod 775 /var/www/ghost
Then move into the folder:
cd /var/www/ghost
Everything from here runs inside this folder. Start the installer with:
ghost install
Ghost-CLI then asks a series of questions. The exact wording and order can vary between Ghost-CLI versions, so treat these as the expected setup choices:
- Enter your complete website address, such as https://yourdomain.com, when Ghost-CLI asks for the blog URL.
- Press Enter to use the default MySQL hostname, localhost.
- Type root when Ghost-CLI asks for the MySQL username.
- Enter the MySQL root password you set in Step 3.
- Press Enter to keep the suggested database name.
- Answer yes to creating a Ghost MySQL user. Ghost-CLI then adds a separate database user for the blog.
- Choose yes for the NGINX configuration.
- Answer yes to setting up SSL, then enter your email address when asked.
- Answer yes to setting up systemd.
- Confirm that you want to start the application.
During installation, Ghost-CLI also requests a free SSL certificate from Let’s Encrypt, which lets your blog load over HTTPS. If the request fails, read the error message first, then check these three things:
- Your domain points to the VPS.
- Incoming port 80 is open.
- Any AAAA record points to a working IPv6 address on this server.
If you changed your DNS recently, allow time for cached records to update. Once you have fixed the problem, retry the SSL setup from the Ghost installation directory by running:
ghost setup ssl
If the installation stopped before it installed systemd or started Ghost, finish the remaining setup with:
ghost setup
Step 6: Create Your Administrator Account
After the installation finishes, go to https://yourdomain.com/ghost in your browser, using your own domain in place of “yourdomain.com”. The page asks for your name, email address, and a strong password, which together set up your administrator account.
At this point, you can start publishing, but email delivery still needs to be set up. Ghost sends transactional emails for things like account invitations, password resets, and member login links, and it needs a working email service to do that. A service such as Mailgun, or any other SMTP provider Ghost supports, will do the job. If you also plan to send bulk newsletters, Mailgun is the one you need.
Conclusion
Hosting Ghost on a VPS follows a clear order. You connect to the server, create a regular user, install the supporting software, point your domain, and run the installer. Creating the user first lets you install Ghost without running it as root, and pointing the domain beforehand lets the SSL certificate request succeed.
Now that your administrator account exists, your blog is live and ready for its first post. Keep the software updated and store backups away from the server to protect your work. Monitor your server’s resource usage and performance regularly as your readership grows. If the VPS begins to slow down, you can upgrade to a plan with greater resources or add a CDN and a caching layer to handle the additional traffic.
- How to Host a Ghost Blog on a VPS - November 18, 2026
- When Spreadsheets Stop Working: How Field Businesses Move to Vertical SaaS - November 12, 2026
- Hotel Umang Residency – The Corporate Rooms in Sector 62: My Disappointing Experience With Parking and MakeMyTrip - October 28, 2026