Skip to content

Latest commit

 

History

History
55 lines (31 loc) · 1.51 KB

README.md

File metadata and controls

55 lines (31 loc) · 1.51 KB

rclone-mount-systemd

A systemd user service template to automate mounting remote file systems using rclone.

Overview

The service template will use the same [remote] name you specified when using rclone config create.

Each remote will be mounted in ~/mnt/[remote] (created automatically).

To avoid confusion, mounting will fail if the mount point isn't empty.

Preparation

If you are using a desktop environment:

Add user_allow_other to /etc/fuse.conf if not already there (this requires root privileges).

Install fusermount3 using your distribution's package manager.

For Debian: sudo apt install gvfs-fuse

Install

Place rclone@.service in ~/.config/systemd/user/.

NOTE: The filename must include the @, e.g. rclone@.service

As your normal user, run

systemctl --user daemon-reload

Usage

You may now start/enable each rclone remote by using rclone@[remote]

systemctl --user enable --now rclone@dropbox

Tips

Rclone's logs will be written in /tmp/rclone-[remote].log.

If you encounter the service ceasing to function when exiting the last session of ssh or not starting during boot, run

loginctl enable-linger [user]

Attribution

Credits to Amy Nagle and the discussion contributors in this very helpful GitHub gist.