Skip to main content

Install Ghost with NGINX on Arch Linux



Complete guide on how to install Ghost and using NGINX as a reverse proxy to make the site accessible on the internet over HTTP/2.


pacman -S nodejs-lts-fermium npm sqlite nginx-mainline certbot certbot-nginxnpm install [email protected] -g

Prepare directory

Create a directory to install Ghost to and cd to it

mkdir /var/www/``cd /var/www/``

Install Ghost with a sqlite database

ghost install —-db=sqlite3

When asked about URL, enter the full URL to your domain. E.g.



DigitalOcean has provided a tool for configuring your web server over at, use it and follow the instructions to create a site. Then proceed with the instructions below.

Enable your site in NGINX

If you've generated a config as mentioned above you should be ready to activate your site.

cd /etc/nginxln -s sites-available/`` sites-enabled/``

Disable the default site

If you want to disable the default site and create a new one, instead of adding your site to the default webroot, you can disable it by removing the symlink.

rm /etc/nginx/sites-enabled/default

Certificate renewal

Create a systemd service

[Unit]Description=Let’s Encrypt renewal[Service]Type=oneshotExecStart=/usr/bin/certbot renew —quiet —agree-tos —deploy-hook “systemctl reload nginx.service”

Create a timer

Make it run twice a day at random times to help reduce load on Let's Encrypt servers.

[Unit]Description=Twice daily renewal of Let’s Encrypt’s certificates[Timer]OnCalendar=0/12:00:00RandomizedDelaySec=1hPersistent=true[Install]

Start and enable the service

systemctl start certbot.timersystemctl enable certbot.timer


systemctl start nginxsystemctl enable nginx


Your website should now be live at