I am trying to install a new Nextcloud Server (27.1.3) and have found several Guides (in english and german), f.e. [1] and [2]. I am facing the Problem of continous error messages in the Nextcloud Log:
âRedis Exception. Wrongpass invalid Username-passwordâ from the Apps âCoreâ and âWebDavâ, resulting f.e. in an inabilty to delete files.
The reason seems to be the new security feature in Redis, starting with version 6, using ACLs for authentication. The âold wayâ using the ârequirepassâ-directive to set a password is mentioned as still valid for backwards-compatibility [3].
That is not the case in my setup, as i have the above mentioned errors.
Scenarios i tried:
Using the default settings in the nextcloud-config (âhostâ => â/var/run/redis/redis-server.sockâ, âportâ => 6379, âpasswordâ => âmy_passwordâ,) with the corresponding settings in the redis-config file
using the default settings in the nextcloud-config, but adding the user/password definitions as listed in â/nextcloud/config/config.sample.phpâ line 1449 and 1450 (âhostâ => â/var/run/redis/redis-server.sockâ, âportâ => 6379, âuserâ => âdefaultâ, âpasswordâ => âmy_passwordâ,)
switched zu unix domain sockets as mentioned in several guides and adapted the redis.config as well as the Nextcloud-config accordingly, f.e. (âhostâ => â/var/run/redis/redis-server.sockâ, âportâ => 0, âuserâ => âdefaultâ, âpasswordâ => âmy_passwordâ,)
additionally tried creating a user in redis via âredis-cliâ with the Name âdefaultâ and âmy_passwordâ and checked the credentials by logging into redis-cli with the username/password. It worked in redis-cli bit still produces errors within Nextcloud
Does anyone has a similar Problem with a new installation and suggestions what to try next?
â
[1] âExample installation on Ubuntu 22.04.03 LTS with Apache2, APCu, redis and mariadb behind a NGINX proxy, no Docker, no Snapâ
[2] âNextcloud auf Ubuntu Server 22.04 LTS mit nginx, PostgreSQL/MariaDB, PHP, Letâs Encrypt, Redis und Fail2banâ
I use Redis server v=7.2.3 and have no problems at all!
Why do you use password authentication? Is your redis-server not on the same box as your nextcloud, on a different server with its port 6379 exposed to the internet?
If your redis-server runs on the same box as your nextcloud, you should use unixsocket with port 0
If port 0 is specified, redis will not listen on a TCP socket, so it will not be exposed to any network. In that case you only have to add your webserver user to the redis group and your nextcloud can connect without any password authentication at all.
This is a configuration that works for all of my servers:
/etc/redis/redis.conf
bind 127.0.0.1 ::1
protected-mode no
port 0
unixsocket /run/redis/redis-server.sock
unixsocketperm 770
timeout 0
daemonize yes
pidfile /run/redis/redis-server.pid
thank you for your suggestions, unfortunatly they didnât help.
Some things to note:
the path to redis-server.sock and .pid is â/var/run/redis/â,
which is a symlink to â/run/redis/â. Maybe because of my distribution (Ubuntu 22.04 LTS)
The line " âmemcache.distributedâ => â\OC\Memcache\Redisâ," creates a Server error and produces the log-entry âERR AUTH called without any password configured for the default user. Are you sure your configuration is correct?â
So i had to omit that.
Other than these two issues i replicated your settings but still have the issue of not been able to delete files. Trying that produces the same error as in ä2 âERR AUTH called without any password configured for the default user. Are you sure your configuration is correct?â, but doesnât create a Server error.
Edit: i failed to mention that i upgraded to Redis 7.2.3 beforehand
www-data was a member of the redis group and there was no password setting in the redis.conf.
Unfortuntly that didnât solve the problem.
I have reinstalled the system and installed NC according to the guides i posted - this time it went through without a problem. I must have made an error durign my first install.