Can’t get n8n (Docker on Windows/WSL2) to see/write to a Windows network folder

Hello.

I am trying to have n8n read and write files directly in a Windows network folder

I have selfhosted n8n with docker compose and portainer on a windows 11 VM. Its running great, until I need to interact with files that are on the host, specifically, files which are on the physical server (not the win11 VM I am hosting docker on).

Already tried (I had chatgpt help me summarise)

  1. Named Docker volume

    • Added a volume bind like -v n8n_MYFOLDER:/host-FOLDER (via portainer GUI).

    • Inside the container it shows up as a regular Linux volume (not the network share). Writes stay “inside Docker,” never show up on \\SERVER\.... (the real destination).

  2. Bind-mount a mapped drive

    • Mapped X: on Windows to \\SERVER\UsersDoc\...

    • Added directory X:\ to Docker desktop also (Resources → File sharing)

    • tried binding that into the container via Portainer GUI, e.g.:

      volumes:
        - type: bind
          source: "X:\\UsersDoc\\My folder\\folder\\folder"
          target: "/host-folder"
      
      
    • Container path appears, but it’s empty or acts like a normal folder—still not the live network files.

  3. Direct UNC path

    • Tried binding \\SERVER\... directly (with different escaping/quotes). Unreliable, and never produced a stable “real share” view inside the container.

      To reproduce error:

      Map \\SERVER\YourFolder\Folder\Folder\Folder to X: in Windows.

    • Start n8n with the bind-mount shown above.

    • In the container, create a file under /host-folder.

    • Check the Windows share: file doesn’t appear.

Overall it seems that I cant get a drive mapped at all for the n8n to access to. It only creates stuff inside its own container. I read other forums to find something simillar, with no luck for my own use case. I might be doing this wrong (no experience with docker).

n8n Version: latest
Database Options: postgre
n8n image: n8nio/n8n:latest
Host: Windows 11 VM with Docker Desktop (WSL2) + Portainer