Skip to content
In-house anti-DDoS, included on VPS, game servers and web hosting · hosted in France · cancel anytime See our plans
CloudFive
Log in

01

Before you start

For a production install with Ghost-CLI, Ghost's official documentation requires:

  • Ubuntu 22.04, 24.04 or 26.04;
  • Nginx as the web server, MySQL 8.0 or 8.4 as the database;
  • a Node.js version supported by Ghost: the current list is on the Node.js versions page of the documentation (docs.ghost.org/faq/node-versions);
  • systemd and at least 1 GB of memory;
  • a domain name whose A record already points to the VPS's IP address: the HTTPS certificate depends on it.

First do the basic settings from securing a Linux VPS. Ghost-CLI refuses to run as root: create a user with sudo rights, but do not call it ghost, a name Ghost-CLI reserves for its own system account:

adduser monutilisateur
usermod -aG sudo monutilisateur
su - monutilisateur

Ghost serves one site per install. To host other sites on the VPS as well, see hosting a website on a VPS.

02

Install with Ghost-CLI (official method)

Nginx and MySQL. Install Nginx and open the web ports in UFW:

sudo apt-get update && sudo apt-get upgrade
sudo apt-get install nginx
sudo ufw allow 'Nginx Full'
sudo apt-get install mysql-server

On Ubuntu, MySQL's root account signs in without a password, which Ghost does not support. Give it a password: enter MySQL with sudo mysql, then:

ALTER USER 'root'@'localhost' IDENTIFIED WITH 'caching_sha2_password' BY 'un-mot-de-passe-solide';
FLUSH PRIVILEGES;
exit

Node.js. The documentation installs Node.js from the NodeSource repository. Its example uses major version 22: change it if the supported versions page says otherwise.

sudo apt-get install -y ca-certificates curl gnupg
sudo mkdir -p /etc/apt/keyrings
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
NODE_MAJOR=22
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | sudo tee /etc/apt/sources.list.d/nodesource.list
sudo apt-get update
sudo apt-get install nodejs -y

Ghost-CLI and Ghost. Install the tool, create the site folder (replace monblog and monutilisateur), then run the install:

sudo npm install ghost-cli@latest -g
sudo mkdir -p /var/www/monblog
sudo chown monutilisateur:monutilisateur /var/www/monblog
sudo chmod 775 /var/www/monblog
cd /var/www/monblog
ghost install

ghost install asks a few questions:

  • The blog URL: the full address, with https:// (for example https://blog.example.com). An IP address causes errors.
  • MySQL: the host localhost, the root account and its password, then the database name. Accept the creation of a MySQL account dedicated to Ghost: it will only have access to its own database.
  • Nginx, SSL and systemd: answer yes. Ghost-CLI configures Nginx, requests a Let's Encrypt certificate (an email address is required) and creates the service that keeps Ghost running.

Then open https://blog.example.com/ghost to create the owner account, without delay: until it exists, anyone can create it.

03

The Docker option

Ghost also publishes an official Docker install, presented as a preview in its documentation. It runs Ghost, MySQL and Caddy, a web server that gets the HTTPS certificate on its own. You need Docker with Docker Compose (see installing Docker on a VPS) and, here too, a domain already pointed at the VPS.

sudo git clone https://github.com/TryGhost/ghost-docker.git /opt/ghost
cd /opt/ghost
sudo cp .env.example .env
sudo cp caddy/Caddyfile.example caddy/Caddyfile
sudo nano .env
sudo docker compose pull
sudo docker compose up -d

In .env, fill in at least DOMAIN, the database passwords (DATABASE_ROOT_PASSWORD and DATABASE_PASSWORD, not to be changed once the database is created) and the SMTP settings (mail__…). Caddy publishes ports 80 and 443: if another web server already uses them, for example Nginx Proxy Manager, change HTTP_PORT and HTTPS_PORT in the same file. The data is stored in /opt/ghost/data.

Choose Ghost-CLI if you want the most proven method, and Docker if your VPS already runs other services in containers.

04

Configure email and newsletters

Ghost sends two kinds of email, configured separately:

  • Transactional email: staff invitations, password resets, member sign-in and sign-up links. It goes through an SMTP server, set in the config.production.json file at the root of the site.
  • Newsletters, sent in bulk to subscribers: the documentation states that Mailgun is the only supported bulk email service, and that SMTP cannot be used for this. The Mailgun connection (sending domain and API key) is set in Ghost's admin settings.

Example mail block for any SMTP service (with Ghost-CLI), to adapt with your provider's credentials:

