Configure session timeout for web-interface in docker

Hi all,

currently I’m facing a problem where I need some help to get a good solution. My problem is that I need to set a shorter session timeout for users that are using the web-interface. We have shared desktops with a shared local user account. So everyone uses the same system user but personalized accounts for Nextcloud. Therefore, it can happen that the next user finds the active session of the previous user and is already logged in. I would like to prevent this problem by setting the timeout for the web interface to one hour. Then the user is automatically logged out and if someone is on the same computer the next day, the next user has to log in.

I googled a little bit and found the parameters in the config.php file that I can set for it.

session_lifetime
session_keepalive
remember_login_cookie_lifetime

currently I’m not completely sure which parameter needs to be set but this is something I can find out.
I’m more struggling with how I can do persistent changes to the config.php file inside my docker container. I think I even did not found the correct file inside my container.

Could you please assist me with how to correctly implement this configuration?

Thank you and best regards
Felix

I was experimenting with OpenIdConnect so I found a good working configuration for me

review config

docker exec --user www-data <nextcloud-container> php occ config:system:get session_lifetime
docker exec --user www-data <nextcloud-container> php occ config:system:get remember_login_cookie_lifetime
docker exec --user www-data <nextcloud-container> php occ config:system:get session_keepalive
docker exec --user www-data <nextcloud-container> php occ config:system:get auto_logout

set new values

docker exec --user www-data <nextcloud-container> php occ config:system:set session_lifetime --value=900
docker exec --user www-data <nextcloud-container> php occ config:system:set remember_login_cookie_lifetime --value=0
docker exec --user www-data <nextcloud-container> php occ config:system:set session_keepalive --value=false
docker exec --user www-data <nextcloud-container> php occ config:system:set auto_logout --value=true

from my understanding this is the only config which reliably ends running sessions after some time…

if you want to persist tis settings you need to store you config.php outside of he container:

e.g.

$ docker run -d \
-v config:/var/www/html/config \