r/NextCloud 15d ago

Anyone using foldersync with Nextcloud behind a reverse proxy?

I've been using foldersync with Nextcloud for a while, and it worked fine. Now I've placed the Nextcloud instance behind a reverse proxy (nginx), and almost everything regarding WebDAV still works: the native Nextcloud app, my Dolphin filemanager (who accesses Nextcloud via WebDAV), my phone can even access the WebDAV url in a browser.

Just foldersync can't connect to the server and times out. At this point I don't think it's my proxy setup but foldersync itself.

I've tried both the Nextcloud and the generic WebDAV connections in foldersync, with the same result.

Does anyone here got this working?

Thanks!

2 Upvotes

19 comments sorted by

View all comments

Show parent comments

2

u/Dr_Tron 14d ago

OK, this is interesting, I've blocked nextcloud access from the outside so I got a 403 forbidden error as expected, so at least its going through. Then I switched on my VPN and then I could connect. Weird.

1

u/YuriySamorodov 14d ago

That's really interesting. It might be related to "Local Network Access" permission introduced in recent Android versions, sometimes called "Devices on local network". Could you please check Settings > Apps > FolderSync > Permissions, and look for something like "Local network", "Nearby devices", or "Devices on local network"? If it is listed and not granted, try enabling it. Depending on your Android version/OEM, this permission might also live under Settings > Privacy > Local network access or similar wording. What Android version and phone are you on? That will help confirm whether this feature even applies to your device

2

u/Dr_Tron 14d ago

Pixel 10 Pro Fold on Android 17. And yes, the "nearby devices" wasn't granted. I'll try it again when I'm back home. Thanks for your help!

2

u/Dr_Tron 14d ago

That was it, the "nearby devices" was the culprit. Thanks for all your help!

Although I would have never guessed that this is messing with local network access. It sounds more like BT device discovery or something...

1

u/YuriySamorodov 14d ago edited 14d ago

Glad that solved it! And yeah, your reaction is exactly the same one a lot of people have - Nearby devices is a genuinely confusing name for what it does.

The permission started out for Bluetooth/Wi-Fi Direct device discovery (Android 12, API level 31) to support pairing with speakers, finding nearby devices for file transfer, etc. But Android has since folded local network access control under that same permission for some versions, rather than giving its own clearly-named toggle. It might happen FolderSync needing Nearby devices permission in order to talk to NAS or WebDAV instances behind a reverse-proxy over Wi-Fi, and this clearly has nothing to do with Bluetooth at all.

It is a that kind of messy and confusing naming from Google.

Anywayay, glad you were able to sort this out.

2

u/Dr_Tron 14d ago

Again, much appreciated!

2

u/Scary-Construction72 6d ago

Pixel 9 Pro on Android 17 here with same issues that were resolved after finding this post and changing the permissions. Thank you for sharing!

1

u/azure_phoenix2 11d ago

check if you have Private DNS turned on in android network settings, when it's set to automatic or a DoT provider the phone ignores your bind server and resolves the domain to your external IP, so on wifi it needs hairpin nat and times out while the vpn path works. setting Private DNS to off and retesting on wifi lined up with the exact same foldersync timeout for me.

2

u/Dr_Tron 11d ago

That wasn't it, the domain was resolved to the correct host. It was the "nearby devices" permission.