Fastest connection NC to NAS

Hello,

I have a nc 18.0.7 instance by my hoster and a NAS at home.
What is the fasters connection over the internet to connect NC with my external storage (NAS) at home?

Is it sftp, WebDAV or connect with nextcloud2nextcloud?

Thank you!
Michael

1 Like

What is your NAS?
What protocols does it support?
What are your internet specs (up/down)?

What does your “hoster” support?

1 Like

If it were me, I would use a VPN tunnel and then share via NFS. Over the public Internet, you don’t want to expose a file share directly, and the latency is long enough I expect the only thing that would help with speed is caching on the NC side.

1 Like

i would like to do as per your suggestion of using vpn and than share a file,
can u guide me how to do that?
thanks

@earth No good idea because you must re-scan that nextcloud can share the file

@Michael2222
Can you install Nextcloud on your NAS?
Can you install DynDNS and port forwarding?
Search “Federated Sharing” for Nextcloud.
It uses WebDAV.

1 Like

First off, allowing something outside your home network to access your home network is a security risk. You need to be careful and do some research so you know what the risks are and how to mitigate them. I suggest reading over in r/selfhosted or r/nextcloud on Reddit.

Also, using NFS has some security implications so if you’re not familiar with those already you need to read up on that.

Since you asked for a guide for VPN setup, I would suggest starting here: https://openvpn.net/community-resources/how-to/

Setting up the VPN server or client may be different depending on the exact NAS you have (which one is it?) and the OS you’re running on the VPS (which one is it?)

With that said, you may want to do as someone else suggested and move the entire NC instance to your home, then use the VPS as a reverse proxy. I ended up doing that myself. If you’re not sure how to do that, go search and ask questions on the r/NextCloud sub-reddit.

1 Like

If you’re at the point of running NC hosted and running it back to locally hosted storage, it seems like you’d save a lot of trouble and performance by running NC at home too.

Even if you do get this working with a VPN, I would expect it to perform poorly.

1 Like

Hello,

my NAS is a Synology DS918+

Here the datasheet from the NAS
https://www.synology.com/en-in/products/DS918+

My internet access at home is 100Mbit download / 50 Mbit upload

Think yes, I can install Nextcloud on my NAS.
And yes, I can DynDNS with port forewarding.

But is “Federated Sharing” over the internet from two Nextcloud instances more faster as a Nextcloud instance connect the NAS with the app “external storage” via sftp?

1 Like

I do not know it. sftp is not really fast an WebDAV is slow with a high number of small files.

You seem to be bottlenecked with your ~6MB/s upload bandwidth…

Considering that sustainable practical speed is usually half the advertised, your NC will read the data (from your NAS at home) at about 10GB per hour. At those speeds I don’t think the chosen protocol/communication will play any role…

My problem is not the speed of download or upload of a single document.
If I access to a folder, NC need 15 seconds to display the content of the folder.
What happens in the “external storage” app when I access a folder? Is NC trying to scan all of the contained documents? Then I would understand the 15 seconds. In total I have 6TB of data on my NAS.

Perhaps you can optimize something. no thumbs, no locking, …
https://docs.nextcloud.com/server/19/admin_manual/configuration_server/config_sample_php_parameters.html