How to Install Ghost CMS in Nat Vps


Natvps.id – Ghost is a free CMS and Open-source. Ghost CMS can be one other alternative to WordPress, to create a platform Blogging light and user friendly.

In this article we will discuss the steps of the ghost installation in NAT VPS, along with the Nginx configuration for Reverse-Proxy. This article uses Ubuntu 22.04 as a reference. For other OS, see the official documentation for more information.

Port forwarding configuration

Considering we use grout, we need to add 2 Port Forwarding Configuration on the virtualizor panel (or other VPS panels according to the provider), namely Port Forwarding HTTP and HTTPS For ghost domains.

For example, in this article will use a domain CMS-TUTORIAL3.Mdinata.my.id as our url shortner domain. You are free to change the domain according to your choice. Record this port and domain, because we will use it again in the deploy process.

Don’t forget to add DNS Records to go to your NAT VPS public IP, like this:

Install Docker

We will use a docker and compile a docker for men-spread Dockge & Dozzle.

First, install curly Using Orders:

apt update && apt install curl -y

Then, run manuscript Automatic installation from the docker by entering:

curl -fsSL get.docker.com | sh

Wait until the installation process is complete.

Spread ghosts

Create a new directory with a name ghost

cd ~/
mkdir ghost
cd ghost

Create a new file with a name docker-compose.yml using nano:

apt install nano -y
nano docker-compose.yaml

Then attach the following compose configuration:

# Docker Compose untuk deploy Ghost di NAT VPS
# 
# Source:  (adapted)

services:
  ghost:
    image: ghost:5-alpine
    restart: always
    ports:
      - 2368:2368
    environment:
      # see 
      database__client: mysql
      database__connection__host: db
      database__connection__user: root
      database__connection__password: example
      database__connection__database: ghost
      # URL Ghost
      url: 
    volumes:
      - ghost:/var/lib/ghost/content

  db:
    image: mysql:8.0
    restart: always
    environment:
      MYSQL_ROOT_PASSWORD: example
    volumes:
      - db:/var/lib/mysql

volumes:
  ghost:
  db:

In the section url:Adjust to your ghost domain.

# URL Ghost
url: 

Save the file by pressing Ctrl-X, yThen Enter.

Finally, run Ghost using Docker Compose:

docker compose up -d

Wait until the process spread finished.

Nginx Configuration (Reverse Proxy)

So that we can access the URL through a domain like CMS-TUTORIAL3.Mdinata.my.idwe can use Reverse Proxy Like Nginx.

First, install Nginx through the command:

# Hapus Apache2 dan pendukungnya (biasanya terpasang secara bawaan di VPS OpenVZ)
apt purge apache2* -y

# Install NGINX
apt install nginx -y

Create a new host configuration specifically for ghost:

nano /etc/nginx/sites-available/ghost

Then stick the following configuration:

# Konfigurasi NGINX untuk deploy Ghost di NAT VPS
# 

server {
    server_name cms-tutorial3.mdinata.my.id;
    listen 80;

    location / {
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header Host $http_host;
        proxy_pass 
    }
}

Adjust cms-tutorial3.mdinata.my.id with your ghost domain.

Activate the configuration with:

ln -sf /etc/nginx/sites-available/ghost /etc/nginx/sites-enabled/ghost

# Restart NGINX
systemctl restart nginx

Produce SSL certificate (let’s encryption)

So that our domain can be accessed through HTTPS, we need to make a SSL certificate. We can use a free SSL certificate from Let’s Encrypt through Certbot.

Install Certbot and Nginx plugin use the command:

apt install python3-certbot python3-certbot-nginx

So, produce Certificate through Certbot with the command

certbot --nginx -d cms-tutorial3.mdinata.my.id

Change cms-tutorial3.mdinata.my.id with your domain.

Happy! Your current domain can be accessed via a safe connection https.

Access ghost

Ghost CMS can be accessed through your ghost domain. Example: https://cms-tutorial3.mdinata.my.id.

To access the admin page, add /ghost to the URL.

Cover

Thus this article is about the steps of the Ghost CMS deploy in NAT VPS. If you are confused or doubtful, don’t hesitate to ask questions in the telegram group @ipv6indonesia. Thank You!



Game Center

Game News

Review Film
Rumus Matematika
Anime Batch
Berita Terkini
Berita Terkini
Berita Terkini
Berita Terkini
review anime

Gaming Center