Skip to content

Systemd user service template to automate mounting remote file systems using rclone

License

Notifications You must be signed in to change notification settings

nilreml/rclone-mount-systemd

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Systemd user service template to automate mounting remote file systems using rclone

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published