This step by step guide on how to setup Redis cache on Ghost covers deployment, configuration, and verification for Unraid Docker environments. Implementing Redis caching on Ghost dramatically improves page load times by storing frequently accessed content in memory.
Before you can setup Redis cache for Ghost on your Unraid server, you need to install the Redis container! Navigate to the Docker tab in Unraid and click Add Container.
Configure these settings:
Click Apply to create the container.
Well, I guess you are not going to be able to setup Redis cache for Ghost if you can’t find the IP address of Redis and Ghost containers. To find those IP addresses, in Unraid terminal or SSH:
docker inspect Redis | grep IPAddress
Note the IP address (e.g., 172.17.0.14). You’ll need this for Ghost configuration.
Test Ghost to Redis connectivity:
docker exec -it Ghost bash
node -e "require('net').connect(6379, '172.17.0.14', () => console.log('Connected to Redis')).on('error', (e) => console.log('Error:', e.message))"
Connected to Redis This should return “Connected to Redis“.
Navigate to Ghost appdata directory:
cd /mnt/user/appdata/ghost nano config.production.json
Add this configuration:
{
"url": "http://localhost:2368",
"server": {
"port": 2368,
"host": "::"
},
"mail": {
"transport": "Direct"
},
"logging": {
"transports": ["file", "stdout"]
},
"process": "systemd",
"paths": {
"contentPath": "/var/lib/ghost/content"
},
"caching": {
"adapter": "redis",
"redis": {
"host": "172.17.0.14",
"port": 6379,
"password": "",
"db": 0
}
}
}
Replace 172.17.0.14 with your Redis IP. Save with Ctrl+X, Y, Enter.
chown 1000:1000 /mnt/user/appdata/ghost/config.production.json chmod 644 /mnt/user/appdata/ghost/config.production.json
Verify permissions:
ls -lh /mnt/user/appdata/ghost/config.production.json
Should show -rw-r--r-- 1 1000 1000.
In Unraid Docker interface:
/var/lib/ghost/config.production.json/mnt/user/appdata/ghost/config.production.jsonGhost restarts automatically.
You can also specify variable to set the value, but it seem to have no effect for me, only the Config File settings seem to work, perhaps some Unraid issue or something I have that I cannot be bothered to find out now. Test and let me know.
Check Ghost logs in Unraid Docker tab (click Ghost icon → Logs) or via terminal:
docker logs Ghost --tail 50
Look for no Redis connection errors. Also verify that Ghost reads the config:
docker exec -it Ghost cat /var/lib/ghost/config.production.json
Check Redis has active Ghost connection:
docker exec -it Redis redis-cli CLIENT LIST
You should see Ghost’s IP (typically 172.17.0.10) in connected clients.
Check cached items:
docker exec -it Redis redis-cli DBSIZE
Visit your Ghost site, then run DBSIZE again. The number should increase.
Monitor cache activity:
docker exec -it Redis redis-cli MONITOR
Navigate your Ghost site and watch cache operations. Press Ctrl+C to stop.
Check cache statistics:
docker exec -it Redis redis-cli INFO stats
Look for keyspace_hits and keyspace_misses. More hits than misses indicates effective caching.
Check memory usage:
docker exec -it Redis redis-cli INFO memory | grep used_memory_human
The persistent configuration file ensures your Redis setup survives Ghost container updates, Unraid server restarts, and Docker service maintenance without manual reconfiguration. With database queries reduced by 60-80% and page load times improved by 40-60%, your Ghost installation now delivers faster content to visitors whilst reducing strain on your Unraid array.
You might ask, why Ghost and why am I writing this on my Wordpress blog? I run Ghost self-hosted on my Unraid server as it’s way more easier and lightweight than Wordpress. Ghost doens’t have that many plugins and support like Wordpress, but for a blog, it’s perfect and super fast. Will I be running Ghost for BMO site? If I knew about Ghost back in 2013, then yes… I would’ve setup my site on Ghost, it’s that good and slick. At that time, it was mostly Wordpress, Joomla. Drupal was there but there wasn’t enough documentations to setup it that easily.
Also, why Redis if it’s for few users only? Meh!, I just wanted to try it. Nothing serious but it was fun to try.
That’s it, Enjoy!