Automating Proton Drive Mount on Linux with rclone and systemd

This guide explains how to automatically mount Proton Drive on a Linux system using rclone and systemd. Although tested on Arch Linux, the steps are adaptable to most Linux distributions with minor ch

This guide explains how to automatically mount Proton Drive on a Linux system using rclone and systemd. Although tested on Arch Linux, the steps are adaptable to most Linux distributions with minor changes.

Key Features

– Mounts Proton Drive at login through systemd user services
– Utilizes rclone with –vfs-cache-mode writes for compatibility
– Runs as a background service with logging
– Supports FUSE with –allow-other for broader access

Getting Started

1. Install Necessary Packages

Ensure fuse3 is installed for mounting purposes:

sudo pacman -S fuse3

Install rclone (version 1.64.0 or newer). The preferred method is using the precompiled binary:

curl -O https://downloads.rclone.org/rclone-current-linux-amd64.zip
unzip rclone-current-linux-amd64.zip
cd rclone-*
sudo cp rclone /usr/local/bin/
sudo chmod +x /usr/local/bin/rclone

Verify the installation:

rclone version (Must be v1.64.0+)

2. Set Up Proton Drive Remote

Run rclone configuration:

rclone config

Select ‘n’ for a new remote, name it “proton,” and choose ‘protondrive’ as the type. Log in via your browser when prompted, then save the configuration.

3. Run the Setup Script

Make the script executable and run it:

chmod +x setup-proton-mount.sh
./setup-proton-mount.sh

This script creates the mount point (~/.ProtonDrive), writes the systemd service file, updates fuse configuration if needed, adds your user to the fuse group, and enables the mount service.

4. Finalize and Verify

Reboot or log out and back in if added to the fuse group for changes to take effect.

Verify the mount:

ls ~/ProtonDrive

Check the systemd service status:

systemctl –user status rclone-proton.mount.service

Uninstallation

To disable auto-mounting and remove the setup:

systemctl –user disable –now rclone-proton.mount.service
rm ~/.config/systemd/user/rclone-proton.mount.service

Optionally, delete the Proton Drive mount point if no longer needed.

Required Components

– rclone (version 1.64.0+) with Proton Drive support
– fuse3
– A Proton Drive account

Troubleshooting Tips

If mounting fails, check logs with:

journalctl –user -u rclone-proton.mount.service

To restart the service manually:

systemctl –user restart rclone-proton.mount.service

References

– rclone Proton Drive Documentation
– systemd user services guide

Frequently Asked Questions (FAQs)

Q: Can I use this setup on other Linux distributions?
A: Yes, with minor adjustments related to package management and service configuration, this method works on most Linux distros.

Q: What versions of rclone are compatible?
A: rclone version 1.64.0 or newer is required for Proton Drive support.

Q: How do I troubleshoot mounting issues?
A: Check logs with journalctl and restart the service if needed. Ensure your Proton Drive credentials and network are functioning properly.

Q: Is this method safe for sensitive data?
A: Using fuse and systemd services is generally secure, but always ensure your system’s security measures are up to date when handling sensitive information.

Q: Can I customize the mount point?
A: Yes, modify the setup script or manually change the mount directory after setup.

More Reading

Post navigation

Leave a Comment

Leave a Reply

Your email address will not be published. Required fields are marked *

If you like this post you might also like these

back to top