DEV Community

Cover image for How to install Ghost CMS
Benedikt Schächner for Technology Schächner

Posted on • Originally published at

How to install Ghost CMS

Ghost is a modern content management system - this means that you can host websites with it just like with WordPress. However, since it was only founded in 2013, you can imagine that there are not that many plugins & themes here. But for some themes you have to dig deep into your pocket and sometimes pay more than 100 euros for it.
Today we show you how you can easily install this with one command via Docker.

We would appreciate a like :heart and a comment!
Feel free to visit our Ghost page and register for exclusive newsletters to find out everything!

But to do that, you first need Docker and then Docker-Compose.

sudo apt update
sudo apt upgrade
sudo apt install
sudo apt install docker-compose

Enter fullscreen mode Exit fullscreen mode

Then we have to create a docker-compose.yml file – no matter where.sudo nano docker-compose.yml

This contains the following content. Note that the password and username should be changed for security reasons - the port can remain the same.
But what you have to change are the mail settings with which you then send e-mails.

version: '3.1'


    image: ghost:latest
    restart: always
      - 8089:2368

      database__client: mysql
      database__connection__host: db
      database__connection__user: root
      database__connection__password: Schächner&Tech
      database__connection__database: ghost
      url: http://localhost
      mail__from: "'Schächner' <server@schä>"
      mail__transport: "SMTP"
      mail__options__host: ""
      mail__options__port: 587
      mail__options__auth__user: "your-mail"
      mail__options__auth__pass: "your-password"

    image: mysql:8.0
    restart: always
      MYSQL_ROOT_PASSWORD: Schächner&Tech
Enter fullscreen mode Exit fullscreen mode

After saving that with ctrl+o and exiting with ctrl+x, we need our actual command:
sudo docker-compose up -d

That all starts the container.
If we now wait about 2 minutes and then open our IP address, then you have to specify the port after the IP address:

The website should be visible here.
To still be able to access it as an admin, you have to go to the following URL:

Here you create an admin account with which you can then write posts.
Do you have any questions, suggestions or requests?
Feel free to write everything in the comments!
Best regards and see you next time!

Top comments (0)