Take it with a grain of salt

Install Ghost Blogging Platform Di Ubuntu 20.04 Focal Fossa

Posted on

Ghost is a free and open source blogging platform written in JavaScript and distributed under the MIT License, designed to simplify the process of online publishing for individual bloggers as well as online publications. Wikipedia

Aku akan memakai kontainer ubuntu 20.04 untuk dipasang Ghost. Pertama, aku bikin dulu kontainer-nya dengan nama ghost dan base image ubuntu/focal

└─▪  lxc launch images:ubuntu/focal ghost
Creating ghost
Starting ghost                              

Kemudian aku akan exec shell ke dalam kontainer ghost

└─▪  lxc exec ghost -- bash
[email protected]:~#

Dari dalam kontainer ghost, aku akan bikin user baru bernama sumar kemudian install nginx dan curl

└─▪  lxc exec ghost -- bash
[email protected]:~# apt update

[email protected]:~# adduser sumar
Adding user `sumar' ...
Adding new group `sumar' (1001) ...
Adding new user `sumar' (1001) with group `sumar' ...
Creating home directory `/home/sumar' ...
Copying files from `/etc/skel' ...
New password: 
Retype new password: 
passwd: password updated successfully
Changing the user information for sumar
Enter the new value, or press ENTER for the default
        Full Name []: Sumarsono
        Room Number []: 
        Work Phone []: 
        Home Phone []: 
        Other []: 
Is the information correct? [Y/n] Y

[email protected]:~# usermod -aG sudo sumar

[email protected]:~# su - sumar            
To run a command as administrator (user "root"), use "sudo <command>".
See "man sudo_root" for details.

[email protected]:~$ sudo apt-get install nginx curl
[sudo] password for sumar: 
Do you want to continue? [Y/n] y

Selanjutnya, aku akan pasang nodejs versi 14 yang dibutuhkan oleh ghost, dilanjutkan dengan memasang ghost-cli pakai npm

[email protected]:~$ curl -sL | sudo -E bash

[email protected]:~$ sudo apt-get install -y nodejs

[email protected]:~$ sudo npm install [email protected] -g

Lanjut, saatnya bikin website pakai ghost-cli, dimulai dari menyiapkan direktori hingga setup-nya. Wizard ghost install ini sangat mudah untuk diikuti, baca aca instruksinya dan ikuti.

[email protected]:~$ sudo mkdir -p /var/www/
[email protected]:~$ sudo chown sumar:sumar /var/www/
[email protected]:~$ sudo chmod 755 /var/www/        
[email protected]:~$ cd /var/www/            
[email protected]:/var/www/$ ghost install
✔ Checking system Node.js version - found v14.16.1
✔ Checking logged in user
✔ Checking current folder permissions
✔ Checking system compatibility
Local MySQL install was not found or is stopped. You can ignore this if you are using a remote MySQL host.
Alternatively you could:
a) install/start MySQL locally
b) run `ghost install --db=sqlite3` to use sqlite
c) run `ghost install local` to get a development install using sqlite3.
? Continue anyway? Yes
MySQL check skipped
ℹ Checking for a MySQL installation [skipped]
✔ Checking memory availability
✔ Checking free space
✔ Checking for latest Ghost version
✔ Setting up install directory
✔ Downloading and installing Ghost v4.4.0
✔ Finishing install process
? Enter your blog URL:
? Enter your MySQL hostname:
? Enter your MySQL username: [hidden]
? Enter your MySQL password: [hidden]
? Enter your Ghost database name: [hidden]
✔ Configuring Ghost
✔ Setting up instance
+ sudo useradd --system --user-group ghost
+ sudo chown -R ghost:ghost /var/www/
✔ Setting up "ghost" system user
ℹ Setting up "ghost" mysql user [skipped]
? Do you wish to set up Nginx? Yes
+ sudo mv /tmp/ghost-sumarsono-com/ /etc/nginx/sites-available/
+ sudo ln -sf /etc/nginx/sites-available/ /etc/nginx/sites-enabled/
+ sudo nginx -s reload
✔ Setting up Nginx
? Do you wish to set up SSL? No
ℹ Setting up SSL [skipped]
? Do you wish to set up Systemd? Yes
+ sudo mv /tmp/ghost-sumarsono-com/ghost_ghost-sumarsono-com.service /lib/systemd/system/ghost_ghost-sumarsono-com.service
+ sudo systemctl daemon-reload
✔ Setting up Systemd
+ sudo systemctl is-active ghost_ghost-sumarsono-com
? Do you want to start Ghost? Yes
+ sudo systemctl start ghost_ghost-sumarsono-com
+ sudo systemctl is-enabled ghost_ghost-sumarsono-com
+ sudo systemctl enable ghost_ghost-sumarsono-com --quiet
✔ Starting Ghost

Ghost uses direct mail by default. To set up an alternative email method read our docs at


Ghost was installed successfully! To complete setup of your publication, visit:

Tinggal publish via argi tunnel

└─▪  cat /etc/cloudflared/config.yml 
credentials-file: [hidden]
tunnel: [hidden]
loglevel: error

  - hostname:
└─▪  cloudflared tunnel route dns [hidden] 

Kalau bingung soal argo tunnel, bisa baca Expose Local Lxd Container Ke Internet Pakai Cloudflare Argo Tunnel

SELESAI, sekarang akses dan selesaikan instalasi ghost-nya.