Mount local NAS to VPS

What is the problem you are having with rclone?

Hey guys,
I have a usecase for which I didn't find too many answers on the forum. Specifically I want to use my local NAS as a pure datastore and mount it onto my VPS which hosts Plex. I have 104TB in HDDs and a 2TB cache pool on my NAS.

I had great experience using rclone to mount remote shares before, so I would like to use rclone both as the server on my NAS and as the client on the VPS. I saw that you can serve a local "remote" using SFTP, HTTP, WebDAV etc. by using the local remote but I'm struggling to decide which to choose and which would benefit me the most if I'm serving media.

Any recommendations protocol I should use to serve my files? For now I was testign with SFTP but is that the best approach?

Another question I have is related to the VFS cache. Where should I enable it, should I enable it on the NAS and cache on my SSD by setting the cache-dir? This would spin up my drives as little as needed. Should I also in parallel enable it on my VPS, to avoid going to my NAS to begin with?

Does it make sense enabling cache on local remotes and also running two caches at the same time?

Any recommendations in general to spin my HDDs as little as possible? Is using --vfs-cache-mode full on client and server sufficient?

Run the command 'rclone version' and share the full output of the command.

N/A

Which cloud storage system are you using? (eg Google Drive)

local

The command you were trying to run (eg rclone copy /tmp remote:tmp)

While testing I was running these:

NAS:
 rclone serve sftp /mnt/user/Media/ --user "XXXXXX" --pass "XXXXXXX" -vvv --addr 0.0.0.0:2023 --cache-dir /mnt/cache/rclone/ --vfs-cache-mode full

VPS:
 rclone mount -vvv NAS:/ ./NAS/

Please run 'rclone config redacted' and share the full output. If you get command not found, please make sure to update rclone.

VPS client config:

[NAS]
type = sftp
host = XXXXXXXXXXXX
port = 2023
pass = XXXXXXXXXXXXXXXX
shell_type = unix
md5sum_command = md5sum
sha1sum_command = sha1sum

A log from the command that you were trying to run with the -vv flag

N/A

This is beyond the scope of rclone really. Working backwards, you need to be able to have your VPS access your home NAS. From there, you can work the details.

You are more than likely behind one, if not more, NAT layers. You will need to either punch through it or use port forwarding and a dynamic DNS service. There are many tools for both. My go-to would be a reverse SSH tunnel but that is low-tech and old-school (and likely outdated). There are many other tools out there: check out GitHub - anderspitman/awesome-tunneling: List of ngrok/Cloudflare Tunnel alternatives and other tunneling software and services. Focus on self-hosting.

Once you have this set up, you likely do not need to run rclone on your NAS. Instead, just use rclone mount on the VPS to mount an SSH share. But again, there are a lot of details in here.

Sorry should’ve mentioned it’s a managed VPS, otherwise I would’ve just run WireGuard, I have access to rclone though. Hence this setup.

If you have any tips in regards to rclone let me know!

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