Cleaning up old sessions
-
I found out that my Nextcloud instance has hundreds of active sessions (visible in Settings>Personal>Security>Devices and Sessions). I'm suspecting that most of them are an Android app re-logging in every time it syncs (but which? I am using a few). Also I assumed that old sessions would be cleaned up after a set time.
Google search returned this: https://github.com/nextcloud/server/issues/6203
Which I have not been able to make use of. My background jobs are set on Cron, and I just ran them manually from Cloudron Terminal, but other than that I don't understand where/what/how these jobs are, nor if that is the way to solve this problem. -
-
I can confirm that I also have quite a few (10s) of "devices" listed there, in my case for each davx5 version, which syncs contacts from my phone. Some are years old. I have not found a settings variable though in Nextcloud which would enable automatic purging of those or set some expiration time. So I am not sure if this is a bug in how client apps register themselves or if Nextcloud even should purge those automatically.
-
@nebulon Yes, it seems like it is: https://help.nextcloud.com/t/how-to-remove-device-session-on-security-personal-menu/107430
https://help.nextcloud.com/t/disconnect-all-sessions-revoking-access-for-all-apps-of-a-user/37955/8
Waiting for an official fix, two workarounds mentioned in these topics are editing database or running a bash script. Nothing that I'm able to do, but yeah, this does need to be solved upstream.
-