Webdav external storage. Unauthorized

Hello,

I’m having trouble adding webdav external storage. Webdav runs on nginx with HTTPS enabled and it’s behind basic auth. I can access to it with Chrome, no problem. Trying to add as storage it gives me following error.

|Error|files_external|Sabre\HTTP\ClientHttpException: Unauthorized|2018-04-08T15:19:21+0100|
|Error|no app in context|OCP\Files\StorageInvalidException: Sabre\HTTP\ClientHttpException:
Unauthorized|2018-04-08T15:19:21+0100|
|Error|files_external|Unauthorized|2018-04-08T15:19:21+0100|
|Error|no app in context|Sabre\HTTP\ClientHttpException: Unauthorized|2018-04-08T15:19:21+0100|

Nginx /var/log/nginx/error.log, which is kinda weird.

2018/04/08 12:00:00 [error] 23130#23130: *9 user " username" was not found in “/etc/nginx/.htpasswd”, client: > x.x.x.x, server: webdav.xxxxx.xxx, request: “PROPFIND /data/ HTTP/1.1”, host: “webdav.xxxx.xxx”

Also no typo, i’ve checked username and password many times.

Debian 9 stretch
Docker 18.03.0-ce
arm32v7/nextcloud:latest
Nextcloud 13.0.1
Nginx 1.10.3