# Mautic logs me out every X minutes. I want to be logged in for 1 month at least!

**URL:** <https://forum.mautic.org/t/mautic-logs-me-out-every-x-minutes-i-want-to-be-logged-in-for-1-month-at-least/26081>\
**Category:** General Discussion\
**Created:** [November 14, 2022, 4:00pm UTC](https://forum.mautic.org/t/mautic-logs-me-out-every-x-minutes-i-want-to-be-logged-in-for-1-month-at-least/26081 "2022-11-14T16:00:50Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![xmontero](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/xmontero/32/7499_2.png) [@xmontero](https://forum.mautic.org/u/xmontero)\
**Post date:** [November 14, 2022, 4:00pm UTC](https://forum.mautic.org/t/mautic-logs-me-out-every-x-minutes-i-want-to-be-logged-in-for-1-month-at-least/26081/1 "2022-11-14T16:00:50Z")

</div>

When using mautic, I login into the dashboard and I then I do other things. I come back and it has logged out.

I want it to be like google or facebook: Keep me logged in “forever” until I close the session.

How can I achieve this?

---

<div class="post-metadata">

**Author:** ![tobsowo](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/tobsowo/32/3096_2.png) [@tobsowo](https://forum.mautic.org/u/tobsowo)\
**Post date:** [November 15, 2022, 6:41am UTC](https://forum.mautic.org/t/mautic-logs-me-out-every-x-minutes-i-want-to-be-logged-in-for-1-month-at-least/26081/2 "2022-11-15T06:41:53Z")

</div>

Check your PHP configuration file and change the max\_timeout

---

<div class="post-metadata">

**Author:** ![joeyk](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/joeyk/32/11164_2.png) [@joeyk](https://forum.mautic.org/u/joeyk)\
**Post date:** [November 15, 2022, 7:52am UTC](https://forum.mautic.org/t/mautic-logs-me-out-every-x-minutes-i-want-to-be-logged-in-for-1-month-at-least/26081/3 "2022-11-15T07:52:13Z")

</div>

This shouldn’t happen in M4, what version are you using?

---

<div class="post-metadata">

**Author:** ![xmontero](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/xmontero/32/7499_2.png) [@xmontero](https://forum.mautic.org/u/xmontero)\
**Post date:** [November 16, 2022, 12:43pm UTC](https://forum.mautic.org/t/mautic-logs-me-out-every-x-minutes-i-want-to-be-logged-in-for-1-month-at-least/26081/4 "2022-11-16T12:43:59Z")

</div>

`v4.4.0` it says in the footer.

---

<div class="post-metadata">

**Author:** ![joeyk](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/joeyk/32/11164_2.png) [@joeyk](https://forum.mautic.org/u/joeyk)\
**Post date:** [November 16, 2022, 12:57pm UTC](https://forum.mautic.org/t/mautic-logs-me-out-every-x-minutes-i-want-to-be-logged-in-for-1-month-at-least/26081/5 "2022-11-16T12:57:56Z")

</div>

Well you need to bump it a little bit:

 ![image](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/2/2f3a4efb81777086aa01859540651949c29efd30.png)

---

<div class="post-metadata">

**Author:** ![xmontero](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/xmontero/32/7499_2.png) [@xmontero](https://forum.mautic.org/u/xmontero)\
**Post date:** [November 16, 2022, 1:02pm UTC](https://forum.mautic.org/t/mautic-logs-me-out-every-x-minutes-i-want-to-be-logged-in-for-1-month-at-least/26081/6 "2022-11-16T13:02:31Z")

</div>

Ahhh good to know! Thanks! Will try!

---

<div class="post-metadata">

**Author:** ![IonutOjicaDe](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/ionutojicade/32/7383_2.png) [@IonutOjicaDe](https://forum.mautic.org/u/IonutOjicaDe)\
**Post date:** [November 17, 2022, 8:07pm UTC](https://forum.mautic.org/t/mautic-logs-me-out-every-x-minutes-i-want-to-be-logged-in-for-1-month-at-least/26081/7 "2022-11-17T20:07:57Z")

</div>

Should the env variable `rememberme_lifetime` within `\m\app\config\local.php` be changed?

Actually there is attributed with this value:  
`'rememberme_lifetime' => 31536000,`

=\> should I change it to 0 for unlimited lifetime?

 ![image](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/9/9a15fe94bb480be6a5a2ee139a4d4f143ad841d7.png)

I actually add this line of code to keep me logged in:  
`jQuery(function () {setInterval(function(){jQuery.ajax({method: 'GET',url: 'https://m.ionutojica.com/s/credentials'});}, 9 * 1000 * 60);/*every 9 minutes*/});`  
at the end of `m/app/assets/js/app.js`. But as soon as the browser restarts, I need to login again.
