Redis cache in Nextcloud



Redis cache in Nextcloud

Redis cache in Nextcloud

In this video I show you how to setup Redis as cache for Nextcloud. Using an in-memory cache such as Redis improves overall performance of your Nextcloud instance.

This particular way of setting up Redis is not typical: Redis is configured to be accessible through a socket instead of the default TCP/IP port. This socket is then shared through a Docker volume.

LINKS

– Nextcloud docker-compose file with Redis’s configuration: https://codeberg.org/frnmst/ftutorials/src/branch/master/docs/content/server/includes/home/jobs/scripts/by-user/root/docker/nextcloud/docker-compose.yml
– Redis socket Systemd service on host that maps for Nextcloud in Docker: https://codeberg.org/frnmst/ftutorials/src/branch/master/docs/content/server/includes/home/jobs/services/by-user/root/redis-socket.service
– Official Nextcloud documentation about caching: https://doc.owncloud.com/server/next/admin_manual/configuration/server/caching_configuration.html#redis-performance-comparison-tcp-vs-socket

CHAPTERS

0:00 Intro
0:07 Explaining why Redis is on host
0:33 Redis TCP/IP vs socket
1:12 Redis installation on Debian GNU/Linux and reason to change default save location
1:47 Change Redis’s configuration file to use socket and save location
2:12 Change Redis’s Systemd file
2:24 Test Redis
2:42 Systemd service that creates a link to the original Redis socket to be used by the Nextcloud container
3:02 Get the user id in the nextcloud container
3:18 Update the docker-compose.yml file for Redis
3:28 Update the Nextcloud configuration file (config.php)
3:40 Checking if Redis is caching Nextcloud
3:57 Outtro

#nextcloud #redis #cache #socket