Nextcloud on wsl and data on USB Disk mounting with usbipd


Hello everyone. It is my first post here. To the point. I installed Ubuntu 22.04 on wsl. I installed Nextcloud 28.0.2 on it. I would like to keep my data on extrernal usb Disk. To mount usb Disk in Ubuntu I had to compile my kernel with usb Mass Storage driver. Now i mount my usb Disk:

  1. Run wsl
  2. In Cmd run „usbipd attach —wsl —busid 3-2
  3. Back to wsl and mount /dev/sdd3 /mnt/nextcoud/data

I installed nextclod 28.0.2. During install process i choose to keep data on usb Disk. Instalation is going well.

With first run I can create admin account, login, manage data, upload photos (photos are saved in user folder on USB Disk). etc but after restart WSL, I have to mount usb Disk again and Nextcloud give me an error „can’t create data folder, can’t find .ocdata”.

Please help

in addition I will say that directory on USB disk in own recursively by www-data.