How to setup Ghost on Synology Docker
Ghost is one of the best simple to use blogging platforms out there.
Ghost has recently started to support MySQL and dropped support for SQLite.
Here's how you can set it up on Synology Docker.
Prerequisites
- Go to Package Center and install Docker
- Go to File stations and navigate to Docker folder
- Create two folders,
ghost-app
andghost-db
- Open Docker on Synology and select Registry tab
- Search for
Ghost
andMySQL
, download both withlatest
tag
- Buy me a drink on Ko-fi :)
Create MySQL Container
- Go to Container tab and Create a Container:
- Select Image: mysql
- Network: bridge
- Container Name: ghost-db
- Go to Advanced Settings
- Add the following Enviroment variables:
- MYSQL_ROOT_PASSWORD = mysqlrootpassword
- MYSQL_DATABASE = ghost
- MYSQL_USER = ghostuser
- MYSQL_PASSWORD = ghostpass
- Review, click Save, then Next
- Leave the Port settings as default, click Next
- Click Add Folder, navigate to the
ghost-db
folder - Add the mount path as
/var/lib/mysql
- Click Next and Done
Before you continue, be sure to check that the DB is ready. This should take ~5 mins.
While waiting, go to Prerequisites Step 6.
- Double-click the Container and go to Logs tab
- Look for the line that says
/usr/sbin/mysqld: ready for connections.
Create Ghost Container
- Go to Container tab and Create a Container:
- Select Image: ghost
- Network: bridge
- Container Name: ghost-app
- Enable auto-restart
- Go to Advanced Settings
- Add the following Enviroment variables:
- database__client = mysql
- database__connection__host = ghost-db
- database__connection__port = 3306
- database__connection__user = ghostuser
- database__connection__password = ghostpass
- database__connection__database = ghost
- url = http://[NAS IP Address]:2368
- Select Links tab and click Add
- Select the Container name that you've created for MySQL, eg. ghost-db
- Click Save, then Next
- Set the Local Port to
2368
, click Next - Click Add Folder, navigate to the
ghost-app
folder - Add the mount path as
/var/lib/ghost/content
- Click Next and Done
Go get a coffee and send me a tip as this will take at least 10 mins and if you go to your NAS IP Address with the port you've defined above on a browser, eg. http://192.168.1.10:2368
You'll be greeted a working in progress screen.
Once that is completed, go to /ghost
to begin the setup.