# Log out on idle time

**URL:** <https://help.nextcloud.com/t/log-out-on-idle-time/6734>\
**Category:** ℹ️ Support\
**Created:** [December 27, 2016, 12:42pm UTC](https://help.nextcloud.com/t/log-out-on-idle-time/6734 "2016-12-27T12:42:46Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![aviko150](https://help.nextcloud.com/letter_avatar/aviko150/32/6_22734026db12803ebb3e059622ac3534.png) [@aviko150](https://help.nextcloud.com/u/aviko150)\
**Post date:** [December 27, 2016, 12:42pm UTC](https://help.nextcloud.com/t/log-out-on-idle-time/6734/1 "2016-12-27T12:42:47Z")

</div>

Hello,

is there a way to auto log out if there is idle time of more than 5 minutes?

Thanks in advance

---

<div class="post-metadata">

**Author:** ![tflidd](https://help.nextcloud.com/letter_avatar/tflidd/32/6_22734026db12803ebb3e059622ac3534.png) [@tflidd](https://help.nextcloud.com/u/tflidd)\
**Post date:** [December 27, 2016, 12:59pm UTC](https://help.nextcloud.com/t/log-out-on-idle-time/6734/2 "2016-12-27T12:59:57Z")

</div>

In your config/config.php:

```
/**
        
         * The lifetime of a session after inactivity; the default is 24 hours,
        
         * expressed in seconds.
        
         */
        
        'session_lifetime' => 60 * 60 * 24,
```

---

<div class="post-metadata">

**Author:** ![aviko150](https://help.nextcloud.com/letter_avatar/aviko150/32/6_22734026db12803ebb3e059622ac3534.png) [@aviko150](https://help.nextcloud.com/u/aviko150)\
**Post date:** [December 29, 2016, 7:45am UTC](https://help.nextcloud.com/t/log-out-on-idle-time/6734/3 "2016-12-29T07:45:16Z")

</div>

i have no clue in php.  
what should i write for 5 minutes?

‘session\_lifetime’ =\> 60 \* 5 , ??? does it makes sense?

---

<div class="post-metadata">

**Author:** ![tflidd](https://help.nextcloud.com/letter_avatar/tflidd/32/6_22734026db12803ebb3e059622ac3534.png) [@tflidd](https://help.nextcloud.com/u/tflidd)\
**Post date:** [December 29, 2016, 9:14am UTC](https://help.nextcloud.com/t/log-out-on-idle-time/6734/4 "2016-12-29T09:14:05Z")

</div>

Yes. The time is in seconds, you can carry out the calculation yourself and use 300 instead.

---

<div class="post-metadata">

**Author:** ![aviko150](https://help.nextcloud.com/letter_avatar/aviko150/32/6_22734026db12803ebb3e059622ac3534.png) [@aviko150](https://help.nextcloud.com/u/aviko150)\
**Post date:** [December 29, 2016, 11:40am UTC](https://help.nextcloud.com/t/log-out-on-idle-time/6734/5 "2016-12-29T11:40:41Z")

</div>

i did it, doesnt work for me, any other things i have to do?  
i copied the line from the sample file to config file.

---

<div class="post-metadata">

**Author:** ![alexis.rosano](https://help.nextcloud.com/user_avatar/help.nextcloud.com/alexis.rosano/32/5727_2.png) [@alexis.rosano](https://help.nextcloud.com/u/alexis.rosano)\
**Post date:** [November 17, 2017, 9:28pm UTC](https://help.nextcloud.com/t/log-out-on-idle-time/6734/6 "2017-11-17T21:28:00Z")

</div>

Doesn’t work for me too.

---

<div class="post-metadata">

**Author:** ![tflidd](https://help.nextcloud.com/letter_avatar/tflidd/32/6_22734026db12803ebb3e059622ac3534.png) [@tflidd](https://help.nextcloud.com/u/tflidd)\
**Post date:** [November 19, 2017, 11:15pm UTC](https://help.nextcloud.com/t/log-out-on-idle-time/6734/7 "2017-11-19T23:15:07Z")

</div>

You should file a bug report on [https://github.com/nextcloud/server/issues](https://github.com/nextcloud/server/issues) If you create a new issue, there is a template to gather all important information.

---

<div class="post-metadata">

**Author:** ![hep](https://help.nextcloud.com/user_avatar/help.nextcloud.com/hep/32/24096_2.png) [@hep](https://help.nextcloud.com/u/hep)\
**Post date:** [April 27, 2020, 12:10pm UTC](https://help.nextcloud.com/t/log-out-on-idle-time/6734/8 "2020-04-27T12:10:07Z")

</div>

Hi,

DO we still have to do this ?  
No other way ?

---

<div class="post-metadata">

**Author:** ![wwe](https://help.nextcloud.com/user_avatar/help.nextcloud.com/wwe/32/72963_2.png) [@wwe](https://help.nextcloud.com/u/wwe)\
**Post date:** [November 6, 2024, 8:41pm UTC](https://help.nextcloud.com/t/log-out-on-idle-time/6734/9 "2024-11-06T20:41:40Z")

</div>

wwe: close old topics

---

<div class="post-metadata">

**Author:** ![wwe](https://help.nextcloud.com/user_avatar/help.nextcloud.com/wwe/32/72963_2.png) [@wwe](https://help.nextcloud.com/u/wwe)\
**Post date:** [December 9, 2024, 12:25pm UTC](https://help.nextcloud.com/t/log-out-on-idle-time/6734/10 "2024-12-09T12:25:23Z")

</div>


