Windows desktop application will not allow me to connect to my NextCloud server

Support intro

Sorry to hear you’re facing problems. :slightly_frowning_face:

The community help forum (help.nextcloud.com) is for home and non-enterprise users. Support is provided by other community members on a best effort / “as available” basis. All of those responding are volunteering their time to help you.

If you’re using Nextcloud in a business/critical setting, paid and SLA-based support services can be accessed via portal.nextcloud.com where Nextcloud engineers can help ensure your business keeps running smoothly.

Getting help

In order to help you as efficiently (and quickly!) as possible, please fill in as much of the below requested information as you can.

Before clicking submit: Please check if your query is already addressed via the following resources:

(Utilizing these existing resources is typically faster. It also helps reduce the load on our generous volunteers while elevating the signal to noise ratio of the forums otherwise arising from the same queries being posted repeatedly).

Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can. :heart:

The Basics

  • Nextcloud Server version (e.g., 29.x.x):
    • 34.0.0.12
  • Operating system and version (e.g., Ubuntu 24.04):
    • Ubuntu Server and 26.04 LTS
  • Web server and version (e.g, Apache 2.4.25):
    • N/A
  • Reverse proxy and version _(e.g. nginx 1.27.2)
    • N/A
  • PHP version (e.g, 8.3):
    • 8.4.22
  • Is this the first time you’ve seen this error? (Yes / No):
    • yes
  • When did this problem seem to first start?
    • After confirming I could access via my phone using the web browser and mobile app
  • Installation method (e.g. AlO, NCP, Bare Metal/Archive, etc.)
    • Bare metal
  • Are you using CloudfIare, mod_security, or similar? (Yes / No)
    • Yes

Summary of the issue you are facing:

So, I’m unable to connect to my NextCloud server using the Windows application I downloaded from the NextCloud website on my Surface Pro Tablet. I confirmed on my Surface Pro that I am able to next to the domain I setup in Cloudfare and get to NextCloud with no issues. I also confirmed on my S26 Ultra that I can use the browser and app to access NextCloud. The only thing that’s not working is the windows application. When I put in my server address which is my subdomain.domain.com, I receive the following message: Failed to connect to the secure server at the following address. How do you want to proceed. This message was not present when I did it through my phone. Also, once note, I am using technitium dns, not sure if that’s an issue or not being that I can successfully log into the app using my phone.

Steps to replicate it (hint: details matter!):

  1. Download the windows install from NextCloud

  2. Perform the installation

  3. Open NextCloud

  4. Click the Login button

  5. Enter your server address as https://subdomain.domain.com and then click the Next button

  6. Observe the error message

Log entries

Nextcloud

Please provide the log entries from your Nextcloud log that are generated during the time of problem (via the Copy raw option from Administration settings->Logging screen or from your nextcloud.log located in your data directory). Feel free to use a pastebin/gist service if necessary.

I don't have any since I'm not getting passed the login screen on the windows application.

Web Browser

If the problem is related to the Web interface, open your browser inspector Console and Network tabs while refreshing (reloading) and reproducing the problem. Provide any relevant output/errors here that appear.

N/A

Web server / Reverse Proxy

The output of your Apache/nginx/system log in /var/log/____:

N/A

Configuration

Nextcloud

The output of occ config:list system or similar is best, but, if not possible, the contents of your config.php file from /path/to/nextcloud is fine (make sure to remove any identifiable information!):

N/A

What IP address does the server address resolve to? Internal or external?

Depending on your Firewall configuration you can’t connect from your internal IP to your public IP.

Can you connect to your Nextcloud domain in a web browser from your Windows tablet straight up, no Cloudflare or anything else in-between?

If your domain resolves to your public IP address and you’re on the same 192.168.x.x private LAN with the server, then most modern ISP routers will block this. I think this used to be called NAT Reflection or Hairpin Routing or something like that and I’m not sure why it used to work, and it may even still work for some, but it never worked for me and it’s a common issue when self-hosting.

It’s also very inefficient and you would find it very slow since your traffic would have to go out to the world and then come back to your home server using your external bandwidth rather than connecting directly over your LAN.

Your phone is probably accessing your domain via its external, cellular interface (public IP), so it’s outside of your local network when it does that.

Refer to this thread as it might be similiar.

Well @maniejv use nslookup to check what ip-adress will be resolved for the FQDN of your Nextcloud.

I have not tried that specific test, but below are the test results:

  1. S26 Ultra - NextCloud App - Over Wi-Fi - Successfully able to access my files
  2. S26 Ultra - NextCloud App - Over Cellular - Successfully able to access my files
  3. S26 Ultra - Web Browser - Over Wi-Fi - Successfully able to access my files
  4. S26 Ultra - Web Browser - Over Cellular - Successfully able to access my files
  5. Surface Pro Tablet - NextCloud App - Over Wi-Fi - NOT able to successfully access my files
  6. Surface Pro Tablet - NextCloud App - Over Cellular via 26 Ultra - NOT able to successfully access my files
  7. Surface Pro Tablet - Web Browser - Over Wi-Fi - Successfully able to access my files
  8. Surface Pro Tablet - Web Browser - Over Cellular via 26 Ultra - Successfully able to access my files

