Rclone cache help needed, and other beginner questions

Hi All,

First of all, this is the ultimate tool I think for my plex needs.
And thanks for all the development which went into this.. :wink:

Im trying to setup rclone connected to Gdrive, with crypt and local cache, to serve our plex server.
Using Mac OS servers here..

Currently I am a little stuck trying to create the rclone cache remote.
I have already setup a Gdrive remote with Google Drive API, and that went fine.
if I understand rclone cache correctly, I must first setup normal Gdrive remote, and rclone cache for that remote and than Gdrive crypt remote.. ?
Not sure what is the correct way of doing this, i hope somebody can give me some answers..

Secondly im currently a little stuck on the following of creating the rclone cache :

Normally should contain a ':' and a path, eg "myremote:path/to/dir",
"myremote:bucket" or maybe "myremote:" (not recommended).
remote> local:/test

Im not sure what exactly to enter in the path location.
I have a local disk inside a MacPro server, which I want to use for a cache drive.

Also another question I have about rclone is, I want to upload from two seperate servers on different locations to the same crypted gdrive remote.
Is this also possible.. ?
Can they for example share the same key, how does this work.. ?

I hope somebody here can help me out, thanks in advance,

You got it. The ideal chain will be like this:
OS --> Crypt --> Cache --> Gdrive remote --> Google
Of these you of course only configure the 3 in the middle as remotes.

A really basic example (containing only the most relevant lines).
PS: this is the format that is used in the rclone.conf - the place where your setup gets stored when you go through the rclone config menus.

[Gdrive]   <--- GdriveCache points to here
type = drive

[GdriveCache]  <--- GdriveCacheCrypt points to here
type = cache
remote = Gdrive:

[GdriveCacheCrypt]   <----- this is the one you will be using normally
type = crypt
remote = GdriveCache:

If you reference Gdrive directly you get the direct connection unencrypted.
if you reference GdriveCache you get unencrypted access with cache
if you reference GdriveCacheCrypt you get ancryption + cache, because it will have to travel through all 3 layers.

Just put the regular directory-path to the location. On windows it might for example be D:\RcloneCache or on Linux /home/stigma/RcloneCache. It's nothing fancy, just a totally normal directory path :slight_smile:

Same remote would be unusual (but possible).
I assume that what you really mean is you want the data to go to the same Gdrive location on the cloud. It's not technically quite the same thing, but I am not trying to nitpick :wink:
This is not hard. Basically, use the same config on both servers (but authenticate each).
They must share the exact crypt-key if they want to be able to read eachothers data. Otherwise the files they did not upload will be visible - but totally unreadable.

Let me know if you want me to elaborate on anything, or if you need more spesific sampl-configs.

Hi,
Thanks for your fast response ! :slight_smile:

So If I understand you hopefully correctly it will be in this order :
Remote 1 : Google Drive
type : "normal" Google Drive
Remote 2 : Google Drive
type : Cache of the "normal unencrypted" Google Drive from remote 1
Remote 2 : Gdrive (normal link)
Remote 3: Crypt (destination is Google Drive Cache from remote 1)
type : creates Encryption layer of initial Google Drive unencrypted remote

These all will be setup with rclone config. ?

Running MacOS X El Capitan 10.11.6 on the first server.
MacOS X Mojave 10.14.6 on the second server..

I have created a folder on a seperate volume on server 1, So I presume I could just use the following path ? :
/Volumes/Downloads/Rclone cache gdrive

I would indeed like to acces the same remote, on multiple servers.
And use both of the servers to upload new files to the same destination..

I also hope/presume that the cache folder does not cache the Gdrive location entirly, which will decrease the size of the cache folder.. ?

In the end I will always have to upload files using Rclone, or can I also use tools like Fuse to mount this encrypted Gdrive as a local mount point (disk) ?

I hope you can help me out again, thanks in advance,

