Independent testing Updated April 2026 387 self-hosting guides 5 VPS providers tested

guide

How to Self-Host Ghost on a VPS (Complete Guide)

A complete step-by-step guide to self-hosting Ghost on a VPS in 2026, covering installation, configuration, securing Ghost, and the specs you need.

How to Self-Host Ghost on a VPS (Complete Guide)

Ghost is a powerful open-source blogging platform, perfect for developers and homelabbers looking to create a minimalistic yet feature-rich website. In this guide, we will explore how to self-host Ghost on a VPS, covering everything from installation to configuration.

Why Choose a VPS for Ghost?

Hosting Ghost on a VPS offers flexibility, better performance, and full control over your environment. With a VPS, you can customize your setup according to your specific needs, ensure better security measures, and avoid the limitations of shared hosting.

When choosing a VPS provider, consider the following alternatives:

VPS ProviderMonthly Price (EUR/USD)Features
Contabo VPS5.99 EURHigh storage options, great for beginners
Hetzner Cloud4.15 EURAffordable, reliable performance
DigitalOcean6 USDUser-friendly interface, excellent documentation
Vultr6 USDGlobal data centers, flexible pricing
Linode (Akamai Cloud)5 USDStrong developer community, good support

You can find more options by checking our full VPS comparison.

Prerequisites

Before getting started, make sure you have:

  1. A VPS: Choose from one of the providers above.
  2. Domain Name: Optional, but recommended for a professional setup.
  3. Basic Linux Knowledge: Familiarity with command-line operations.

Step-by-Step Installation Guide

Step 1: Set Up Your VPS

  1. Log in to your VPS: Use SSH to access your server:

    ssh root@your_vps_ip
  2. Update Your System: Keep your packages up-to-date.

    sudo apt update && sudo apt upgrade -y

Step 2: Install Node.js

Ghost runs on Node.js, so you need to install it:

  1. Add NodeSource PPA:

    curl -sSL https://deb.nodesource.com/setup_16.x | sudo bash -
  2. Install Node.js:

    sudo apt install -y nodejs
  3. Verify Installation:

    node -v
    npm -v

Step 3: Install Ghost CLI

Ghost CLI facilitates the installation and management of Ghost:

sudo npm install -g ghost-cli

Step 4: Create a Directory for Ghost

Create a folder and navigate into it:

mkdir -p /var/www/ghost
cd /var/www/ghost

Step 5: Install Ghost

Now, run the Ghost installation command:

sudo ghost install

During the installation, the CLI will ask questions regarding your database and email configuration. Follow the prompts, providing appropriate answers.

Step 6: Configure Nginx

Ghost needs a web server, and Nginx is a popular choice:

  1. Install Nginx:

    sudo apt install nginx -y
  2. Set Up a Server Block:

    Create a new server block file for your domain:

    sudo nano /etc/nginx/sites-available/ghost

    Add the following configuration:

    server {
        listen 80;
        server_name your_domain.com;
        location / {
            proxy_pass http://127.0.0.1:2368;
            proxy_http_version 1.1;
            proxy_set_header Upgrade $http_upgrade;
            proxy_set_header Connection 'upgrade';
            proxy_set_header Host $host;
            proxy_cache_bypass $http_upgrade;
        }
    }
  3. Enable the Server Block:

    sudo ln -s /etc/nginx/sites-available/ghost /etc/nginx/sites-enabled/
    sudo nginx -t
    sudo systemctl restart nginx

Step 7: Start Ghost

Start the Ghost service to launch your blog:

sudo ghost start

Step 8: Access Your Blog

Navigate to http://your_domain.com in a web browser to see your new Ghost blog.

Using Ghost with Docker

If you prefer containers, you can run Ghost using Docker as well. Hereโ€™s how:

  1. Install Docker and Docker Compose:

    sudo apt install docker.io docker-compose -y
  2. Create a Docker Compose File:

    version: '3'
    services:
      ghost:
        image: ghost:latest
        restart: always
        volumes:
          - ./ghost/content:/var/lib/ghost/content
        environment:
          - url=http://your_domain.com
        ports:
          - "2368:2368"
  3. Run Docker Compose:

    docker-compose up -d

This setup allows you to have Ghost running in a containerized environment, simplifying updates and scalability.

FAQs

Q1: Can I self-host Ghost for free? While the Ghost software is open-source and free, you will need a VPS or hosting plan which incurs monthly costs. The minimum price for VPS servers like Hetzner starts as low as 4.15 EUR/mo. Check VPS providers that suit your budget, but remember that performance is key.

Q2: How often should I update Ghost after installation? It is advisable to check for Ghost updates regularly, at least once a month. Ghost updates typically include important security patches and new features. You can update your installation by running ghost update in your Ghost installation directory, ensuring a smooth and secure blogging experience.

Q3: Is it possible to migrate an existing site to Ghost? Yes, Ghost provides tools and plugins that can help you migrate from WordPress or other platforms. Youโ€™ll need to export your content in a format supported by Ghost and then import it into the new installation. Details on the migration process can be found in the Ghost documentation.

Begin your self-hosting journey with Ghost! With the instructions above, youโ€™ll have a fully functioning blog on your VPS in no time.