Skip to content

Commit 729fa85

Browse files
committed
Add REDIS_HOST_USER variable to specify a redis user
1 parent 85eb58a commit 729fa85

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

.config/redis.config.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
'memcache.locking' => '\OC\Memcache\Redis',
66
'redis' => array(
77
'host' => getenv('REDIS_HOST'),
8+
if (getenv('REDIS_HOST_USER')) { 'user' => getenv('REDIS_HOST_USER'), }
89
'password' => getenv('REDIS_HOST_PASSWORD_FILE') ? trim(file_get_contents(getenv('REDIS_HOST_PASSWORD_FILE'))) : (string) getenv('REDIS_HOST_PASSWORD'),
910
),
1011
);

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,7 @@ To use Redis for memory caching as well as PHP session storage, specify the foll
236236

237237
- `REDIS_HOST` (not set by default) Name of Redis container
238238
- `REDIS_HOST_PORT` (default: `6379`) Optional port for Redis, only use for external Redis servers that run on non-standard ports.
239+
- `REDIS_HOST_USER` (not set by default) Optional username for Redis, only use for external Redis servers that require a user.
239240
- `REDIS_HOST_PASSWORD` (not set by default) Redis password
240241

241242
Check the [Nextcloud documentation](https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/caching_configuration.html) for more information.

0 commit comments

Comments
 (0)