This service will use the same remote name you specified when using rclone config create. If you haven't done that yet, do so now.
Next, create the mountpoint for your remote. The service uses the location ~/mnt/<remote> by default.
mkdir ~/mnt/dropboxThe --allow-other option is required in order to work in many desktop environments. This flag must be enabled by adding user_allow_other to /etc/fuse.conf. If you aren't using a desktop environment, such as on a server, this option can be omitted.
Save the rclone@.service file in ~/.config/systemd/user/
Make sure you include the @. This is required to work.
As your normal user, run:
systemctl --user daemon-reloadYou can now start/enable each remote by using rclone@<remote>
systemctl --user enable --now rclone@dropbox
https://gist.github.com/kabili207/2cd2d637e5c7617411a666d8d7e97101
[Unit]
Description=rclone: Remote FUSE filesystem for cloud storage config %i
Wants=network-online.target
After=network-online.target
[Service]
Type=notify
ExecStartPre=-/usr/bin/mkdir -p /mnt/rclone/%i
Environment="RCLONE_CONFIG_PASS=1234567890"
ExecStart=/usr/bin/rclone mount
%i: /mnt/rclone/%i
--config=%h/.config/rclone/rclone.jf.conf
--allow-other
--vfs-cache-mode full
--vfs-cache-max-size 5G
--vfs-cache-max-age 6h
--vfs-read-chunk-size 128M
--vfs-read-chunk-size-limit 1G
--buffer-size 64M
--dir-cache-time 72h
--poll-interval 15s
--transfers 8
--multi-thread-cutoff 128M
--multi-thread-streams 4
--log-level ERROR
ExecStop=/bin/fusermount -uz /mnt/rclone/%i
[Install]
WantedBy=default.target