Kualo / docs
On this page

How to enable Redis cache via Unix socket on HumHub

Configure HumHub to use Redis cache via a Unix socket by editing two configuration files in your HumHub installation.

1 min read Updated 4 Jun 2026

Before making any changes to HumHub, you will need to enable your Redis instance in cPanel. Follow the instructions in Enable Redis Unix Socket to do that first.

Edit common.php

Open protected/config/common.php and update the cache component to use the Redis Unix socket:

return [
    'components' => [
        'cache' => [
            'class' => yii\redis\Cache::class,
            'defaultDuration' => 86400,
            'redis' => [
                'unixSocket' => '/home/USERNAME/.kxcache/redis.sock',
                'database' => 0,
            ],
        ],
    ],
];

Replace USERNAME with your cPanel username.

Check dynamic.php

Open protected/config/dynamic.php and confirm that:

  • There is no useApcu key defined for caching.
  • The cache entry under components uses the Redis Yii caching class, like this:
'cache' => [
    'class' => 'yii\\caching\\Redis',
    'keyPrefix' => 'humhub'
],

If useApcu is present, remove it or set it to false so that HumHub uses Redis rather than APCu for caching.

Was this helpful?
Your feedback helps us find gaps in the docs.
Still need a hand?
Real people, around the clock - start a chat or open a ticket and we'll help you put it right.