schBenedikt
Posted on September 6, 2023
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!
(self-hosted.schächner.de)
But to do that, you first need Docker and then Docker-Compose.
sudo apt update
sudo apt upgrade
sudo apt install docker.io
sudo apt install docker-compose
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'
services:
ghost:
image: ghost:latest
restart: always
ports:
- 8089:2368
environment:
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ächner.de>"
mail__transport: "SMTP"
mail__options__host: "smtp.strato.de"
mail__options__port: 587
mail__options__auth__user: "your-mail"
mail__options__auth__pass: "your-password"
db:
image: mysql:8.0
restart: always
environment:
MYSQL_ROOT_PASSWORD: Schächner&Tech
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:
XXX.XXX.XXX.XX:8089
The website should be visible here.
To still be able to access it as an admin, you have to go to the following URL:
XXX.XXX.XXX.XX:8089/ghost
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!
Posted on September 6, 2023
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.