RClone edit for VFS Service mount several remote (plex)

####i want to mount multiple google drive storage using "rclone-vfs.service" for my plex server.
I have already created and configured several remotes with a google account each.
but I don't know what to write in the "rclone-vfs service" file for it to mount the different configs

[Unit]
Description=RClone VFS Service
Wants=network-online.target
After=network-online.target

[Service]
Type=notify
TimeoutStopSec=60
Environment=GOMAXPROCS=2

ExecStart=%h/bin/rclone mount gdrive: %h/Stuff/Mount \
  --config %h/.config/rclone/rclone.conf \
  --use-mmap \
  --dir-cache-time 1000h \
  --poll-interval=15s \
  --vfs-cache-mode writes \
  --tpslimit 10

StandardOutput=file:%h/scripts/rclone_vfs_mount.log
ExecStop=/bin/fusermount -uz %h/Stuff/Mount
Restart=on-failure

[Install]
WantedBy=default.target

config name :
gdrive
gdrive1
gdrive2.....

desired mounting location:
%h/Stuff/Mount
%h/Stuff/Mount1
%h/Stuff/Mount2...

the first config is already mounted and works perfectly (gdrive in %h/Stuff/Mount)

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

rclone v1.62.2

  • os/version: debian 10.13 (64 bit)
  • os/kernel: 5.10.0-0.deb10.21-amd64 (x86_64)
  • os/type: linux
  • os/arch: amd64
  • go/version: go1.20.2
  • go/linking: static
  • go/tags: none

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

Google Drive

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

wget -P ~/.config/systemd/user/ https://scripts.usbx.me/main/MergerFS-Rclone/Service%20Files/rclone-vfs.service && nano ~/.config/systemd/user/rclone-vfs.service

The rclone config contents with secrets removed.

Paste config here

A log from the command with the -vv flag


You need one service file for every mount.

cp rclone-vfs.service rclone-vfs1.service
  1. edit rclone-vfs1.service changing these two lines:
ExecStart=%h/bin/rclone mount gdrive1: %h/Stuff/Mount1 \
StandardOutput=file:%h/scripts/rclone_vfs_mount1.log
  1. repeat for other remotes

hi you are the best thank you very much it works :wink:

1 Like

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