-
-
Save MuslimHS/4bbe8ec9bc08a9fbc71b73d298773c6b to your computer and use it in GitHub Desktop.
Rclone systemd user service
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # User service for Rclone mounting | |
| # | |
| # Place in ${HOME}/.config/systemd/user/ | |
| # File must include the '@' (ex rclone@.service) | |
| # As your normal user, run | |
| # systemctl --user daemon-reload | |
| # You can now start/enable each remote by using rclone@<remote> | |
| # systemctl --user enable rclone@dropbox | |
| # systemctl --user start rclone@dropbox | |
| [Unit] | |
| Description=rclone: Remote FUSE filesystem for cloud storage config %i | |
| Documentation=man:rclone(1) | |
| After=network-online.target | |
| Wants=network-online.target | |
| AssertPathIsDirectory=%h/mnt/%i | |
| [Service] | |
| Type=notify | |
| ExecStart= \ | |
| /usr/bin/rclone mount \ | |
| --config=%h/.config/rclone/rclone.conf \ | |
| --fast-list \ | |
| --vfs-cache-mode writes \ | |
| --vfs-cache-max-size 100M \ | |
| --log-level INFO \ | |
| --log-file /tmp/rclone-%i.log \ | |
| --umask 022 \ | |
| --allow-other \ | |
| %i: %h/mnt/%i | |
| ExecStop=/bin/fusermount -u %h/mnt/%i | |
| [Install] | |
| WantedBy=default.target |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
📦 Rclone Mount via systemd User Service
Setup Instructions
1. Create the user systemd service
Paste this into the file:
2. Reload the user systemd daemon
3. Enable and start the service
Replace
<remote>with your rclone remote name (example:gdrive-muslim-indomode):Example:
systemctl --user enable --now rclone@gdrive-muslim-indomode4. Check service status
or
If it shows
active (running), the mount is successful!📜 View Logs
cat /tmp/rclone-<remote>.logtail -f /tmp/rclone-<remote>.logjournalctl --user -u rclone@<remote>journalctl --user -u rclone@<remote> -f⚡ Notes
/tmp/and will be deleted on reboot unless you move them to a permanent location.✅ Example for
gdrive-muslim-indomode/home/muslim/mnt/gdrive-muslim-indomode/tmp/rclone-gdrive-muslim-indomode.logsystemctl --user enable --now rclone@gdrive-muslim-indomode