Why am I always signed out from self-hosted Gitea instance?

I have a self-hosted instance of Gitea (1.21.3, linux, amd64) running behind an NGINX reverse proxy. I have no issues using it whatsoever, except that I randomly get signed out. This happens across different systems (Windows, macOS, Linux) using Firefox (have not checked other browsers).

I haven’t found any configuration about limiting session length, and I always check the “Remember this device” checkbox. It’ll work for maybe a few days, at most, before I become signed out. Nothing should have changed on the server or client side that would reasonable cause this.

I looked through the Github issues but couldn’t find anybody else reporting this, so I’m asking here since I’m not sure if it’s a bug or not.

I’m not sure what information I should provide here to help, so if you want me to share something please let me know.

I was also looking in the wrong place at first. There is an option in the security section that can be set

[security]
LOGIN_REMEMBER_DAYS = 30

By default it is 7 days. I would recommend to set it to 30 days or maybe more. This should prevent you from being logged out so quickly. This should not be confused with the settings in the session section.

4 Likes

Just popping back here to say this worked! Thank you! :heart: