Can I sync the same content over web and lan?


I have an up and running nextcloud pi 13 installation. Works like a charm however my internet connection is not that great and I would like to be able to sync over lan when Im home.

I tried creating a connection over lan for the first upload then switched to the web address but NC re-uploaded everything. Not sure if I did something wrong… Is this possible ?

Of course.

I use an internal nameserver which points the Nextcloud-domain to an internal ip address.

Thanks for the answer. Sorry as my name shows Im a noob :slight_smile: if I understand well this is not a native solution ? you created a nameserver on your client to redirect to the lan ip ? or is this a separate machine ? is that right ? can you elaborate a bit more please

how do you create an “internal nameserver” ?

I have one on a Raspberry with Webmin and bind and dhcp installed. It can be installed on the same server as the Nextcloud server.

Your router will automatically redirect you to your server, if it detects that it is in your LAN. At least that is what happens on my end. I didn’t have to set up a nameserver or anything else. When I’m connected to the same LAN as my server, the speed goes up dramatically.

That said, if you have a separate subnet for your server, this might not work. Your server and client need to be in the same subnet, if I recall correctly. For example:
With a standard subnet mask of

Try it out, open up your task manager and look at the network speed when you upload a large file.

I think this feature in the router is called dns remind. Not every router supports that unfortunately, but I agree, that should be tried first.
If that doesn’t work and you have a stationary machine at home (always and only LAN connection required) you can also modify your hosts file, to direct the traffic to the LAN address of your server. For example:

C:\Windows\system32\drivers\etc\hosts cloud.mydomain.tld