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

guide

How to Self-Host Ghost on Hetzner (2026 Guide)

Learn how to self-host Ghost on Hetzner with a step-by-step 2026 guide covering setup, configuration, and recommended specs for a smooth deployment.

How to Self-Host Ghost on Hetzner (2026 Guide)

Ghost is a powerful open-source platform for publishing online, particularly for blogs and professional websites. Self-hosting Ghost on a VPS like Hetzner allows you greater control over your application and hosting environment. In this guide, we will walk you through the process of setting up Ghost on a Hetzner VPS.

Why Choose Hetzner?

Before we dive into the installation, letโ€™s briefly look at why Hetzner could be the right choice for your Ghost hosting needs:

ProviderPrice (EUR/mo)RAMDisk SpaceRegion
Hetzner Cloud4.152GB20GBGermany, Finland
Contabo VPS5.994GB400GBGermany
DigitalOcean6.001GB25GBGlobal
Vultr6.001GB25GBGlobal
Linode5.002GB50GBGlobal

As seen in the table, Hetzner offers competitive pricing and good specifications, making it a cost-effective option for self-hosted applications.

Getting Started

Prerequisites

  1. Hetzner VPS: Sign up for a Hetzner account and create a VPS instance. The 4.15 EUR/month plan should suffice for basic usage.

  2. Domain: Purchase a domain name if you plan to serve your Ghost blog under a custom domain.

  3. Basic Knowledge: Familiarity with Linux command line, SSH, and Git is recommended.

Step 1: Create Your VPS

  1. Log in to Hetzner Cloud Console.
  2. Create a new project and select a suitable VPS configuration.
  3. Choose an operating system (Ubuntu 20.04 or 22.04 LTS) for better compatibility with Ghost.
  4. Note down your SSH access credentials.

Step 2: Access Your VPS

Using your terminal, connect to your VPS via SSH.

ssh root@your_vps_ip

Step 3: Update and Install Dependencies

Before installing Ghost, update your system and install necessary packages.

sudo apt update && sudo apt upgrade -y
sudo apt install nginx mysql-server curl -y

Ghost requires Node.js and npm, so weโ€™ll also install that.

Install Node.js

Add NodeSource repository and install Node.js (version 16.x recommended for Ghost).

curl -sL https://deb.nodesource.com/setup_16.x | sudo -E bash -
sudo apt install nodejs -y

Install Ghost CLI

Now, install Ghost CLI globally.

sudo npm install -g ghost-cli

Step 4: Configure MySQL

Now, letโ€™s set up MySQL for Ghost.

  1. Log into MySQL:

    sudo mysql -u root -p
  2. Create a database and user:

    CREATE DATABASE ghostdb;
    CREATE USER 'ghostuser'@'localhost' IDENTIFIED BY 'your_password';
    GRANT ALL PRIVILEGES ON ghostdb.* TO 'ghostuser'@'localhost';
    FLUSH PRIVILEGES;
    EXIT;

Step 5: Install Ghost

  1. Create a directory for Ghost and navigate into it:

    mkdir -p /var/www/ghost
    cd /var/www/ghost
  2. Install Ghost:

    ghost install

During the installation, you will be prompted to provide your domain name, database credentials, and a few other settings. Follow the prompts carefully.

Step 6: Configure Nginx

After Ghost installation, you need to adjust Nginx settings to serve your Ghost blog.

  1. Create an Nginx server block:

    sudo nano /etc/nginx/sites-available/ghost
  2. Add the following configuration:

    server {
        listen 80;
        server_name your_domain.com;
    
        location / {
            proxy_pass http://localhost:2368;
            proxy_set_header Host $host;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_set_header X-Forwarded-Proto $scheme;
        }
    }
  3. Enable the configuration:

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

Step 7: Access Your Ghost Blog

Open your web browser and navigate to http://your_domain.com. Follow the on-screen instructions to complete the Ghost setup.

FAQs

How do I secure my Ghost instance?

To secure your Ghost blog, consider enabling SSL with Letโ€™s Encrypt. This requires additional installations, but Ghost CLI can automatically handle this for you during the installation process. Follow the prompts during the ghost install command to set up your SSL configuration.

Can I scale my Hetzner VPS as traffic increases?

Yes, Hetzner allows you to upgrade your serverโ€™s resources easily. When you notice increased traffic, you can navigate to the Hetzner Cloud Console and scale your VPS plan to accommodate more memory or CPU without downtime. Check this full VPS comparison for information on scaling options.

What if I encounter issues during installation?

If you run into issues while installing Ghost, consult the Ghost documentation for troubleshooting tips. It provides detailed guidance on common installation issues and fixes. Additionally, the community on r/selfhosted is a valuable resource for finding solutions. Consider searching or posting your specific issue there for assistance.

By following this guide, you should have a fully functional Ghost blog running on a Hetzner VPS. Happy blogging!