My best rclone config/mount for plex

in your rclone config:
[gcache]
type = cache
remote = gdrive:x-san
plex_url = http://localhost:32400
plex_username =
plex_password =
chunk_size = 16M
plex_token =
db_path = /home/rclone/rclone-cache
chunk_path = /home/rclone/rclone-cache
info_age = 2d
chunk_total_size = 20G
db_purge = true

[gdrive]
type = drive
client_id =
client_secret =
scope = drive
root_folder_id =
service_account_file =
token =
use_trash = false
chunk_size = 16M

[gcrypt]
type = crypt
remote = gcache:
filename_encryption = standard
directory_name_encryption = true
password =
password2 =

systemd/mount settings:
ExecStart=/usr/bin/rclone mount gcrypt: /mnt/gdrive
–allow-other
–gid=1000
–uid=1000
–bind local-ip
–dir-cache-time 72h
–fast-list
–cache-chunk-path=/home/usenet/rclone-cache
–cache-db-path=/home/usenet/rclone-cache
–syslog
–umask 002
–log-level INFO

UPDATED settings after feedback from Animosity022.

With these settings all my movies including 4K movies at 95GB start in approx 7 sec and no buffering after starting.

Hopefully someone finds this useful.

Br

1 Like

The VFS options don’t do anything if you are using cache so you can safely remove them.
The cache has it’s own buffer so setting it to 32M is not needed/wasteful on memory.
Moving the drive-chunk size that low makes transfers slower -> https://www.chpc.utah.edu/documentation/software/rclone.php

The buffering seems to be more player specific rather than setting specific from what I’ve tested. I can play without an issue with or without using the cache.

I find the cache to be slower starts slower than without.

Thanks, I removed buffer-size and both vfs options, didn’t notice much of a difference, it’s still fast.

I don’t see slow transfer with small chunk size? I tried from 32M in chunk size down to 4 and don’t notice any speed difference, this on 1Gbit fiber up and down.

It’s only used for upload so not for downloading.

   --drive-chunk-size SizeSuffix                Upload chunk size. Must a power of 2 >= 256k. (default 8M)

Cool, removed that from mount also and changed config to 16M. :slight_smile:

anyone having issues where an rclone mount is not being able to read the files in plex? The “video”, “Audio” section on plex show as “none” and the playback won’t work, even though the rclone mount properly shows all the files listed in explorer and properly mounted. I’m not able to play the file directly in explorer either (even smaller, 200mb MKVs file, let alone 50GB+ 4K files).

image

Is this related to heavy download and upload / 24 hour google ban?

Dunno. I’d start a new thread with some logs, your config and additional information as it could be a million things :slight_smile:

Do you mind to re-post your final rclone config for gcache and your final systemd mount script?

I’ve updated the original/first post with my current settings.

Movies start in tops 10secs for me and my friends from my plex.

1 Like

Really nice post (and btw first hit on google when searching ‘best rclone config plex’). I based my config on these settings and am happy with the result so far.

Although I have one question:
Your current setup:

Plex > Encryption > Cache > Cloudsource.

Wouldn’t it work (better) if you would build it this way:

Plex > Cache > Encryption > Cloudsource

Because then the cache contains decrypted files right? Not really experienced so there could be a flaw in my reasoning.

Hi theoxis,

Glad you liked it, it worked well for me. I use your second example:
Plex > Cache > Encryption > Cloudsource

I’ve also updated my mount command to:
[Service]
Type=simple
User=root
Group=root
ExecStart=/usr/bin/rclone mount gcrypt: /mnt/gdrive
–allow-other
–gid=plex-gid
–uid=plex-uid
–bind local-ip
–dir-cache-time 160h
–cache-info-age=168h
–fast-list
–cache-chunk-path=/root/rclone-cache
–cache-db-path=/root/rclone-cache
–syslog
–umask 0
–log-level INFO
ExecStop=/bin/fusermount -uz /mnt/gdrive
Restart=on-abort

[Install]
WantedBy=default.target

Thanks for everyone input up to this point

I’ve got my new updated plex server doing really well but I need to configure a cache now to stream 4k.
Going to test and see if I can push my server abit harder

NB
https://rclone.org/cache/
From the Docs above it appears that you might have had it right to start with

“During testing, I experienced a lot of bans with the remotes in this order. I suspect it might be related to how crypt opens files on the cloud provider which makes it think we’re downloading the full file instead of small chunks. Organizing the remotes in this order yelds better results: cloud remote -> cache -> crypt”

Let me know how you get on with though settings!

1 Like