···147147 '';
148148 };
149149150150+ # Ensure the PHP upload tmp dir exists with correct ownership before Nextcloud
151151+ # starts. Without this, PHP silently falls back to /tmp (a different filesystem),
152152+ # causing cross-device rename failures that leave large uploads as ghost entries.
153153+ systemd.tmpfiles.rules = [
154154+ "d ${nc.dataDir}/tmp 0750 nextcloud nextcloud -"
155155+ ];
156156+150157 # Wait for /srv to be mounted before starting Nextcloud.
151158 systemd.services.nextcloud-setup = {
152159 after = [ "srv.mount" ];