Systemd unit file for rclone `inactive (dead)` at boot

What is the problem you are having with rclone?

My rclone systemctl unit works if I start it manually but doesn't come up at boot.

What is your rclone version (output from rclone version)

$ rclone --version
rclone v1.55.1
- os/type: linux
- os/arch: amd64
- go/version: go1.16.3
- go/linking: static
- go/tags: none

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

Ubuntu 20.10

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

MS OneDrive

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

rclone mount (via systemctl, see below)

The rclone config contents with secrets removed.

type = onedrive
region = global
token = REDACTED
drive_id = REDACTED
drive_type = business

A log from the command with the -vv flag

There's nothing in the log file since the last reboot

More info

I've installed the unit in --user mode with

systemctl --user enable rclone.service
systemctl --user start rclone.service

After reboot, it's inactive (dead):

$ systemctl --user status rclone.service 
● rclone.service - RClone Service
     Loaded: loaded (/etc/xdg/systemd/user/rclone.service; enabled; vend>
     Active: inactive (dead)

Here's the unit file:

$ systemctl --user cat rclone.service 
# /etc/xdg/systemd/user/rclone.service
Description=RClone Service


ExecStart=/usr/bin/rclone \
  mount onedrive: \
  /mnt/onedrive \
  --config /home/tom/.config/rclone/rclone.conf \
  --log-file /var/log/rclone/rclone.log \
  --log-level INFO \
  --vfs-cache-mode full \
  --cache-dir /home/tom/.cache/rclone/onedrive

ExecStop=/bin/fusermount -u -z \


There's nothing in the log file since the last reboot. is active:

$ systemctl status
● - Network is Online
     Loaded: loaded (/lib/systemd/system/; static)
     Active: active since Wed 2021-06-02 08:33:02 AEST; 1h 41min ago
       Docs: man:systemd.special(7)

Jun 02 08:33:02 tom systemd[1]: Reached target Network is Online.

And running systemctl --user start rclone.service brings the mount up.

There's a similar closed issue called "Systemctl service starts manually, but not on boot" (seems I'm not permitted to link to it, sorry). The fix in that thread was to disable and re-enable the service, which I've tried. The problem still exists after reboot.

There are some other systemd issues on the forum that seem to have been caused by windows line endings. That's not the case here, I wrote the file on a linux machine and checked the encoding.

I would appreciate any further suggestions because I'm not sure how to troubleshoot this. In particular I'm not sure if these lines are correct:


Thanks for reading!

hello and welcome to the forum,

best to use these settings from @Animosity022

1 Like

Thanks for the suggestion. The only difference I can see (apart from running the remote control daemon) is that unit uses Restart=on-failure.

I changed my unit file from Restart=on-abort to Restart=on-failure, reloaded (disable / enable) and rebooted and it still didn't start.

sorry, not too knowledgeable about systemd.

hopefully, @Animosity022 or someone else will stop by soon.....

1 Like

Can you share the output of:

systemctl --user disable rclone.service
systemctl --user enable rclone.service
1 Like
$ systemctl --user disable rclone.service
Removed /home/tom/.config/systemd/user/

$ systemctl --user enable rclone.service
Created symlink /home/tom/.config/systemd/user/ → /etc/xdg/systemd/user/rclone.service.

Oh I think I see.

You are running as a user.

I think should be:

I normally don't run as user as I have root on my server.

And if you run this, you should see "green dots" over "red dots".


As an example.

systemctl --user list-dependencies
1 Like

Thanks very much for the help!

Fixed with:

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