So, the only tests that are failing are Tests #5 and #6. The above were performed with the CloudFlare Tunnel active and also Technitium DNS active.

How can I connect directly to my LAN without having to open any ports? My files are stored on a UNIFI UNAS PRO 4, and there’s no way to access those files while on celluar even when my WireGuard VPN is enabled on my S26.

The default gateway of my nextcloud server is 10.10.2.1, same for my phone and tablet. However, the DNS is different for the nextcloud server compared to the tablet and phone. Tablet and phone are solving to Technitium of 10.10.2.254, while the server is resolving to 9.9.9.9. Let me update the server’s DNS to 10.10.2.254 to see if that resolves the final issue. Also, I posted my test results in response to @AdamAnon.

10.10.x.x. is a private range, like 192.168.x.x so this is your local LAN, right? This is what is assigned to you by your ISP router, right?

So, let me make sure: your Nextcloud server and your tablet are on the same 10.10.x.x local home network? And you have a domain registered somewhere outside, probably with a dynamic DNS service that resolves to your public IP address, correct? If so, then this is a typical setup.

I don’t know what Technitium is and its IP address 10.10.2.254 is on your local LAN. Is this your own self-hosted DNS server? Because if that’s the case then you have a solution sitting in front of you: add your domain to your self-hosted DNS server and bind it to the local IP of your Netcloud server. This is actually the verified and preferred solution for this:)

9.9.9.9 is public Quad9 DNS server so it can’t resolve the IP address on your local network, it resolves your domain name to your public IP address and herein lies the problem: on most residential routers you can’t go out to the public internet and back to your LAN like this. So, you need to use your local DNS on all your local devices.

So say I have a domain mycloud.ddns.net (not real, just example) registeded with NoIP. When outside it uses public DNS to resolve to my external public IP. At home, I run AdGuard DNS server which resolves mycloud.ddns.net to 192.168.1.100 which is my webserver and my Nextloud server. This is the way it works best.

but also

Well if that ist true you don’t have any DNS problem !!! It means your Surface Pro Tablet is able to access NC-Server via Web-browser both via Celluar and WiFi but NOT if using NextCloud App. If the problem would be caused by DNS it would affect both access via Webbrowser and App. That seems not to be the case.

So the problem is app caused. Maybe a bug in app.

The core problem was a local DNS mismatch on my home network.

My local DNS server is running Technitium with a primary zone configuration for my domain. However, it was marked as a local primary zone, which Technitium thought it owned everything under my domain.

Also, I was missing a route for my specific subdomain, and I had an outdated entry routing unknown traffic to an old test server of mine.

To resolve the issue, I created an A record for nextcloud pointing to Clouldflare’s public internet, which told Technitium to send requests out to the internet.

When I made that update, I’m now able to access my nextcloud locally hosted server via my nextcloud.mydomain.com using the app on my windows tablet.

Error on my part of not cleaning up entries within Technitium first.

Well @maniejv but a simple DNS mismatch on your home network does not explain why you could access the NC via webbrowser but not via app if it was the same device in both cases.

The DNS-Settings of you tablet shall be the same no matter using webbrowser or app, except you use for webbrowser in its settings another DNS-Server (not the local one with mismatched setup).

So, in Edge, I was not able to, but I was able to in Firefox because I had DNS over HTTPS set to Default, which means Firefox was cheating while Edge was not. Also, it was working on my S26 because my Private DNS was set to dns.quad9.net and was also cheating. As soon as I set DNS over HTTPS to OFF within Firefox, I was no longer able to access my server from the web browser. Same thing from my phone. So, I added the record, set DNS over HTTPS to off, and set my Phone’s private DNS to Automatic. Once I performed all those steps, now everything is working as I would expect despite if I’m using my wifi or on celluar service — via the desktop app, phone app, phone web browser, or tablet browser.

Yes that explains all now. Firefox was using an external DNS not the local one as long as DNS over HTTPS was enabled.

So now, nobody is cheating and everybody is honoring Technitium. Also, Technitium is now aware of my subdomain.

Yeah, I was wondering that too about the browsers but I just assumed some bit of info was missing, kinda like in the other thread, and I figured this was a typical issue of lack of local DNS resolution.

Well noone was cheating. Firefox did perfectly what you told Firefox to do. To use an external DNS (DNS over https). Cheating would be if Firefox would have done something mysterious without your knowledge

That’s very true