Problems moving the redis directory

The Basics

  • Nextcloud Server version (e.g., 29.x.x):
    • 31.0.7
  • Operating system and version (e.g., Ubuntu 24.04):
    • Armbian 25.5.2 bookworm
  • Web server and version (e.g, Apache 2.4.25):
    • Apache
  • PHP version (e.g, 8.3):
    • 8.3
  • Is this the first time you’ve seen this error? (Yes / No):
    • yes
  • When did this problem seem to first start?
    • today (after trying to move redis dir to external SSD)
  • Are you using CloudfIare, mod_security, or similar? (Yes / No)
    • no

Description

I use Nextcloudpi. Redis is on the SD card, but there isn’t much storage space. So I wanted to transfer Redis to the external drive. I did this as follows:

sudo systemctl stop redis-server
sudo mkdir -p /media/SSD/redis
sudo chown redis:redis /media/SSD/redis
sudo chmod 770 /media/SSD/redis
sudo nano /etc/redis/redis.conf

There, I changed the value of dir /var/lib/redis to dir /media/SSD/redis.

sudo systemctl start redis-server

Log entries

Nextcloud

{"reqId":"aIlb-dQ4QWeoKlUy7fhI6gAAAAg","level":3,"time":"2025-07-29T23:40:41+00:00","remoteAddr":"83.164.19.251","user":"ncp","app":"index","method":"GET","url":"/index.php/apps/files/preview-service-worker.js","message":"MISCONF Redis is configured to save RDB snapshots, but it's currently unable to persist to disk. Commands that may modify the data set are disabled, because this instance is configured to report errors during writes if RDB snapshotting fails (stop-writes-on-bgsave-error option). Please check the Redis logs for details about the RDB error.","userAgent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36","version":"31.0.7.1","exception":{"Exception":"RedisException","Message":"MISCONF Redis is configured to save RDB snapshots, but it's currently unable to persist to disk. Commands that may modify the data set are disabled, because this instance is configured to report errors during writes if RDB snapshotting fails (stop-writes-on-bgsave-error option). Please check the Redis logs for details about the RDB error.","Code":0,"Trace":[{"file":"/var/www/nextcloud/lib/private/Memcache/Redis.php","line":74,"function":"setex","class":"Redis","type":"->"},{"file":"/var/www/nextcloud/lib/private/Authentication/Token/PublicKeyTokenProvider.php","line":195,"function":"set","class":"OC\\Memcache\\Redis","type":"->"},{"file":"/var/www/nextcloud/lib/private/Authentication/Token/PublicKeyTokenProvider.php","line":158,"function":"cacheToken","class":"OC\\Authentication\\Token\\PublicKeyTokenProvider","type":"->"},{"file":"/var/www/nextcloud/lib/private/Authentication/Token/Manager.php","line":118,"function":"getToken","class":"OC\\Authentication\\Token\\PublicKeyTokenProvider","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/lib/private/User/Session.php","line":749,"function":"getToken","class":"OC\\Authentication\\Token\\Manager","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/lib/private/User/Session.php","line":209,"function":"validateToken","class":"OC\\User\\Session","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/lib/private/User/Session.php","line":184,"function":"validateSession","class":"OC\\User\\Session","type":"->"},{"file":"/var/www/nextcloud/lib/private/legacy/OC_App.php","line":184,"function":"getUser","class":"OC\\User\\Session","type":"->"},{"file":"/var/www/nextcloud/lib/private/App/AppManager.php","line":230,"function":"getEnabledApps","class":"OC_App","type":"::"},{"file":"/var/www/nextcloud/lib/private/legacy/OC_App.php","line":82,"function":"loadApps","class":"OC\\App\\AppManager","type":"->"},{"file":"/var/www/nextcloud/lib/private/legacy/OC_User.php","line":106,"function":"loadApps","class":"OC_App","type":"::"},{"file":"/var/www/nextcloud/lib/base.php","line":752,"function":"setupBackends","class":"OC_User","type":"::"},{"file":"/var/www/nextcloud/lib/base.php","line":1171,"function":"init","class":"OC","type":"::"},{"file":"/var/www/nextcloud/index.php","line":22,"args":["/var/www/nextcloud/lib/base.php"],"function":"require_once"}],"File":"/var/www/nextcloud/lib/private/Memcache/Redis.php","Line":74,"message":"MISCONF Redis is configured to save RDB snapshots, but it's currently unable to persist to disk. Commands that may modify the data set are disabled, because this instance is configured to report errors during writes if RDB snapshotting fails (stop-writes-on-bgsave-error option). Please check the Redis logs for details about the RDB error.","exception":{},"CustomMessage":"MISCONF Redis is configured to save RDB snapshots, but it's currently unable to persist to disk. Commands that may modify the data set are disabled, because this instance is configured to report errors during writes if RDB snapshotting fails (stop-writes-on-bgsave-error option). Please check the Redis logs for details about the RDB error."}}

Configuration

Nextcloud

[...]
  'redis' => 
  array (
    'host' => '/var/run/redis/redis-server.sock',
    'port' => 0,
    'timeout' => 0.0,
    'password' => '',
  ),
[...]

Afaik, you need to fix the Redis configuration itself. IT is not referring to the Nextcloud Redis configuration. Check-out the following postings for more details:

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.