Issues setting up rclone.service

I am following the guide as given on to create a service for rclone to autostart during boot. However it keeps giving me this error, systemd[1]: /etc/systemd/system/rclone.service:12: Missing '='.

What is your rclone version (output from rclone version)

rclone v1.53.3

  • os/arch: linux/amd64
  • go version: go1.15.5

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

Ubuntu 18.04.3 LTS

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)

systemctl start rclone

Description=RClone Service

ExecStart=/usr/bin/rclone mount gcrypt: /GD \
--allow-other \
# Google Drive is a polling remote so this value can be set very high and any changes are detected via polling.
--dir-cache-time 1000h \
# The log level output
--log-level INFO \
# Location of the log file
--log-file /opt/rclone/logs/rclone.log \
# I reduce the poll interval down to 15 seconds as this makes changes appear fast the API quotas per day are huge
--poll-interval 15s \
# This is setting the file permission on the mount to user and group have the same access and other can read
--umask 002 \
# Please set this to your own value below
--user-agent randomappname101 \
# This sets up the remote control daemon so you can issue rc commands locally
--rc \
# This is the default port it runs on
--rc-addr :5572 \
# no-auth is used as no one else uses my server and it is not a shared seedbox
--rc-no-auth \
# The local disk used for caching
--cache-dir=/cache \
# This is used for caching files to local disk for streaming
--vfs-cache-mode full \
# This limits the cache size to the value below
--vfs-cache-max-size 500G \
# This limits the age in the cache if the size is reached and it removes the oldest files first
--vfs-cache-max-age 336h \
# This sets a per file bandwidth control and I limit this to a little bigger than my largest bitrate I'd want to play
--bwlimit-file 16M
ExecStop=/bin/fusermount -uz /GD
ExecStartPost=/usr/bin/rclone rc vfs/refresh recursive=true --rc-addr _async=true

#### The rclone config contents with secrets removed.  
root@multimedia-server:/etc/systemd/system# cat /home/beheerder/.config/rclone/rclone.conf
type = drive
client_id = lol
client_secret = lol
scope = drive
root_folder_id = z
token = {"z

type = crypt
remote = GD:media
filename_encryption = standard
directory_name_encryption = true
password = scret1
password2 = scret12

Paste config here

#### A log from the command with the `-vv` flag  
<!-- You should use 3 backticks to begin and end your paste to make it readable.  Or use a service such as or   -->

Paste log here

You need to remove the \ at the end as the \ means there is something on the next line so the last line needs to not have that.

hi, is that the problem, as it seems that same as from your guide?
ExecStart=/usr/bin/rclone mount gcrypt: /GD \

and both the OP and your example have the same last line that does not have a trailing slash
--bwlimit-file 16M

This would also fail because no rcd is enabled.

You want to set a log file up so you can see any errors as well.

Oops. Yes, I missed the last line as it was colored and I thought it was a comment.
In a service file, when you continue a line, you must put a \ at the end of the line so it knows to go to the next.

K i got it all working thanks so much!
However my docker starts before my gmedia, it is possible to fix this?

I use wants/requires to keep things in order and shut down if something is stopped.

An example would be using like this:

Description=gmedia mergerfs mount

So my gmedia starts after rclone and will stop if rclone stops.

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