Synology: Install Ghost Blogging Using MySQL as Database

Synology Install Ghost Blogging Using MySQL as Database

Ghost is a free and open source blogging platform like WordPress and Grav. Ghost is written in JavaScript and distributed under the MIT License, designed to simplify the process of online publishing for individual bloggers as well as online publications. Ghost CMS is actually used by millions of people. The Ghost app is a powerful app for new-media creators to publish, share, and grow a business around their content. It comes with modern tools to build a website, publish content, send newsletters & offer paid subscriptions to members. In this step by step guide I will show you how to install Ghost with MySQL as database on your Synology NAS using Docker & Portainer. Note: If you want to install Ghost without MySQL as database, follow my other Ghost Installation guide.

💡Note: This guide works perfectly with the latest Ghost 6.0.9 release.

💡Note: Check out my guide on how to Install Ghost on Your UGREEN NAS.

STEP 1

Please Support My work by Making a Donation.

STEP 2

Install Portainer using my step by step guide. If you already have Portainer installed on your Synology NAS, skip this STEP. AttentionMake sure you have installed the latest Portainer version.

STEP 3

Make sure you have a synology.me Wildcard Certificate. Follow my guide to get a Wildcard Certificate. If you already have a synology.me Wildcard certificate, skip this STEP.

STEP 4

Go to Control Panel / Login Portal / Advanced Tab / click Reverse Proxy. Follow the instructions in the image below.

Ghost Synology NAS Set up 1 new 2023

STEP 5

Now click the “Create” button. Follow the instructions in the image below.

Ghost Synology NAS Set up 2 new 2023

STEP 6

After you click the Create button, the window below will open. Follow the instructions in the image below.

On the General area, set the Reverse Proxy Name description: type in Ghost. After that, add the following instructions:

Source:
Protocol: HTTPS
Hostname: ghost.yourname.synology.me
Port: 443

Check Enable HSTS

Destination:
Protocol: HTTP
Hostname: localhost
Port: 2368

Ghost Synology NAS Set up 3 new 2023

STEP 7

On the Reverse Proxy Rules click the Custom Header tab. Click Create and then, from the drop-down menu, click WebSocket. After you click on WebSocket, two Header Names and two Values will be automatically added. Click Save. Follow the instructions in the image below.

Synology Proxy WebSocket

STEP 8

Go to Control Panel / Network / Connectivity tab/ Check Enable HTTP/2 then click Apply. Follow the instructions in the image below.

Ghost Synology NAS Set up 4 new 2023

STEP 9

Go to Control Panel / Security / Advanced tab/ Check Enable HTTP Compression then click Apply. Follow the instructions in the image below.

Ghost Synology NAS Set up 5 new 2023

STEP 10

Go to File Station and open the docker folder. Inside the docker folder, create one new folder and name it ghost. Follow the instructions in the image below.
Note: Be careful to enter only lowercase, not uppercase letters.

Ghost Synology NAS Set up 6 new 2023

STEP 11

Now create one new folder inside the ghost folder that you created at STEP 10 and it db. Follow the instructions in the image below.
Note: Be careful to enter only lowercase, not uppercase letters.

Ghost Synology NAS Set up 7 new 2023

STEP 12

Follow my step by step guide on how to activate SMTP for your Gmail account. This step is mandatory. Note: If you don’t want to use the easiest way for SMTP with Google and you already have SMTP details from your own Mail Server, you can just skip this STEP and use your personalized email SMTP details instead.

STEP 13

Log into Portainer using your username and password. On the left sidebar in Portainer, click on Home then Live connect. Follow the instructions in the image below.

Portainer Add Stack NAS 1

On the left sidebar in Portainer, click on Stacks then + Add stack. Follow the instructions in the image below.

Portainer Add Stack NAS 2

STEP 14

In the Name field type in ghost. Follow the instructions in the image below.

Note: Copy Paste the code below in the Portainer Stacks Web editor.

services:
ghost-db:
image: mysql:8
container_name: Ghost-DB
hostname: ghost-db
security_opt:
- no-new-privileges:true
healthcheck:
test: mysqladmin -p$$MYSQL_ROOT_PASSWORD ping -h localhost
interval: 20s
start_period: 10s
timeout: 10s
retries: 3
environment:
- PUID=1026
- PGID=100
- TZ=Europe/Bucharest
- MYSQL_ROOT_PASSWORD=superpassword
- MYSQL_DATABASE=ghost
- MYSQL_USER=ghostuser
- MYSQL_PASSWORD=ghostpass
volumes:
- /volume1/docker/ghost/db:/var/lib/mysql:rw
restart: on-failure:5

ghost:
image: ghost:latest
container_name: Ghost
healthcheck:
test: timeout 10s bash -c ':> /dev/tcp/127.0.0.1/2368' || exit 1
interval: 10s
timeout: 5s
retries: 3
start_period: 90s
hostname: ghost
security_opt:
- no-new-privileges:true
user: 1026:100
environment:
database__client: mysql
database__connection__host: ghost-db
database__connection__user: ghostuser
database__connection__password: ghostpass
database__connection__database: ghost
url: https://ghost.yourname.synology.me
mail__transport: SMTP
mail__options__service: SMTP
mail__from: Your-own-gmail-address
mail__options__host: smtp.gmail.com
mail__options__port: 587
mail__options__auth__user: Your-own-gmail-address
mail__options__auth__pass: Your-own-app-password
NODE_ENV: production
volumes:
- /volume1/docker/ghost:/var/lib/ghost/content:rw
ports:
- 2368:2368
restart: on-failure:5
depends_on:
ghost-db:
condition: service_healthy
CLICK TO COPY 🐋

