# How does Pritunl handle log rotation?

**URL:** <https://forum.pritunl.com/t/how-does-pritunl-handle-log-rotation/1139>\
**Category:** Pritunl VPN\
**Tags:** pritunl\
**Created:** [June 14, 2023, 5:50pm UTC](https://forum.pritunl.com/t/how-does-pritunl-handle-log-rotation/1139 "2023-06-14T17:50:13Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![barddes](https://forum.pritunl.com/user_avatar/forum.pritunl.com/barddes/32/502_2.png) [@barddes](https://forum.pritunl.com/u/barddes)\
**Post date:** [June 14, 2023, 5:50pm UTC](https://forum.pritunl.com/t/how-does-pritunl-handle-log-rotation/1139/1 "2023-06-14T17:50:13Z")

</div>

I’ve set up a Pritunl VPN that has been running for about 2 weeks now. Out of curiosity, I decided to check how the logs are rotated but couldn’t find anything related to that in the docs.

It seems that my logs are rotating in some way, as I have the following files inside the /var/log directory:

- pritunl.log
- pritunl.log.1
- pritunl\_journal.log
- pritunl\_journal.log.1
- pritunl\_journal.log.2
- pritunl\_journal.log.3
- pritunl\_journal.log.4
- pritunl\_journal.log.5

My first thought was some logrotate script but, upon examining the /etc/logrotate.d directory, the only configured rotation that I found was for rotating mongodb logs.

```auto
/var/log/mongodb/*.log {
  daily
  missingok
  rotate 60
  compress
  delaycompress
  copytruncate
  notifempty
}

```

How are the pritunl logs rotated? How can I tweak this log rotation?

---

<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:** [June 15, 2023, 3:57am UTC](https://forum.pritunl.com/t/how-does-pritunl-handle-log-rotation/1139/2 "2023-06-15T03:57:21Z")

</div>

All of the log rotation is done from the server code. The `pritunl.log` is rotated at 1000000 bytes to 2 rotating files, this cannot be changed. The auditing journal is rotated at 1000000 bytes configurable with the command `sudo pritunl set app.journal_rotate_size 1000000` to 6 files. The number of log files cannot be changed.
