This will be short post how to install Ghost using docker image. It is really simple if you know how to do it, bet there are some pitfalls.

CMS

There are multiple CMS that can be used to create personal blog. Many of them are available for installing on Raspberry Pi. Most popular of them:

  • WordPress
  • Joomla
  • Drupal
  • Magento

WordPress takes more than 50 percents of market share. Most of websites are created using this CMS. These 4 systems are the most popular, but there are many more:

  • Blogger
  • Tumblr
  • Wix
  • Squarespace
  • MovableType
  • Ghost
  • SVBTLE

I have chosen Ghost because it seemed to me simple to use and install, it is free, open source, it is not so heavy as some other. Also I like it because it is not written using PHP language! Main language is Node.js. As you may notice this blog is based on Ghost.

Installation using Docker Compose

I think the most easiest way how to get Ghost on Raspberry Pi is by using Docker and Docker Compose. Docker installation process is described in one of previous posts. So, here are settings for yml file

 ghost-edgars:
        image: ghost
        container_name: ghost-edgars
        restart: unless-stopped
        ports:
            - 3001:2368
        environment:
            - PUID=1000
            - PGID=1000
            - TZ=Europe/Riga
            - url=https://some-domain.com
        volumes:
            - /home/pi/docker-volumes/ghost/edgars:/var/lib/ghost/content

Parameters

  • image - I am using official Ghost image from Docker hub - ghost.
  • ports - port used for Ghost container. I have chosen 3001 port, but this does not mean that users will open pages specifying port number. In previous post I have described how to use Nginx with Let's encrypt container to work as a proxy server. So I have settings in that container that allows user to be redirected from 443 port to 3001.
  • url - url of the blog. It is important parameter that will be used by Ghost to get home page address. Without it some links can lead to nowhere.
  • volumes - place where Ghost will store files.

Now can create container using command

docker-compose up -d

After several minutes Ghost will be ready and can be used by typing url that was specified in settings. If this url is not real, then on work computer should modify hosts file and specify ip address of Raspberry Pi and url. Something like this

192.168.0.100 edgars.eizvertins.com

Conclusion

After installing can start to configure Ghost blog. Administration page can be found by this address url_specified_in_settings/ghost. There can change theme, create pages, write posts, manage users, etc. User interface is logic and simple.