# Can't access nextcloud after setting up redis

**URL:** <https://help.nextcloud.com/t/cant-access-nextcloud-after-setting-up-redis/118233>\
**Category:** ℹ️ Support\
**Tags:** redis, nc21\
**Created:** [June 11, 2021, 6:21pm UTC](https://help.nextcloud.com/t/cant-access-nextcloud-after-setting-up-redis/118233 "2021-06-11T18:21:53Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![notmike](https://help.nextcloud.com/letter_avatar/notmike/32/5_5575768a8748004e209b776fc1b2916d.png) [@notmike](https://help.nextcloud.com/u/notmike)\
**Post date:** [June 11, 2021, 6:21pm UTC](https://help.nextcloud.com/t/cant-access-nextcloud-after-setting-up-redis/118233/1 "2021-06-11T18:21:53Z")

</div>

> **Support intro**
>
> posted this on “installation” section, didn’t notice a support section until now  
> i’m new to nextcloud. Almost done setting up a fresh nextcloud 21 until i reached redis.
> 
> I followed [this guide](https://www.linuxbabe.com/ubuntu/install-nextcloud-ubuntu-20-04-nginx-lemp-stack) for my nextcloud installation
> 
> for the redis setup, i initially followed [this guide](https://bayton.org/docs/nextcloud/installing-nextcloud-on-ubuntu-16-04-lts-with-redis-apcu-ssl-apache/#6-2-enable-caching), but realized my nextcloud installation guide also have a redis section, so I undo everything i did (except the permission), and went back to the redis section in my first nextcloud installation guide.
> 
> thank you for the help. I’m extremely puzzled…

Nextcloud version _(eg, 20.0.5)_: `21.0.2`  
Operating system and version _(eg, Ubuntu 20.04)_: `ubuntu 21.04`  
Apache or nginx version _(eg, Apache 2.4.25)_: `nginx 1.18`  
PHP version _(eg, 7.4)_: `7.4 (I do have other versions installed)`

The issue you are facing:  
after setting up redis, my nextcloud server suddenly has a error message:

```auto
Internal Server Error

The server encountered an internal error and was unable to complete your request.
Please contact the server administrator if this error reappears multiple times, please include the technical details below in your report.
More details can be found in the server log.

```

Is this the first time you’ve seen this error? _(Y/N)_:  
yes

Steps to replicate it:

1. setup nextcloud normally using [this guide](https://www.linuxbabe.com/ubuntu/install-nextcloud-ubuntu-20-04-nginx-lemp-stack) until you reaches Redis setup.

2. open the Redis configuration file at `/etc/redis/redis.conf` use command `sudo nano /etc/redis/redis.conf`

3. change port 6379 to port 0, uncomment`unixsocket /var/run/redis/redis.sock` and `unixsocketperm 700` then change `unixsocketperm 700`to `unixsocketperm 770`

4. save and quit, then add the user `www-data` to the `redis` group by using the command: ’ `sudo usermod -a -G redis www-data`’

5. After this i realized i’m using nginx instead of Apache, so i went back to my original guide for redis setup. and undo everything i did except the permission.

6. Comment `unixsocket /var/run/redis/redis.sock` and `unixsocketperm 770`

7. change port 0 to port 6379

8. using the original guide i used NC installation. edit nextCloud configuration file by using command “sudo nano /usr/share/nginx/nextcloud/config/config.php”

9. add the following code to the ending `);` line.

```auto
'memcache.distributed' => '\OC\Memcache\Redis',
'memcache.local' => '\OC\Memcache\Redis',
'memcache.locking' => '\OC\Memcache\Redis',
'redis' => array(
     'host' => 'localhost',
     'port' => 6379,
     ),

```

1. Save and close the file. Then restart Nginx and PHP-FPM using command “sudo systemctl restart nginx php7.4-fpm”

2. now go back to the NC webpage, a the internal error is there.

The output of your Nextcloud error.log

```auto
2021/06/10 18:33:30 [crit] 192871#192871: *3372 SSL_do_handshake() failed (SSL: error:141CF06C:SSL routines:tls_parse_ctos_key_share:bad key share) while SSL handshaking, client: 35.203.252.150, server: 0.0.0.0:443

2021/06/10 18:38:02 [crit] 192871#192871: *3460 SSL_do_handshake() failed (SSL: error:141CF06C:SSL routines:tls_parse_ctos_key_share:bad key share) while SSL handshaking, client: 35.203.252.118, server: 0.0.0.0:443

2021/06/10 20:03:43 [error] 193335#193335: *5006 access forbidden by rule, client: 45.146.165.123, server: raid1.duckdns.org, request: "GET /console/ HTTP/1.1", host: "207.38.189.168:443"

2021/06/10 20:12:35 [error] 203863#203863: *5136 access forbidden by rule, client: 192.168.1.1, server: raid1.duckdns.org, request: "GET /.well-known/webfinger HTTP/2.0", host: "raid1.duckdns.org"

2021/06/10 20:12:35 [error] 203863#203863: *5136 access forbidden by rule, client: 192.168.1.1, server: raid1.duckdns.org, request: "GET /.well-known/nodeinfo HTTP/2.0", host: "raid1.duckdns.org"

```

The output of your config.php file in `/path/to/nextcloud` (make sure you remove any identifiable information!):

```auto
<?php
$CONFIG = array (
  'instanceid' => 'redacted',
  'passwordsalt' => 'redacted',
  'secret' => 'redacted',
  'trusted_domains' =>
  array (
    0 => 'redacted',
  ),
  'datadirectory' => '/mnt/raid1/nextcloud-data/',
  'dbtype' => 'mysql',
  'version' => '21.0.2.1',
  'overwrite.cli.url' => 'redacted',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'redacted',
  'dbpassword' => 'redacted',
  'installed' => true,

  'memcache.distributed' => '\\OC\\Memcache\\Redis',
  'memcache.local' => '\\OC\\Memcache\\Redis',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'redis' => array(
     'host' => 'localhost',
     'port' => 6379,
     ),
);

```

The output of your Apache/nginx/system log in `/var/log/ ____ `:

```auto
nothing in there. is there a way to check error history? or is everything just in one log

```

What i’v tried

- add an extra \ to the redis config
- double check on my ufw firewall setting regarding port 6379
- double check on my portfowarding on router regarding port 6379
- uninstall and reinstall of redis-server

---

<div class="post-metadata">

**Author:** ![Steel\_PC](https://help.nextcloud.com/user_avatar/help.nextcloud.com/steel_pc/32/17736_2.png) [@Steel\_PC](https://help.nextcloud.com/u/Steel_PC)\
**Post date:** [June 11, 2021, 9:11pm UTC](https://help.nextcloud.com/t/cant-access-nextcloud-after-setting-up-redis/118233/2 "2021-06-11T21:11:57Z")

</div>

Point 3 might be your problem. You’re not running redis on port 6379 but as socket. So your config file should be the following.

‘redis’ =\>  
array (  
‘host’ =\> ‘/var/run/redis/redis.sock’,  
‘port’ =\> 0,  
),’

---

<div class="post-metadata">

**Author:** ![notmike](https://help.nextcloud.com/letter_avatar/notmike/32/5_5575768a8748004e209b776fc1b2916d.png) [@notmike](https://help.nextcloud.com/u/notmike)\
**Post date:** [June 11, 2021, 9:21pm UTC](https://help.nextcloud.com/t/cant-access-nextcloud-after-setting-up-redis/118233/3 "2021-06-11T21:21:08Z")

</div>

I undo everything i did, see point 5,6,7

---

<div class="post-metadata">

**Author:** ![Tamsy](https://help.nextcloud.com/user_avatar/help.nextcloud.com/tamsy/32/2081_2.png) [@Tamsy](https://help.nextcloud.com/u/Tamsy)\
**Post date:** [June 12, 2021, 8:47am UTC](https://help.nextcloud.com/t/cant-access-nextcloud-after-setting-up-redis/118233/4 "2021-06-12T08:47:11Z")

</div>

Try the following.

Check through CLI whether the Redis server is up and is accepting connections to its socket on port 6379 (assuming for all the below that you have no password set):

`sudo redis-cli -h 127.0.0.1 -p 6379`  
shows:  
_redis 127.0.0.1:6379\>_

Type: **ping**  
The answer should be: **PONG**

Leave Redis-console by typing: **quit**

If Redis doesn’t give you the “Pong” something is wrong with your redis-configuration.

If you get back that “PONG” make sure you have in NC’s config:

--------------- 8\< ---------------

```auto
  'redis' => 
  array (
    'host' => 'localhost',
    'port' => 6379,
    'timeout' => 0,
    'dbindex' => 0,
  ),

```

--------------- \>8 ---------------

Now:  
`sudo chown -R redis.www-data /var/run/redis`

And finally:  
Restart the Redis server.

Does it work now?

---

<div class="post-metadata">

**Author:** ![bb77](https://help.nextcloud.com/letter_avatar/bb77/32/5_5575768a8748004e209b776fc1b2916d.png) [@bb77](https://help.nextcloud.com/u/bb77)\
**Post date:** [June 12, 2021, 10:31am UTC](https://help.nextcloud.com/t/cant-access-nextcloud-after-setting-up-redis/118233/5 "2021-06-12T10:31:31Z")

</div>

Hi @notmike

If you run redis on the same server as your nextcloud there is really no need to run it on a dedicated port and open that port to the whole world.

## Remove redis including the config files

```
apt purge redis-server

```

## Install packages again

```
apt install redis-server php7.4-redis

```

## Configure Redis

Backup the Redis configuration file:

```auto
cp /etc/redis/redis.conf /etc/redis/redis.conf.bak

```

Adjust the configuration:

```auto
sed -i "s/port 6379/port 0/" /etc/redis/redis.conf

```

```auto
sed -i s/\#\ unixsocket/\unixsocket/g /etc/redis/redis.conf

```

```auto
sed -i "s/unixsocketperm 700/unixsocketperm 770/" /etc/redis/redis.conf

```

```auto
sed -i "s/# maxclients 10000/maxclients 512/" /etc/redis/redis.conf

```

```auto
usermod -aG redis www-data

```

## Configure it in the config.php

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

```

It is working like this on my instance like a charm for years. Alltough I have to say that I use apcu for local memchache. My config in the config.php looks like this…

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

```

…but I see no reason why it should not work with

```
'memcache.local' => '\OC\Memcache\Redis',

```

---

<div class="post-metadata">

**Author:** ![notmike](https://help.nextcloud.com/letter_avatar/notmike/32/5_5575768a8748004e209b776fc1b2916d.png) [@notmike](https://help.nextcloud.com/u/notmike)\
**Post date:** [June 18, 2021, 9:36pm UTC](https://help.nextcloud.com/t/cant-access-nextcloud-after-setting-up-redis/118233/6 "2021-06-18T21:36:10Z")

</div>

@Tamsy  
It does not work

I followed what you instructed:  
it answered: PONG

changed my redi config in nginx:

‘memcache.distributed’ =\> ‘\OC\Memcache\Redis’,  
‘memcache.local’ =\> ‘\OC\Memcache\Redis’,  
‘memcache.locking’ =\> ‘\OC\Memcache\Redis’,  
‘redis’ =\> array(  
‘host’ =\> ‘localhost’,  
‘port’ =\> 6379,  
‘timeout’ =\> 0,  
‘dbindex’ =\> 0,  
),

executed sudo chown -R redis.www-data /var/run/redis  
restarted redis server via command 'sudo systemctl restart redis-server

the error persists.

---

<div class="post-metadata">

**Author:** ![notmike](https://help.nextcloud.com/letter_avatar/notmike/32/5_5575768a8748004e209b776fc1b2916d.png) [@notmike](https://help.nextcloud.com/u/notmike)\
**Post date:** [June 18, 2021, 9:36pm UTC](https://help.nextcloud.com/t/cant-access-nextcloud-after-setting-up-redis/118233/7 "2021-06-18T21:36:50Z")

</div>

Thank you @bb77 this fixed it!

---

<div class="post-metadata">

**Author:** ![notmike](https://help.nextcloud.com/letter_avatar/notmike/32/5_5575768a8748004e209b776fc1b2916d.png) [@notmike](https://help.nextcloud.com/u/notmike)\
**Post date:** [June 18, 2021, 9:37pm UTC](https://help.nextcloud.com/t/cant-access-nextcloud-after-setting-up-redis/118233/8 "2021-06-18T21:37:25Z")

</div>

This has been solved, I appreciate everyone’s help!

---

<div class="post-metadata">

**Author:** ![robnicholsonmalt](https://help.nextcloud.com/user_avatar/help.nextcloud.com/robnicholsonmalt/32/42231_2.png) [@robnicholsonmalt](https://help.nextcloud.com/u/robnicholsonmalt)\
**Post date:** [August 6, 2023, 5:08pm UTC](https://help.nextcloud.com/t/cant-access-nextcloud-after-setting-up-redis/118233/9 "2023-08-06T17:08:20Z")

</div>

> [@bb77](#):
>
> `apt install redis-server php7.4-redis`

Battling to get Redis working on Centos 7 with Nginx. I’ll keep going! This post is two years old but gives some kind of indication about what one needs to do.

---

<div class="post-metadata">

**Author:** ![grosJambon33000](https://help.nextcloud.com/letter_avatar/grosjambon33000/32/5_5575768a8748004e209b776fc1b2916d.png) [@grosJambon33000](https://help.nextcloud.com/u/grosJambon33000)\
**Post date:** [October 15, 2023, 5:41pm UTC](https://help.nextcloud.com/t/cant-access-nextcloud-after-setting-up-redis/118233/10 "2023-10-15T17:41:11Z")

</div>

I re-open this thread because i’ve tried your solution but it still not work. Internal server error when loading the NC page.

Here is my config.php :

```auto
'memcache.local' => '\OC\Memcache\Redis',
'memcache.locking' => '\OC\Memcache\Redis',
'redis' =>
  array (
    'host' => '/var/run/redis/redis-server.sock',
    'port' => 0,
    'timeout' => 0.0,
  ),

```

When i comment that part in the config file then i can access again to my interface.

i’m on debian 11 with NC 27.

thanks in advance for your help

---

<div class="post-metadata">

**Author:** ![bb77](https://help.nextcloud.com/letter_avatar/bb77/32/5_5575768a8748004e209b776fc1b2916d.png) [@bb77](https://help.nextcloud.com/u/bb77)\
**Post date:** [October 16, 2023, 4:50am UTC](https://help.nextcloud.com/t/cant-access-nextcloud-after-setting-up-redis/118233/11 "2023-10-16T04:50:39Z")

</div>

Not sure why it doesn’t work for you, but here’s a few things you could check…

- Check if the Redis server installed and the Redis service is running:

- Check if the appropriate PHP module is installed and enabled?

- Check the config file `/etc/redis/redis.conf,` especially the following lines:

- Check if the www-data user is in the redis group

---

<div class="post-metadata">

**Author:** ![grosJambon33000](https://help.nextcloud.com/letter_avatar/grosjambon33000/32/5_5575768a8748004e209b776fc1b2916d.png) [@grosJambon33000](https://help.nextcloud.com/u/grosJambon33000)\
**Post date:** [October 17, 2023, 5:14pm UTC](https://help.nextcloud.com/t/cant-access-nextcloud-after-setting-up-redis/118233/12 "2023-10-17T17:14:56Z")

</div>

> [@bb77](#):
>
> `systemctl status redis.service`

it’s active, running and enabled.

* * *

> [@bb77](#):
>
> `apt list php*-redis`

the one with [installed] at the end of the line is this one :

- php8.1-redis/bullseye,now 6.0.1-1+0~20231006.53+debian11~1.gbpe91da2 amd64

* * *

> [@bb77](#):
>
> `php --ri redis`

redis

Redis Support =\> enabled  
Redis Version =\> 6.0.1  
Redis Sentinel Version =\> 1.0  
Available serializers =\> php, json, igbinary  
Available compression =\> lzf, zstd, lz4

Directive =\> Local Value =\> Master Value  
redis.arrays.algorithm =\> no value =\> no value  
redis.arrays.auth =\> no value =\> no value  
redis.arrays.autorehash =\> 0 =\> 0  
redis.arrays.connecttimeout =\> 0 =\> 0  
redis.arrays.distributor =\> no value =\> no value  
redis.arrays.functions =\> no value =\> no value  
redis.arrays.hosts =\> no value =\> no value  
redis.arrays.index =\> 0 =\> 0  
redis.arrays.lazyconnect =\> 0 =\> 0  
redis.arrays.names =\> no value =\> no value  
redis.arrays.pconnect =\> 0 =\> 0  
redis.arrays.previous =\> no value =\> no value  
redis.arrays.readtimeout =\> 0 =\> 0  
redis.arrays.retryinterval =\> 0 =\> 0  
redis.arrays.consistent =\> 0 =\> 0  
redis.clusters.cache\_slots =\> 0 =\> 0  
redis.clusters.auth =\> no value =\> no value  
redis.clusters.persistent =\> 0 =\> 0  
redis.clusters.read\_timeout =\> 0 =\> 0  
redis.clusters.seeds =\> no value =\> no value  
redis.clusters.timeout =\> 0 =\> 0  
redis.pconnect.pooling\_enabled =\> 1 =\> 1  
redis.pconnect.connection\_limit =\> 0 =\> 0  
redis.pconnect.echo\_check\_liveness =\> 1 =\> 1  
redis.pconnect.pool\_detect\_dirty =\> 0 =\> 0  
redis.pconnect.pool\_poll\_timeout =\> 0 =\> 0  
redis.pconnect.pool\_pattern =\> no value =\> no value  
redis.session.locking\_enabled =\> 0 =\> 0  
redis.session.lock\_expire =\> 0 =\> 0  
redis.session.lock\_retries =\> 100 =\> 100  
redis.session.lock\_wait\_time =\> 20000 =\> 20000  
redis.session.early\_refresh =\> 0 =\> 0

* * *

> [@bb77](#):
>
> `cat /etc/redis/redis.conf | grep -v '^$\|^#'`

bind 127.0.0.1 ::1  
protected-mode yes  
port 0  
tcp-backlog 511  
unixsocket /var/run/redis/redis-server.sock  
unixsocketperm 770  
timeout 0  
tcp-keepalive 300  
daemonize yes  
supervised no  
pidfile /var/run/redis/redis-server.pid  
loglevel notice  
logfile /var/log/redis/redis-server.log  
databases 16  
always-show-logo yes  
save 900 1  
save 300 10  
save 60 10000  
stop-writes-on-bgsave-error yes  
rdbcompression yes  
rdbchecksum yes  
dbfilename dump.rdb  
rdb-del-sync-files no  
dir /var/lib/redis  
replica-serve-stale-data yes  
replica-read-only yes  
repl-diskless-sync no  
repl-diskless-sync-delay 5  
repl-diskless-load disabled  
repl-disable-tcp-nodelay no  
replica-priority 100  
acllog-max-len 128  
maxclients 512  
lazyfree-lazy-eviction no  
lazyfree-lazy-expire no  
lazyfree-lazy-server-del no  
replica-lazy-flush no  
lazyfree-lazy-user-del no  
oom-score-adj no  
oom-score-adj-values 0 200 800  
appendonly no  
appendfilename “appendonly.aof”  
appendfsync everysec  
no-appendfsync-on-rewrite no  
auto-aof-rewrite-percentage 100  
auto-aof-rewrite-min-size 64mb  
aof-load-truncated yes  
aof-use-rdb-preamble yes  
lua-time-limit 5000  
slowlog-log-slower-than 10000  
slowlog-max-len 128  
latency-monitor-threshold 0  
notify-keyspace-events “”  
hash-max-ziplist-entries 512  
hash-max-ziplist-value 64  
list-max-ziplist-size -2  
list-compress-depth 0  
set-max-intset-entries 512  
zset-max-ziplist-entries 128  
zset-max-ziplist-value 64  
hll-sparse-max-bytes 3000  
stream-node-max-bytes 4096  
stream-node-max-entries 100  
activerehashing yes  
client-output-buffer-limit normal 0 0 0  
client-output-buffer-limit replica 256mb 64mb 60  
client-output-buffer-limit pubsub 32mb 8mb 60  
hz 10  
dynamic-hz yes  
aof-rewrite-incremental-fsync yes  
rdb-save-incremental-fsync yes  
jemalloc-bg-thread yes

* * *

> [@bb77](#):
>
> `groups www-data`

i’ve checked and it is in the redis group.

Thanks for your help

---

<div class="post-metadata">

**Author:** ![grosJambon33000](https://help.nextcloud.com/letter_avatar/grosjambon33000/32/5_5575768a8748004e209b776fc1b2916d.png) [@grosJambon33000](https://help.nextcloud.com/u/grosJambon33000)\
**Post date:** [October 20, 2023, 1:22pm UTC](https://help.nextcloud.com/t/cant-access-nextcloud-after-setting-up-redis/118233/13 "2023-10-20T13:22:08Z")

</div>

Any help ?

---

<div class="post-metadata">

**Author:** ![jtr](https://help.nextcloud.com/letter_avatar/jtr/32/5_5575768a8748004e209b776fc1b2916d.png) [@jtr](https://help.nextcloud.com/u/jtr)\
**Post date:** [October 20, 2023, 1:25pm UTC](https://help.nextcloud.com/t/cant-access-nextcloud-after-setting-up-redis/118233/14 "2023-10-20T13:25:58Z")

</div>

> [@grosJambon33000](#):
>
> Internal server error when loading the NC page.

Can you share a few log entries from your `nextcloud.log` from the period when you saw 500 errors?

---

<div class="post-metadata">

**Author:** ![bb77](https://help.nextcloud.com/letter_avatar/bb77/32/5_5575768a8748004e209b776fc1b2916d.png) [@bb77](https://help.nextcloud.com/u/bb77)\
**Post date:** [October 20, 2023, 2:16pm UTC](https://help.nextcloud.com/t/cant-access-nextcloud-after-setting-up-redis/118233/15 "2023-10-20T14:16:14Z")

</div>

> [@grosJambon33000](#):
>
> Any help ?

Sorry for the late reply, I compared your config and the php-redis package with my test server and everything seems to be identical. The only difference is that I have PHP 8.2 installed. In this context, you could check whether the active PHP version on your system and the php-redis package are on the same version.

Another reason for the internal server error could be some app that is not compatible with Redis. However, I can’t think of any specific app that is known for this, so I’m not sure.

Other than that, I’m running out of ideas, sorry…

---

<div class="post-metadata">

**Author:** ![grosJambon33000](https://help.nextcloud.com/letter_avatar/grosjambon33000/32/5_5575768a8748004e209b776fc1b2916d.png) [@grosJambon33000](https://help.nextcloud.com/u/grosJambon33000)\
**Post date:** [October 20, 2023, 2:43pm UTC](https://help.nextcloud.com/t/cant-access-nextcloud-after-setting-up-redis/118233/16 "2023-10-20T14:43:52Z")

</div>

So really weird behaviour just happened…

I went back to my config.php to uncomment the lines regarding redis to then check the logs.  
The few lines were gone, not even commented, just gone.  
So i put them again (without the #) to load the 500 error.  
But when i came back to my instance, i could access it and no more message regarding redis in administration panel.  
Really weird.  
So i guess my problem is solved.  
Thanks guys for the help 🙂

---

<div class="post-metadata">

**Author:** ![droid001](https://help.nextcloud.com/letter_avatar/droid001/32/5_5575768a8748004e209b776fc1b2916d.png) [@droid001](https://help.nextcloud.com/u/droid001)\
**Post date:** [November 6, 2023, 10:35pm UTC](https://help.nextcloud.com/t/cant-access-nextcloud-after-setting-up-redis/118233/17 "2023-11-06T22:35:22Z")

</div>

> [@grosJambon33000](#):
>
> i’m on debian 11 with NC 27

@grosJambon33000 @bb77 I’m on a similar system and am getting an Internal Server error when activating Redis for ‘memcache.distributed’. My config file:

```auto
  'memcache.distributed' => '\OC\Memcache\Redis',
  'memcache.locking' => '\OC\Memcache\Redis',
  'redis' => array(
     'host' => '/var/run/redis/redis.sock',
     'port' => 0,
     'timeout' => 0.0,
   ),

```

Furthermore I get the following errors in the admin log:

```auto
[PHP] Error: RedisException: No such file or directory at /var/www/nextcloud/lib/private/RedisFactory.php#137

PUT /ocs/v2.php/apps/user_status/api/v1/heartbeat?format=json
from 185.65.135.192 by Linus at 2023-11-06T21:57:17+00:00

RedisException: No such file or directory
RedisException: Redis server went away
...

```

I can also add that I’m migrating from a ncp instance to a manual installation. Any ideas why Redis would be crashing for some user\_status api call?

---

<div class="post-metadata">

**Author:** ![bb77](https://help.nextcloud.com/letter_avatar/bb77/32/5_5575768a8748004e209b776fc1b2916d.png) [@bb77](https://help.nextcloud.com/u/bb77)\
**Post date:** [November 7, 2023, 5:44am UTC](https://help.nextcloud.com/t/cant-access-nextcloud-after-setting-up-redis/118233/18 "2023-11-07T05:44:42Z")

</div>

Try to replace `'host' => '/var/run/redis/redis.sock',` with:

```auto
'host' => '/var/run/redis/redis-server.sock',

```

…in your `config.php`.

If it still doesn’t work please double check everything I posted [here](https://help.nextcloud.com/t/cant-access-nextcloud-after-setting-up-redis/118233/11).

---

<div class="post-metadata">

**Author:** ![droid001](https://help.nextcloud.com/letter_avatar/droid001/32/5_5575768a8748004e209b776fc1b2916d.png) [@droid001](https://help.nextcloud.com/u/droid001)\
**Post date:** [November 7, 2023, 7:37am UTC](https://help.nextcloud.com/t/cant-access-nextcloud-after-setting-up-redis/118233/19 "2023-11-07T07:37:13Z")

</div>

Thanks @bb77! That was the solution to my problem. 👍

---

<div class="post-metadata">

**Author:** ![tenkara](https://help.nextcloud.com/letter_avatar/tenkara/32/5_5575768a8748004e209b776fc1b2916d.png) [@tenkara](https://help.nextcloud.com/u/tenkara)\
**Post date:** [December 28, 2023, 5:04pm UTC](https://help.nextcloud.com/t/cant-access-nextcloud-after-setting-up-redis/118233/20 "2023-12-28T17:04:52Z")

</div>

Hello,

I recently setup a new NC instance, this is my fifth instance in two years and this is the first time I’ve ever seen this error occur.

I am using the following:  
Server: Ubuntu 22.04.3  
NC version: 28.0.1  
Apache2: 2.4.52  
PHP version: 8.1.2

Whenever I uncomment `'memcache.distributed' => '\OC\Memcache\Redis',`, I get the exact same error as the OP. I have followed everything in [post 5](https://help.nextcloud.com/t/cant-access-nextcloud-after-setting-up-redis/118233/5) and in [post 11](https://help.nextcloud.com/t/cant-access-nextcloud-after-setting-up-redis/118233/11) and I still get the same error. As soon as I comment it out again, access is restored.

Within my logs, I see the following odd errors that I’ve never seen before.

PHP error `RedisException: No such file or directory at /var/www/nextcloud/lib/private/RedisFactory.php#117`  
and  
Index error `RedisException No such file or directory`  
and  
Core error `RedisException No such file or directory Exception thrown: RedisException`  
and  
Core error `RedisException Redis server went away Exception thrown: RedisException`

All above errors always occur in unison.

I’m trying to get this setup for a small business owner that wanted it done before the holidays, so any and all help and recommendations are greatly appreciated.

Cheers.

[Next page](https://help.nextcloud.com/t/cant-access-nextcloud-after-setting-up-redis/118233.md?page=2)
