# Make location of pihole log files configurable

**URL:** <https://discourse.pi-hole.net/t/make-location-of-pihole-log-files-configurable/20636>\
**Category:** Feature Requests\
**Created:** [June 10, 2019, 9:09am UTC](https://discourse.pi-hole.net/t/make-location-of-pihole-log-files-configurable/20636 "2019-06-10T09:09:52Z")\
**Posts on this page:** 1\
**Showing post:** 8

<div class="post-metadata">

**Author:** ![jpgpi250](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/jpgpi250/32/286_2.png) [@jpgpi250](https://discourse.pi-hole.net/u/jpgpi250)\
**Post date:** [June 18, 2019, 5:47am UTC](https://discourse.pi-hole.net/t/make-location-of-pihole-log-files-configurable/20636/8 "2019-06-18T05:47:18Z")

</div>

> [@DL6ER](#):
>
> I will describe in this FAQ how to use the powerful symbolic links Linux offer to move the Pi-hole log to any destination.

Found a problem with logrotation, decribed in [this](https://discourse.pi-hole.net/t/moving-the-pi-hole-log-to-another-location-device/2041) article.

I started getting daily messages:

```auto
error: error renaming temp state file /var/lib/logrotate/status.tmp

```

I assumed this was caused by having both the original pihole logrotate and the new custom logrotate run @ midnight (00:00).

I modified the new custom logrotate cron job:

```auto
0 0 * * * root /usr/sbin/logrotate --force --state /var/log/pihole/status /home/pi/custom-pihole/logrotate
@reboot root /usr/sbin/logrotate --state /var/log/pihole/status /home/pi/custom-pihole/logrotate

```

This will create a separate state file `/var/log/pihole/status`.  
The error disappeared (tested several days).

It should also be noted the cron @reboot job is useless when using TMPFS, since there will be no logfiles in that location after a reboot.

---

_[View the full topic](https://discourse.pi-hole.net/t/make-location-of-pihole-log-files-configurable/20636)._
