# Default Retention for Logs in MongoDB

**URL:** <https://forum.pritunl.com/t/default-retention-for-logs-in-mongodb/3536>\
**Category:** Pritunl VPN\
**Created:** [September 15, 2025, 5:21am UTC](https://forum.pritunl.com/t/default-retention-for-logs-in-mongodb/3536 "2025-09-15T05:21:42Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![hsbyp23](https://forum.pritunl.com/letter_avatar_proxy/v4/letter/h/a9a28c/32.png) [@hsbyp23](https://forum.pritunl.com/u/hsbyp23)\
**Post date:** [September 15, 2025, 5:21am UTC](https://forum.pritunl.com/t/default-retention-for-logs-in-mongodb/3536/1 "2025-09-15T05:21:42Z")

</div>

What is the default retention period for logs that Pritunl stores in MongoDB (for example, collections like `servers_output`, `logs`, etc.), and can this value be changed?

For example, entries look like:

```auto
2025-09-15 08:12:31 INFO VPN client connected: user1 10.10.0.2
2025-09-15 08:15:42 INFO VPN client disconnected: user1 10.10.0.2
2025-09-15 09:05:11 INFO Route added for 192.168.1.0/24

```

I’d like to understand how long these records are kept by default and whether the retention period can be configured.

Thanks!

---

<div class="post-metadata">

**Author:** ![zach](https://forum.pritunl.com/user_avatar/forum.pritunl.com/zach/32/1105_2.png) [@zach](https://forum.pritunl.com/u/zach)\
**Post date:** [September 16, 2025, 2:48am UTC](https://forum.pritunl.com/t/default-retention-for-logs-in-mongodb/3536/2 "2025-09-16T02:48:10Z")

</div>

The server output is set by `sudo pritunl set vpn.log_lines 5000` the logs are set by `sudo pritunl set app.log_limit 10000`. This set the number of entries or lines of output.
