Rclone Mount using Systemd

This guide is for advanced users only and it serves as a guide for you to use rclone. The systemd files here are the recommended settings for our slots and will subject to change whenever there are new configurations that are appropriate for the slots. Furthermore, Ultra.cc is not responsible for any data loss or application errors due to this setup should you proceed and will not provide official support for it due to the large volume of variables and different configurations possible with rclone. You may visit the community discord server for help.

Please make yourself aware of the Ultra.cc Fair Usage Policy. It is very important not to mount your Cloud storage to any of the premade folders. Do not download directly to a rclone mount from a torrent or nzbget client. Both will create massive instability for both you and everyone else on your server. Always follow the documentation and create a new folder for mounting. It is your responsibility to ensure usage is within acceptable limits.

Please do not mount to any of the default directories such as:
downloads
files
media
bin
.apps
.config
www
/homexx/username/
or any pre-created directory found on your Ultra.cc Slot

Is this method of rclone mounting suitable for your use case?

This method is not suitable for you if you wish to upload/write data to your rclone mount.

Overview

Rclone's Mount allows you to mount any of your cloud storage accounts as part of your slot's file system using FUSE. In this guide, we will teach you how to run a rclone mount using systemd. Take note that this guide is setup using Google Drive as the cloud storage provider used. Should you use any other cloud storage providers, you may need consult rclone documentation for the appropriate flags for your setup.

There are many ways to mount rclone. You can run the rclone Mount using the screen utility, create a script for running rclone Mount, and checking if the command is still alive, using the --daemon flag, just to mention a few.

We recommend using systemd for several reasons:

rclone mount with no mergerfs

If you don't need to upload files to your mount, follow this guide.

Should you need to upload files or you're planning an automated setup involving your cloud storage, we recommend using Rclone VFS and MergerFS Setup instead.

Preparation

kbguides@lw902:~$ mkdir -p ~/Stuff/Mount && mkdir ~/.tmp-rclone
kbguides@lw902:~$
kbguides@lw902:~$ mkdir ~/scripts
kbguides@lw902:~$
$ @lw902:~$ rclone listremotes
Gsuite:

Downloading Rclone Service File

Rclone Mount for Most Remotes
wget -P ~/.config/systemd/user/ https://scripts.usbx.me/main/MergerFS-Rclone/Service%20Files/rclone-normal.service && nano ~/.config/systemd/user/rclone-normal.service
Google Drive Rclone Mount for Media Streaming
wget -P ~/.config/systemd/user/ https://scripts.usbx.me/main/MergerFS-Rclone/Service%20Files/rclone-vfs.service && nano ~/.config/systemd/user/rclone-vfs.service

Editing your service file

Example rclone-normal.service

Rclone.png

Example rclone-vfs.service

Annotation-on-2021-08-11-at-20-19-06.png

Systemd Commands

{mount-name} refers to the service of your choice. Either rclone-normal.service or rclone-vfs.service

Enabling and starting Rclone mount: systemctl --user enable --now {mount-name}.service
Restart Rclone Mount: systemctl --user restart {mount-name}.service
Stop Rclone Mount: systemctl --user stop {mount-name}.service
Stop and disable Rclone mount: systemctl --user disable --now {mount-name}.service (Remove service file after)

Revision #10
Created 10 May 2022 17:11:56 by Raikiri
Updated 11 December 2023 20:43:37 by Neutrino