Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion config/default.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ redis:
enable_tls: false
master_name: ''
sentinels:
- hostname: ''
- host: ''
port: 26379

# SMTP server to send emails
Expand Down
2 changes: 1 addition & 1 deletion config/production.yaml.example
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ redis:
enable_tls: false
master_name: ''
sentinels:
- hostname: ''
- host: ''
port: 26379

# SMTP server to send emails
Expand Down
2 changes: 1 addition & 1 deletion server/core/initializers/checker-before-init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ export function checkMissedConfig () {
[ // set
[ 'redis.hostname', 'redis.port' ], // alternative
[ 'redis.socket' ],
[ 'redis.sentinel.master_name', 'redis.sentinel.sentinels[0].hostname', 'redis.sentinel.sentinels[0].port' ]
[ 'redis.sentinel.master_name', 'redis.sentinel.sentinels[0].host', 'redis.sentinel.sentinels[0].port' ]
]
]
const miss: string[] = []
Expand Down
2 changes: 1 addition & 1 deletion server/core/initializers/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ const CONFIG = {
SENTINEL: {
ENABLED: config.has('redis.sentinel.enabled') ? config.get<boolean>('redis.sentinel.enabled') : false,
ENABLE_TLS: config.has('redis.sentinel.enable_tls') ? config.get<boolean>('redis.sentinel.enable_tls') : false,
SENTINELS: config.has('redis.sentinel.sentinels') ? config.get<{ hostname: string, port: number }[]>('redis.sentinel.sentinels') : [],
SENTINELS: config.has('redis.sentinel.sentinels') ? config.get<{ host: string, port: number }[]>('redis.sentinel.sentinels') : [],
MASTER_NAME: config.has('redis.sentinel.master_name') ? config.get<string>('redis.sentinel.master_name') : null
}
},
Expand Down
1 change: 1 addition & 0 deletions server/core/lib/redis.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ class Redis {
connectTimeout,
enableTLSForSentinelMode: CONFIG.REDIS.SENTINEL.ENABLE_TLS,
sentinelPassword: CONFIG.REDIS.AUTH,
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the admin should provide the password for each sentinel no? Because you can set a specific password for each of them?

Copy link
Contributor Author

@q0ntinuum q0ntinuum Jan 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using different password for each sentinel isn't recommended (from High availability with Valkey Sentinel (and redis has the exact same page which I guess Valkey copied)):

This means that you will have to configure the same requirepass password in all the Sentinel instances. This way every Sentinel can talk with every other Sentinel without any need to configure for each Sentinel the password to access all the other Sentinels, that would be very impractical.

But what could be interesting is providing a different password for sentinel and for redis.
I guess I can make somthing like config.redis.auth is used to connect to redis servers and add a new parameter config.redis.sentinel.auth used for sentinel connections.

Copy link
Owner

@Chocobozzz Chocobozzz Jan 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes please! Prefer config.redis.sentinel.password (we'll rename config.redis.auth to config.redis.password in the future)

password: CONFIG.REDIS.AUTH,
sentinels: CONFIG.REDIS.SENTINEL.SENTINELS,
name: CONFIG.REDIS.SENTINEL.MASTER_NAME,
...options
Expand Down