Nextcloud external storage - WebDAV with custom port - is it possible?

What app is this about, and its version: Nextcloud 31.0.11~ynh1
What YunoHost version are you running: 12.1.39 (stable)
What type of hardware are you using: Old laptop or computer

Describe your issue

Not sure if this is a YNH issue or a wider Nextcloud app issue really but you guys are usually excellent at giving me pointers in the right direction (cheers!) so her goes …
I have a number of webDav drives connected to my Nextcloud server app that use the default ports 445 or 80, these all work fine. I have one webDAV server that uses a wierd port - 6008. That’s not normally an issue for most apps (e.g. phone app file managers or my laptop, as I can specify the port to use at the web address. However, in the Nextcloud app (on my YNH server) in the External Storage section there does not seem to be an option to specify the port for WebDAV to use. It seems to assume the default options only. Am I wrong? Am I missing an option to customise the port? Any advice or confirmation that this is indeed a missing feature on Nextcloud would be welcome. Many thanks in advance.

Share relevant logs or error messages

It just fails to connect to the server. I dont have any useful logs. Sorry.

Hi @tzb6js,

The URL:port format is normally supported by Nextcloud for WebDAV external storage. Here are a few things to check:

1. URL syntax
In the “URL” field, try your-server.com:6008 (without http:// or https://). The protocol is handled by the “Secure https://” checkbox.

2. Protocol
Does your WebDAV server on port 6008 use HTTP or HTTPS?

  • If HTTP → uncheck “Secure https://” → :warning: risky
  • If HTTPS → check “Secure https://”

3. SSL Certificate
If your server uses a self-signed certificate, you may need to import it first. See: Configuring External Storage (GUI) — Nextcloud latest Administration Manual latest documentation

4. Firewall / Connectivity
Make sure port 6008 is open and reachable from your YunoHost server. You can test with:

curl -v http://your-server.com:6008/

5. Logs
To get more details about the error, check the Nextcloud logs:

tail -f /var/www/nextcloud/data/nextcloud.log

Then try to add the external storage again and see what error appears.

Could you share:

  • The exact syntax you’re using in the URL field?
  • The result of the curl test?
  • Any error from the Nextcloud logs?

This should help narrow down the issue!

Many thanks for this, I will give it a try later today and reply. Much appreciated!

I am OK and compliant with steps 1 and 2. I then jumped to step 4 and tested the connection. There seems to be a problem, see below. Instead of accessing the IP address of my server it seems to be using the “loopback” 127.0.0.1 address rather than the correct IP address. Why would it do that for this address when it works for others such as webDav on IONOS.

curl -v https://mysite.glddns.com:6008

  • Trying [::1]:6008…
  • connect to ::1 port 6008 failed: Connection refused
  • Trying 127.0.0.1:6008…
  • connect to 127.0.0.1 port 6008 failed: Connection refused
  • Failed to connect to mysite.glddns.com port 6008 after 7 ms: Couldn’t connect to server
  • Closing connection 0
    curl: (7) Failed to connect to mysite.glddns.com port 6008 after 7 ms: Couldn’t connect to server

I don’t seem to have a data directory below /var/www/nextcloud/ and I am struggling to find the nextcloud.log file using the find command.

Ahh. Looks like I had some user error! I got the curl command working but I think I see a problem. Even though I tell it to use port 6008 it uses the default 443. See below.

curl -v https://mysite.grouded.com/disk1_part_1:6008
* Trying [::1]:443…
* Connected to mysite.grouded.com (::1) port 443 (#0)
* ALPN: offers h2,http/1.1
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
* CAfile: /etc/ssl/certs/ca-certificates.crt
* CApath: /etc/ssl/certs
* TLSv1.3 (IN), TLS handshake, Server hello (2):
* TLSv1.3 (IN), TLS handshake, Encrypted Extensions (8):
* TLSv1.3 (IN), TLS handshake, Certificate (11):
* TLSv1.3 (IN), TLS handshake, CERT verify (15):
* TLSv1.3 (IN), TLS handshake, Finished (20):
* TLSv1.3 (OUT), TLS change cipher, Change cipher spec (1):
* TLSv1.3 (OUT), TLS handshake, Finished (20):
* SSL connection using TLSv1.3 / TLS_AES_256_GCM_SHA384
* ALPN: server accepted h2
* Server certificate:
* subject: CN=mysite.grouded.com
* start date: Nov 15 05:26:52 2025 GMT
* expire date: Feb 13 05:26:51 2026 GMT
* subjectAltName: host “mysite.grouded.com” matched cert’s “mysite.grouded.com
* issuer: C=US; O=Let’s Encrypt; CN=R13
* SSL certificate verify ok.
* using HTTP/2
* h2h3 [:method: GET]
* h2h3 [:path: /disk1_part_1:6008]
* h2h3 [:scheme: https]
* h2h3 [:authority: mysite.grouded.com]
* h2h3 [user-agent: curl/7.88.1]
* h2h3 [accept: */*]
* Using Stream ID: 1 (easy handle 0x555adf0947a0)

GET /disk1_part_1:6008 HTTP/2
Host: mysite.grouded.com
user-agent: curl/7.88.1
accept: */*

* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
* old SSL session ID is stale, removing
< HTTP/2 302
< server: nginx
< date: Sat, 17 Jan 2026 14:54:35 GMT
< content-type: text/html
< content-length: 138
< location: https://mysite.grouded.com/yunohost/sso?r=aHR0cHM6Ly91ZjdjOTA5LmdsZGRucy5jb20vZGlzazFfcGFydF8xOjYwMDg=
< x-sso-wat: You’ve just been SSOed
< content-security-policy: upgrade-insecure-requests
< x-content-type-options: nosniff
< x-xss-protection: 1; mode=block
< x-download-options: noopen
< x-permitted-cross-domain-policies: none
< x-frame-options: SAMEORIGIN
< permissions-policy: interest-cohort=()
< strict-transport-security: max-age=63072000; includeSubDomains; preload
<

302 Found

302 Found


nginx \* Connection #0 to host mysite.grouded.com left intact

The mystery deepens… It does look like it is using thr loopback IP address for some reason.

curl -v https://mysite.grounded.com:6008
* Trying [::1]:6008…
* connect to ::1 port 6008 failed: Connection refused
* Trying 127.0.0.1:6008…
* connect to 127.0.0.1 port 6008 failed: Connection refused
* Failed to connect to mysite.grounded.com port 6008 after 7 ms: Couldn’t connect to server
* Closing connection 0
curl: (7) Failed to connect to mysite.grounded.com port 6008 after 7 ms: Couldn’t connect to server

The problem seems to relate to the format of the web address. My website is mysite.grounded.com/disk1_part1 rather than just ending in .com . It’s as if the use of the /disk_part1 makes it ignore the :6008 port number and jusr use the default 443 port.without the /disk1_part1 component it uses 6008 . It is stange. Any thoughts?

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.