New security warnings upgrading from NC26 to NC27

redis is recommended for performance but if you are happy with your system nothing wrong to stay at this point.

ok thanks, just read that in the NC documentation.

I’m worried about breaking my installation as I don’t see instructions for Docker installs.

Is is safe to install this:
I would also need to figure out any PHP file mods.

I’m happy with the performance of NC27 under docker on a Pi4 so I may leave well enough alone.


yes adding redis is safe. see Docker .examples

Because of this Warning I installed Redis but the warning won’t disappear. Checked if Redis is getting input, but redid-cli monitor is not showing anything when I surf on my nextcloud instance.
Tried both with Unix socket as well as over TCP.

in my instance with working redis I see tons of redis logs only browsing through the interface…

there must b something wrong with your redis config…

Slowly I am getting the feeling the problem is my NGINX setting using a php-fpm socket.

This command, and it’s okay :slight_smile:

sudo -u www-data php /var/www/html/nextcloud/occ db:add-missing-indices

This adds only the missing indices, and does not solve the problem with the memcache.

Are you using nginx?

no - apache docker behind traefik

Turned out, installing php8.1-redis solved my problem… My bad, thought this is already installed.
Thx for your help!

1 Like

I installed redis today and edited the config.php file accordingly with file locking enabled… everything works fine and Nextcloud 27 seems a little snappier. All warnings are now gone from my Nextcloud install. Happy days.

After some tests, it seems that you should add these 2 lines in config.php to suppress the warning without needing to install and configure redis :

'memcache.local' => 'OC\\Memcache\\APCu',
'memcache.locking' => 'OC\\Memcache\\APCu',

The first is from nextcloud doc recommandations. The second make the warning go away.

1 Like

I agree, took me ages to suss that out. Adding the second line finally make the error message go away without the need to use Redis

sudo nano /var/www/nextcloud/config/config.php
‘memcache.local’ => ‘OC\Memcache\APCu’,
‘memcache.locking’ => ‘OC\Memcache\APCu’,

If you get a Cron error message
OCP\HintException: [0]: Memcache OC\Memcache\APCu not available for local cache (Is the matching PHP module installed and enabled?)

add apc.enable_cli=1 not to your php.ini file as this doesn’t seem to work but to your /etc/php/8.2/mods_available/apcu.ini file

Getting this after upgrading to 27.1.4. It seems redis, at least php-redis from debian repo updated lately with php8.3 required and Nextcloud isnt supporting php8.3.
When I run php occ files:scan --all
I get: “This version of Nextcloud is not compatible with PHP>=8.3”.
If I update webserver to use php8.3 instead of php8.2 it breaks the webui with the same error.
I used the memcache.locking to APCu workaround for now to suppress the warning even though redis was working before:

  'memcache.locking' => '\\OC\\Memcache\\APCu',
  //'memcache.locking' => '\\OC\\Memcache\\Redis',

php8.3 is supported as of Nextcloud 28.

Much luck,

I saw that, but I’ll stick with the APCu workaround until N28 is stable and then I’ll go back to using Redis.

you can set up redis in a docker container relatively easily. i have updated redis running separately from nextcloud and it works great

This can only happen if you haven’t installed a specific version of PHP while using the third-party repositories provided by Ondrej Sury.

Without the sury repos:

  • apt install php-redis will install the current version from the Debian repos and will not be automatically updated to a newer version during the lifetime of the distribution release.

With sury repos enabled:

  • apt install php-redis will install the latest version from the sury repos (currently 8.3) and will automatically be upgraded to a newer version (when available) by running apt full-upgrade.
  • apt install php8.2-redis will install version 8.2 and will not be automatically upgraded to a newer version.

So my recommendation is to always explicitly install a specific version, then you won’t get into a situation where your PHP packages get updated to a new version before Nextcloud fully supports it.

1 Like

Hey thanks. I installed that and reverted to using:

'memcache.locking' => '\\OC\\Memcache\\Redis',

and have no more warnings

1 Like