"mail": {
  "transport": "SMTP",
  "from": "Mon blog <noreply@example.com>",
  "options": {
    "host": "smtp.example.com",
    "port": 465,
    "secure": true,
    "auth": {
      "user": "noreply@example.com",
      "pass": "mot-de-passe-smtp"
    }
  }
}

Apply the change with ghost restart, from the site folder. With Docker, the same settings go in .env (mail__options__host, etc.), followed by sudo docker compose up -d. Without working SMTP, members do not receive their sign-in link: test with an invitation right after installing.

05

Updates and backups

Backing up. From the site folder, ghost backup creates a ZIP archive with the content in JSON format, the member list as CSV, the themes, images and media, and the routes and redirects files. Add a copy of the MySQL database, whose name is in config.production.json:

cd /var/www/monblog
ghost backup
mysqldump -u root -p nom_de_la_base > ~/ghost-$(date +%F).sql

With Docker, stop the containers, archive the data folder, then start again:

cd /opt/ghost
sudo docker compose down
sudo tar czf /root/ghost-$(date +%F).tar.gz data .env caddy
sudo docker compose up -d

Then copy the backups off the VPS (scp, rsync or external storage).

Updating. With Ghost-CLI, after a backup:

cd /var/www/monblog
ghost doctor
ghost update

ghost doctor checks the environment, including the Node.js version. If an update goes wrong, ghost update --rollback returns to the previous version. Before a major version change, read the release notes: they flag changes that require action. With Docker: git pull in /opt/ghost, then sudo docker compose pull and sudo docker compose up -d. Also keep the system updated. The certificate renews automatically: Ghost-CLI obtains it with the acme.sh tool rather than Certbot, but the principle is the same (see Let's Encrypt certificates).

06

On CloudFive

CloudFive does not offer managed Ghost: you install it yourself on a VPS, with root access. The Ryzen VPS, from €5.99 per month, is well suited to a Ghost blog:

  • an AMD Ryzen 9 9950X, with DDR5 memory and NVMe storage, for a site that responds quickly;
  • root access and a dedicated IP address to point the domain at;
  • basic DDoS protection included.

Take at least the memory Ghost requires, and more if MySQL and other services run on the same VPS. The servers are in France, on our own network, monthly with no commitment, with French-speaking support 7 days a week by ticket, on Discord and by phone. The other plans are on the VPS page.

07

Frequently asked questions

How do I install Ghost on a VPS?

The official method uses Ubuntu with Nginx, MySQL 8 and a supported Node.js version. Install Ghost-CLI with sudo npm install ghost-cli@latest -g, create a folder in /var/www, then run ghost install, which sets up Nginx, HTTPS and systemd.

Which Node.js version does Ghost need?

Ghost only accepts certain Node.js versions, which change along with its own releases. Check the supported Node.js versions page in the official documentation before installing and before each major update; ghost doctor checks the installed version.

Do I need Mailgun to send Ghost newsletters?

Yes. The documentation states that Mailgun is the only supported bulk email service for newsletters, and that SMTP cannot be used for this purpose. SMTP is still needed for transactional email, such as member sign-in links.

How do I update Ghost?

First make a backup with ghost backup and a copy of the MySQL database, then run ghost update from the site folder. If something goes wrong, ghost update --rollback returns to the previous version. With Docker, use docker compose pull then docker compose up -d.

Can Ghost be installed with Docker?

Yes. Ghost publishes an official Docker install, still presented as a preview, which runs Ghost, MySQL and Caddy for HTTPS. You clone the ghost-docker repository, fill in the .env file with the domain, passwords and SMTP, then run docker compose up -d.

Support CloudFive AI

An answer right away, a real team behind it.

CloudFive AI answers you at any hour, in seconds. When it doesn’t know, or as soon as you ask, the team that runs the machines takes over. No offshore call centre.

  • TicketThe team replies in under 2 hours, 7 days a week.
  • CloudFive AIAt any hour, on ia.cloudfive.fr, Discord and in your customer area.
  • DiscordThe team, the AI and other customers, in the help channel.
  • Your data stays with usAI runs on our servers in France; e-mails, IPs and passwords are masked.
A ticket in the customer area: a customer’s question about a Minecraft plugin, and the CloudFive team’s reply
A real ticket in the customer area, answered by the team (demo account; shown in French).
CUSTOMER AREA · APP

Your servers.
At your fingertips.

Restart a server, watch its resources live, pay an invoice or open a ticket — and get an alert when something goes wrong.

  • The status of all your services at a glance
  • Blocked attacks, filtered traffic, monthly peak
  • A notification when a server goes down or an invoice is due

App coming soon · in the meantime, everything works in your browser at manager.cloudfive.fr

The CloudFive app: the list of your services, with their status
The CloudFive app: the home screen, your services’ status, blocked attacks and an invoice to pay