remote 1,2,2 and 3 ? I am confused :slight_smile:
If you want a direct-access remote that is not encrypted or cached - you do not need to set up a second one. You can just use (in my example) Gdrive: directly. Just because it is part of a chain does not mean you can't shortcut that and use it directly also. Only 3 remotes should be needed here.

Yes, or for advanced users they might write it directly into rclone.conf , but for you are probably not at that point yet :slight_smile:
I can look over the config-text for you afterwards if you want (just redact any client secrets and crypt keys before posting anything publically).

Any path will do... as long as you have enough space there for how bug you want the cache to be able to grow. You may prefer to put it on a HDD instead of SSD if you are paranoid about SSD-wearing.

It won't auto-cache anything you didn't access, no. As far as how big it will grow - that s something you can decide:

chunk_total_size = 10G

This should be part of setup questions. If the cache goes above this limit it will start throwing away cached data you haven't asked for the longest.

It is no problem to upload or download from an encrypted/cached via mount. At least not if you use --vfs-cache-mode writes as this provides the best OS compatibility for write operations.

upload via rclone commandline / script does have a few benefits in terms of efficiency though, so if you regularly do large bulk-transfers you may consider doing this in an automated script instead. But mount is great for convenience and organizing easily. Automated scripts have a lot of uses - like automatically backing up local data. Let me know if you need examples of something that direction.

Hi there,

I made a small mistake on my part, please see the following I hope this is correct.. ? :

Remote 1 : Google Drive
type : "normal" Google Drive
Remote 2 : Cache
type : Cache of the "normal unencrypted" Google Drive from remote 1
Remote 3: Crypt (destination is Google Drive Cache from remote 1)
type : creates Encryption layer of initial Google Drive unencrypted remote

Do you know what the reccomended Plex settings are.. ?
And do you know if I am able to select a non local external plex server aswell.. ?

Yep, that looks good!

I don't use Plex myself, so all I really know is that you want to disable most of the complex automatic scans to avoid problems. For more info that that - you have to ask the experts like Animosity.

Before you go asking the same questions that a hundred people have asked him before though... go read this thread, and you will have less questions you need to ask afterwards :wink:

ok, so Im a little stuck atm trying to create my gdrive crypt with cache.

Currently I have setup a normal Gdrive, and a cache of that Gdrive.

Now i am trying to create the third stage, with create a crypt remote of the gdrive cache.
But Im stuck at the following line, and dont know what to enter or use for the value :

his value is required and it has no default.
Enter a string value. Press Enter for the default ("").
remote>

When I try pressing Enter, and use the default value it does not work..
Im little confused here, what do I need to enter here.. ?

I hope you can help me out again, thx in advance !

It should be the name of the cache remote.

Ok thx

Will try it again.. :wink:

Im also wondering how, should I open/mount the same remote on my second server.. ?
I want both servers to upload files to the same directory on the same gdrive account.

What will be the best way for me to set it up like that.. ?

Im also wondering, do I need cache on server 1 ?
Since server 1 is only uploading files to gdrivr crypted.
Server 2 is running the plex server, and must also acces the crypted gdrive, and can use some cache I think for plex..
Or how does this work.. ?

I hope somebody can help me out.
I still hope to get this working someday with out plex server someday..

thanks in advance,

I don't use cache for plex.

If you have multiple servers, you can use rclone on them and mount as many times/places you want/need. You can either copy the config directly from one to another or recreate it.

If you recreate, you just need to use the same passwords/salt if you are using a crypt so it can decode it.

"Best" is a tough term as it really depends on how you are setup and what you want your flow to be like as each person's setup is a little different.

Me, for example, I have everything on a single server so my setup is the best for my use case and how I use all the pieces of software.

If you have a more specific question, we are more than happy to help or a flow question.

thx for your message !

Are you not using cache for plex, because you dont need it.. ?
I thought I must use cache for plex.. ?

I have plex server running on server 1.
I would like that both servers to upload to the same gdrive destination.
Plex will use the same gdrive crypted location for its files..

