Rclone mount autostrt rasp 4

What is the problem you are having with rclone?

I am not able to start rclone mount at boot on a raspberry pi 4

What is your rclone version (output from rclone version)

rclone v1.45

  • os/arch: linux/arm
  • go version: go1.11.6

Which OS you are using and how many bits (eg Windows 7, 64 bit)

PRETTY_NAME="Raspbian GNU/Linux 10 (buster)"
NAME="Raspbian GNU/Linux"
VERSION="10 (buster)"

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

One Drive

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

I configured rclone mount to mount (only write mode) a one drive folder. Using the command:

rclone --vfs-cache-mode writes mount --daemon --allow-non-empty "onedrive":raspberry_ftp ~/ftp

the folder is perfectly mounted and it works as expected. What I need, is to mount the folder at startup. So, I created a service in /etc/systemd/rclone.service:

Description=One Drive (rclone)

ExecStart=/usr/bin/rclone mount \
        --config=/home/my/.config/rclone/rclone.conf \
        --vfs-cache-mode writes \
        --allow-non-empty \
        onedrive:raspberry_ftp /home/my/ftp
ExecStop=/bin/fusermount -u /home/my/ftp


Running the command: systemctl start rclone results in:

==== AUTHENTICATING FOR org.freedesktop.systemd1.manage-units ===
Authentication is required to start 'rclone.service'.
Multiple identities can be used for authentication:
 1.  ,,, (pi)
 2.  root
Choose identity to authenticate as (1-2):
password:  <-- I insert the password...
polkit-agent-helper-1: pam_authenticate failed: Authentication failure

. Running the same command with sudo, I get:

Failed to start rclone.service: Unit rclone.service not found.

The rclone config contents with secrets removed.

/.config/rclone $ cat rclone.conf
type = onedrive
token = ...
drive_id = 7c4d17511cae5ec2
drive_type = personal

hello and welcome to the forum,

you are using an very old version of rclone, so update to v1.52.2

perhaps you are choosing the wrong identity or typing in the wrong password

Thanks, I updated the version. After that, I've found the issue. The rclone service should have been created in the folder /etc/systemd/system instead of /etc/systemd

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