Note: Before you paste the code above in the Web editor area below, change the value numbers for PUID and PGID with your own values. (Follow my step by step guide on how to do this.)
Note: Before you paste the code above in the Web editor area below, change the value for TZ. (Select your current Time Zone from this list.)
Note: Before you paste the code above in the Web editor area below, change the value numbers for user with your own UID and GID values. (Follow my step by step guide on how to do this.1026 is my personal UID value and 100 is my personal GID value. You have to type in your own values.
Note: Before you paste the code above in the Web editor area below, change the value for url and type in your own synology.me DDNS with https:// at the beginning that you have previously created at STEP 6.
Note: Before you paste the code above in the Web editor area below, change the value for mail__from and type in your own Gmail address. Refer to STEP 12.
Note: Before you paste the code above in the Web editor area below, change the value for mail__options__auth__user and type in your own Gmail address. Refer to STEP 12.
Note: Before you paste the code above in the Web editor area below, change the value for mail__options__auth__pass and type in your own Gmail app password. Refer to STEP 12.

Ghost Synology NAS Set up 8 new 2029

STEP 15

Scroll down on the page until you see a button named Deploy the stack. Click on it. Follow the instructions in the image below. The installation process can take up to a few minutes. It will depend on your Internet speed connection.

Ghost Synology NAS Set up 9 new 2029

STEP 16

If everything goes right, you will see the following message at the top right of your screen: “Success Stack successfully deployed“.

Portainer Success Stack NAS

STEP 17

🟢Please Support My work by Making a Donation. Almost 99,9% of the people that install something using my guides forget to support my work, or just ignore STEP 1. I’ve been very honest about this aspect of my work since the beginning: I don’t run any ADS, I don’t require subscriptions, paid or otherwise, I don’t collect IPs, emails, and I don’t have any referral links from Amazon or other merchants. I also don’t have any POP-UPs or COOKIES. I have repeatedly been told over the years how much I have contributed to the community. It’s something I love doing and have been honest about my passion since the beginning. But I also Need The Community to Support me Back to be able to continue doing this work.

STEP 18

Please wait approximately 5 minutes for the installation to be completed. If you try to connect too soon, you will get an error page that says: We’ll be right back. We’re busy updating our site to give you the best experience, and will be back soon.

Now open your browser and type in https://ghost.yourname.synology.me/ghost In my case https://ghost.mariushosting.synology.me/ghost If everything goes right, you will see the Ghost installation page. Note: Don’t forget to add /ghost at the end of your DDNS to access your dashboard. Add your own Site title, your Full name, your Email address and choose a strong password. Click Create account & start publishing. Follow the instructions in the image below.

Ghost MySQL Synology NAS Set up 12

STEP 19

After the registration, you will get an email message. Check your Email. Follow the instructions in the image below.

Ghost Synology NAS Set up 11 new 2023

STEP 20

Start customizing your new Ghost website. Switch the theme to Dark. Click Customize your design. Follow the instructions in the image below.

Ghost MySQL Synology NAS Set up 13 new 2026

STEP 21

Add your own logosite descriptionicon and cover then click Save at the top right of the page. Click View site to view your live website. Follow the instructions in the image below.

Ghost MySQL Synology NAS Set up 14 new 2026

STEP 22

Your live website at a glance!

Ghost MySQL Synology NAS Set up 15 new 2026

STEP 23

Your first post at a glance!

Ghost MySQL Synology NAS Set up 16 new 2026

🆘TROUBLESHOOTING

Note: Your live website will be at https://ghost.yourname.synology.me and your administrator dashboard will be at https://ghost.yourname.synology.me/ghost
Note
: Can I run Docker on my Synology NAS? See the supported models.
NoteHow to Back Up Docker Containers on your Synology NAS.
Note: Find out how to update the Ghost container with the latest image.
NoteHow to Free Disk Space on Your NAS if You Run Docker.
Note: You can also use your own domain name, but in this case there are some additional STEPS needed, so it’s better to contact me.
NoteHow to Schedule Start & Stop For Docker Containers.
NoteHow to Activate Email Notifications.
NoteHow to Add Access Control Profile on Your NAS.
NoteHow to Change Docker Containers Restart Policy.
NoteHow to Use Docker Containers With VPN.
NoteConvert Docker Run Into Docker Compose.
NoteHow to Clean Docker.
NoteHow to Clean Docker Automatically.
NoteBest Practices When Using Docker and DDNS.
NoteSome Docker Containers Need WebSocket.
NoteFind out the Best NAS Models For Docker.
NoteActivate Gmail SMTP For Docker Containers.

This post was updated on Tuesday / September 16th, 2025 at 1:21 PM

🧡 I Need Your Help!