Rclone service will not start

What is the problem you are having with rclone?

can't get rclone to run as a service. I can manually mount fine from mount command

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

rclone v1.59.0-beta.6046.6ea26b508

  • os/version: ubuntu 20.04 (64 bit)
  • os/kernel: 5.4.0-105-generic (x86_64)
  • os/type: linux
  • os/arch: amd64
  • go/version: go1.17.8
  • go/linking: static
  • go/tags: none
yes

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)

sudo systemctl start rclone.service

The rclone config contents with secrets removed.

Paste config here
```type = drive
client_id = ***
client_secret = ****
scope = drive
root_folder_id =
token = {"access_token":"***>
team_drive =```

A log from the command with the -vv flag

Command mount needs 2 arguments maximum: you provided 3 non flag arguments: ["gdrive:" "ExecStop=/bin/fusermount" "/home/nekoz/cloud"]

hello and welcome to the forum,

please post the rclone.service

/etc/systemd/system/rclone.service

[Unit]
Description=Google Drive (rclone)
AssertPathIsDirectory=/home/nekoz/cloud
After=network-online.target

[Service]
Type=notify
ExecStart=/usr/bin/rclone mount gdrive:
--config=/home/nekoz/.config/rclone/rclone.conf
--allow-other
--log-level INFO
--log-file /home/nekoz/rclone.log
--cache-dir=/cache
--vfs-cache-mode full
--vfs-cache-max-size 25G
--vfs-cache-max-age 12h
ExecStop=/bin/fusermount -u /home/nekoz/cloud
Restart=always
RestartSec=10

[Install]
WantedBy=multi-user.target

is that the exact file? should be formatted something like this.
which is from here

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

[Service]
Type=notify
Environment=RCLONE_CONFIG=/opt/rclone/rclone.conf
KillMode=none
RestartSec=5
ExecStart=/usr/bin/rclone mount gcrypt: /GD \
# This is for allowing users other than the user running rclone access to the mount
--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 5000h \
# Log file location
--log-file /opt/rclone/logs/rclone.log \
# Set the log level
--log-level NOTICE \
# I reduce the poll interval down to 10 seconds as this makes changes appear fast the API quotas per day are huge
--poll-interval 10s \
# 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 someappname101 \
# 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=/tmp/cache \
#
# My quota per user / per 100 seconds is 20,000 requests. This can be found in your quota section.
# This changes the sleep calls to something much lower to take advantage of the API boost.
# change the min sleep from 100ms
--drive-pacer-min-sleep 10ms \
# Changing to have the ability to burst higher
--drive-pacer-burst 200 \
# 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 250G \
# This limits the age in the cache if the size is reached and it removes the oldest files first
--vfs-cache-max-age 5000h \
# The polling interval for increased based on there is enough buffer space
--vfs-cache-poll-interval 5m \
# 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 32M
ExecStop=/bin/fusermount -uz /GD
ExecStartPost=/usr/bin/rclone rc vfs/refresh recursive=true --rc-addr 127.0.0.1:5572 _async=true
Restart=on-failure
User=felix
Group=felix

[Install]
WantedBy=multi-user.target

yes, this was a fresh swizzin install if that matters. I am also not using encryption.

that was just an example of a properly formatted service file and well tested service file.
something that you can just tweak for your use-case

please, can you post the exact service file, same as i did.
enclose the exact service file with three backticks, so it is formatted like my example
your example is missing all the trailing slashes?

[Unit]
Description=Google Drive (rclone)
Wants=network-online.target
After=network-online.target

[Service]
Type=notify
Environment=RCLONE_CONFIG=/home/nekoz/rclone/rclone.conf
KillMode=none
RestartSec=5
ExecStart=/usr/bin/rclone mount gdrive: /home/nekoz/cloud \
        --allow-other \
        --log-level INFO \
        --log-file /home/nekoz/rclone.log \
        --cache-dir=/cache \
        --vfs-cache-mode full \
        --vfs-cache-max-size 25G \
        --vfs-cache-max-age 12h \
ExecStop=/bin/fusermount -u /home/nekoz/cloud

[Install]
WantedBy=multi-user.target```

yeah, that is what i thought, an issue with trailing slashes.

change
--vfs-cache-max-age 12h \
to
--vfs-cache-max-age 12h

thanks you so much. all working now.

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