External storage from local webdav not working correctly

I modified the official nextcloud docker, see the Dockerfile:

From xhofe/alist:latest as source
From nextcloud:latest
COPY --from=source /opt/alist/alist /
RUN mkdir /data2 && sed '3a\/alist start --data \/data2\/ \n/alist admin random --data \/data2\/\n' -i /entrypoint.sh

It creates in the official docker a local webdav server http://localhost:5244/dav/ for an onedrive-like service.

I deployed the modified docker on northflank.com and set the local webdav server as the NC external storage backend. NC sees all the webdav files in browser but fails to read or write. When I tried to upload some files, NC complains “Error during upload: Host “” violates local access rules”.

I created a cloudflare tunnel with http (not https), still doesn’t work, so I can confirm that it’s not becaused of https config issue. I then replaced local webdav server with public server in NC settings, everything works fine. But I need local webdav.

Another issue, NC clients on Windows and Android don’t work with https url generated by northflank.com while logging in.

hi @wzq_drv welcome to the forum :handshake:

I’m not really get what you are trying to achieve. Nextcloud provides a WebDAV already - no need for any external server. If you still want to go this path - as the problem seems to exist for localhost only you might hit a security measure as you can easily find using a search in this forum - good search term is the error message and allow_local_remote_servers