This way I can use the upload speeds of both servers on two different locations, but only 1 plex server is running on location 1 on server 1.

So server 2 is basically only uploading files to the gdrive crypt location..

I've been running my setup with cache for many months so I would definitely say I don't need it for my setup. I have a tighter control on my clients and who uses it so definitely not needed for my use case.

You can upload from 1 or 100 destinations to the same Google Drive as it doesn't matter how many. If you want to share, the only thing is you need to use the same encryption passwords and salt so everyone can decrypt the data.

I use:

--poll-interval 15s

So basically the worst lag of an upload to be noticed on my mount is 15 seconds. I can live with that. You can bump that down to 10 seconds as well. The default is every 60 seconds.

thx for your message !

Im btw wondering, i would like to mount the Gdrive aswell, but still it's not clear to me how to mount the gdrive the best way for use with plex.

I found the rclome mount command, to mount the gdrive to a local folder, which is great I think !
But it's not clear to me how to add all the nececerry plex mounting options to this command..

Would be great I think, if it is possible to just mount the gdrive crypt using FUSE (OSXFUSE in my case), and use that to copy folders to it or do I need to use rclone browser for this ??
I thought using tools like fuse could do the same for me.. ?

All your help is very welcome ! :slight_smile:

UPDATE :
Im using rclone browser atm, found this great tool !
It has a GUI which I like, looks like rclone browser has Mount and stream options.
Im wondering which commands I should put in there which are good for plex.. ?

I currently have an gdrive crypt filled with content using server 2, and trying to mount it with fuse on server 1 running plex.

Ok, so I have got Rclone now running with crypt on my Gdrive.
It works fine so far on two servers, I have copied the same settings file on both of my servers.
And thx for this info and tip here :wink:

Anyway, I have a large folder with my content now, and would like to make a cache of it.
I have noticed that sometimes plex gives a warning that the source is to slow for playback.
So perhaps caching can help with this.. ?

What could be the best approach here for me.. ?

The situation is perhaps a little different now.. ?
I have got rclone with gdrive, and now have made a crypt of that gdrive.
I have mounted the G drive crypt, with rclone browser to a local folder.
Plex is running of this folder now for a few days..

Should I make a cache of the rclone gdrive crypt.. ?
Or is this wrong perhaps.. ?

I hope somebody can help me out, thanks in advance,

I hope somebody can help me out.

Trying to create a cache now from my current gdrive and gdrive crypt.
So far I have not got it to work unfortunately.

I have the current configuration :
[gdrive-]
type = drive
client_id =
client_secret =
scope = drive
token = {"access_token
root_folder_id =

[gdrive-crypt]
type = crypt
remote = gdrive-john-lewis:/
filename_encryption = standard
directory_name_encryption = true
password =
password2 =

[gdrive-john-lewis-crypt-cache]
type = cache
remote = gdrive-crypt:/
plex_url = http://127.0.0.1:32400
plex_username = user
plex_password =
chunk_size = 16M
info_age = 2d
chunk_total_size = 20G
db_path = /home/rclone/rclone-cache
chunk_path = /home/rclone/rclone-cache

You want to check this out:

https://rclone.org/cache/#cache-and-crypt

You want to go cache first than crypt.

hi thanks for your message !

Unfortionutly, i already have a crypted gdrive full now.
I use the gdrive only for rclone cryption, nothing else.

So there is no other way for me to enable cache for my current crypted cloud.. ?

What to do with all my crypted content.. ? :S

I'm not following as you can use both. The cache is just a layer that sits in between.

Can you describe what you are asking a bit more?

Hi,

Thanks for your message.
sorry for my lack of clarity.

I would like to add cache to my current crypted content on my gdrive.
My gdrive has been filled using rclone crypt over the last few months.

As I started this thread, the situation is perhaps a little different from how I would like to add cache now..

Anyway, I hope there is still a way to enable cache, and keep my existing crypted gdrive data.. ?