# Changing Logfile location, config.php reset after restart - Nextcloud-AIO

**URL:** <https://help.nextcloud.com/t/changing-logfile-location-config-php-reset-after-restart-nextcloud-aio/244196>\
**Category:** ℹ️ Support\
**Tags:** docker, aio\
**Created:** [May 7, 2026, 12:45pm UTC](https://help.nextcloud.com/t/changing-logfile-location-config-php-reset-after-restart-nextcloud-aio/244196 "2026-05-07T12:45:25Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![denyerec](https://help.nextcloud.com/letter_avatar/denyerec/32/6_22734026db12803ebb3e059622ac3534.png) [@denyerec](https://help.nextcloud.com/u/denyerec)\
**Post date:** [May 7, 2026, 12:45pm UTC](https://help.nextcloud.com/t/changing-logfile-location-config-php-reset-after-restart-nextcloud-aio/244196/1 "2026-05-07T12:45:25Z")

</div>

Hi there,

I’m attempting to relocate the nextcloud-aio-nextcloud logfile to /mnt/ncdata so that it appears in the same folder as the rest of the system data, however by default the conatiner’s config.php points it into /var/www/html/data/nextcloud.log which is inside the nextcloud-aio-nextcloud volume.

If I amend the config.php file within nextcloud-aio-nextcloud (Either by occ or by a temporary alpine container with the volume mounted) the change does not persist when the containers are shutdown and the system rebooted.

I cannot find an environment variable in the nextcloud-aio-mastercontainer config that would pass through the value of ‘logfile’=\> ‘/mnt/ncdata/nextcloud.log’ to the application container, and as such am a bit lost on how any user change to nextcloud-aio-nextcloud=\>/var/www/html/config/config.php may be persisted.

Either I’m missing a critical step with an occ command or undocumented environment variable, or I’m trying to do something that shouldn’t be done, and I don’t know which 🙂

- Is it possible to persist a change to config.php, if so how?
- If it is not possible, is there a way to pass in logfile via the aio-mastercontainer docker Environment variables?

---

<div class="post-metadata">

**Author:** ![system](https://help.nextcloud.com/user_avatar/help.nextcloud.com/system/32/29333_2.png) [@system](https://help.nextcloud.com/u/system)\
**Post date:** [August 5, 2026, 12:45pm UTC](https://help.nextcloud.com/t/changing-logfile-location-config-php-reset-after-restart-nextcloud-aio/244196/2 "2026-08-05T12:45:31Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
