Gitea with redis cluster

Hi ,

I am setting up a gitea deployment in k8s environment. For session and cache I am using a external redis cluster .

The redis cluster is configured as a stateful set and has a headless service created to access it.

The connection uri for redis from gitea is configured as below ,


The settings work properly when the redis cluster is configured with single node.

When more than 1 node is configured , I am getting “500 Internal Server” error during login.

Logs from gitea pod

2024/04/06 07:01:13 …eb/routing/logger.go:102:func1() [I] router: completed GET / for, 200 OK in 3.8ms @ web/home.go:32(web.Home)
2024/04/06 07:01:15 …eb/routing/logger.go:102:func1() [I] router: completed GET /user/login?redirect_to=%2f for, 200 OK in 11.7ms @ auth/auth.go:141(auth.SignIn)
2024/04/06 07:01:17 …ers/web/auth/auth.go:312:handleSignInFull() [E] RegenerateSession: regenerate session: MOVED 8633
2024/04/06 07:01:17 …eb/routing/logger.go:102:func1() [I] router: completed POST /user/login for, 500 Internal Server Error in 66.4ms @ auth/auth.go:170(auth.SignInPost)

Is there any setting for redis cluster with multiple nodes.

With regard to Config Cheat Sheet | Gitea Documentation, you have to change the connection string slightly for a multi-node Redis cluster to


Note especially the redis+cluster. Does that help?

Actually I am trying to connect the redis instance via the headless service. Hence I am using only “redis” in the connection string.

But I also tried using redis+cluster in the connection string and there was no communication between gitea and redis cluster in that case.