{"id":23307406,"url":"https://github.com/tobiasmcvey/rclonesetup","last_synced_at":"2025-08-22T11:31:17.895Z","repository":{"id":167154973,"uuid":"340893340","full_name":"tobiasmcvey/rclonesetup","owner":"tobiasmcvey","description":"How to setup and mount rclone remote drives on boot using Linux and Mac","archived":false,"fork":false,"pushed_at":"2021-02-23T21:23:12.000Z","size":16,"stargazers_count":39,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-09T04:11:16.792Z","etag":null,"topics":["boot","launchd","osxfuse","rclone","shell"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tobiasmcvey.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-02-21T12:13:40.000Z","updated_at":"2024-12-23T14:59:27.000Z","dependencies_parsed_at":null,"dependency_job_id":"dd48de86-4e64-400d-a074-002c1b085963","html_url":"https://github.com/tobiasmcvey/rclonesetup","commit_stats":null,"previous_names":["tobiasmcvey/rclonesetup"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/tobiasmcvey/rclonesetup","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tobiasmcvey%2Frclonesetup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tobiasmcvey%2Frclonesetup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tobiasmcvey%2Frclonesetup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tobiasmcvey%2Frclonesetup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tobiasmcvey","download_url":"https://codeload.github.com/tobiasmcvey/rclonesetup/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tobiasmcvey%2Frclonesetup/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271629573,"owners_count":24793153,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-22T02:00:08.480Z","response_time":65,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["boot","launchd","osxfuse","rclone","shell"],"created_at":"2024-12-20T12:35:48.836Z","updated_at":"2025-08-22T11:31:17.887Z","avatar_url":"https://github.com/tobiasmcvey.png","language":"Shell","funding_links":[],"categories":["shell"],"sub_categories":[],"readme":"# **Rclone setup**\n\nRclone is a tool for mounting remote drives. It allows us to move files and make backups with schedules and specific rules on which folders to sync.\n\nRead more at [rclone.org](https://rclone.org/)\n\n- [**Rclone setup**](#rclone-setup)\n\t- [**Mac OSX Prerequisite: Install OSXFuse**](#mac-osx-prerequisite-install-osxfuse)\n\t- [**Install Rclone**](#install-rclone)\n\t- [**Optional: Get private credentials**](#optional-get-private-credentials)\n\t- [**Configure remote**](#configure-remote)\n\t- [**Mount remote manually**](#mount-remote-manually)\n\t- [**Mount remote on boot**](#mount-remote-on-boot)\n\t\t- [**On Linux**](#on-linux)\n\t\t- [**On Mac OSX**](#on-mac-osx)\n\t- [**How to unmount remotes**](#how-to-unmount-remotes)\n\t\t- [**On Linux**](#on-linux-1)\n\t\t- [**On Mac OSX**](#on-mac-osx-1)\n\n## **Mac OSX Prerequisite: Install OSXFuse**\n\nOnly required for setup on Mac.\n\nGet OSXFuse at [osxfuse.github.io](https://osxfuse.github.io/)\n\n## **Install Rclone**\n\nCheck latest install instructions at [rclone.org](https://rclone.org/downloads/)\n\n```bash\ncurl https://rclone.org/install.sh | sudo bash\n```\n\n## **Optional: Get private credentials**\n\nYou can use your own credentials if you don't want to be rate limited. These credentials need to be stored locally for rclone to read. Otherwise you will use the shared credentials at the official rclone project.\n\nFor Google drive, follow [this guide](https://rclone.org/drive/#service-account-support)\nFor Microsoft onedrive, follow [this guide](https://rclone.org/onedrive/#getting-your-own-client-id-and-key)\n\n## **Configure remote**\n\nWe use the same command to create a new remote, edit existing remotes and remove them.\n\n```bash\nrclone config\n```\n\nVerify you have access to your drive. \n\n**Verifying access to Google Drive**\n\n```bash\nrclone -v --drive-impersonate foo@example.com lsf gdrive:backup\n```\n\n## **Mount remote manually**\n\nMounting a drive is quite straightforward. Please read up on the flags.\n\n```bash\nrclone mount remote:path /path/to/mountpoint [flags]\n# example: mount local folder gdrive to remote private_drive\n# rclone mount private_gdrive: gdrive\n```\n## **Mount remote on boot**\n\n### **On Linux**\n\nI used cron to mount the remote drives on boot but you can also use systemd.\n\n```bash\n# restart rclone mount for google drive on reboot\n@reboot /home/username/projects/rclonesetup/mountrclone.sh\n```\n\n### **On Mac OSX**\n\nI couldn't make cron load this on boot on a Mac, but launchd works. Here's how to set it up to launch silently on user login.\n\nCheck out [launchd.info](https://launchd.info/) for an introduction.\n\nI chose to make a shell script also so I can easily add and remove drives.\n\nCreate a `plist` file for the launchd job, then add it with `launchctl`. \n\nI chose to make this a Launch Agent for the *specific logged in user* instead of a system task because the files and remote drive probably belong to a specific person and not all users on the same machine. \n\nHere's an example shell script to silently mount a drive as a daemon:\n\n```bash\n#!/bin/zsh\n# run rclone as a daemon to silently mount drives without launching terminal on login\nrclone mount --daemon remotename:path localpath\n```\n\nMake the script executable with `chmod +x script.sh`\n\nHere's a template for launching a shell script with launchd on login:\n\n```xml\n\u003c?xml version=\"1.0\" encoding=\"UTF-8\"?\u003e\n\t\u003c!DOCTYPE plist PUBLIC \"-//Apple Computer//DTD PLIST 1.0//EN\"\n\t\t\"http://www.apple.com/DTDs/PropertyList-1.0.dtd\"\u003e\n\t\u003cplist version=\"1.0\"\u003e\n\t\u003cdict\u003e\n\t\t\u003ckey\u003eEnvironmentVariables\u003c/key\u003e\n\t\t\u003cdict\u003e\n\t\t\t\u003ckey\u003ePATH\u003c/key\u003e\n\t\t\t\u003cstring\u003eaddpath\u003c/string\u003e\n\t\t\u003c/dict\u003e\n\t\t\u003ckey\u003eLabel\u003c/key\u003e\n\t\t\u003cstring\u003ecom.mountrclone\u003c/string\u003e\n\t\t\u003ckey\u003eProgram\u003c/key\u003e\n\t\t\u003cstring\u003epathtoshellscript.sh\u003c/string\u003e\n\t\t\u003ckey\u003eRunAtLoad\u003c/key\u003e\n\t\t\u003ctrue/\u003e\n\t\t\u003ckey\u003eStandardOutPath\u003c/key\u003e\n\t\t\u003cstring\u003epathto/rclonesetup/out.log\u003c/string\u003e\n\t\t\u003ckey\u003eStandardErrorPath\u003c/key\u003e\n\t\t\u003cstring\u003epathto/error.log\u003c/string\u003e\n\t\u003c/dict\u003e\n\t\u003c/plist\u003e\n```\n\nThese files should follow a naming convention to be the same name as the task. Look at existing tasks for some examples. Here are some of mine:\n\n```\ncom.cisco.proximity.plist\n```\n\nAdd this file to your user's library path, which should look like this `/Users/username/Library/LaunchAgents`\n\nIf you want to make this a system task then you need to use the System folder instead.\n\nThen add the job:\n\n```bash\n# permanently load job for logged in user launch agents\nlaunchctl load -w ~/Library/LaunchAgents/com.mountrclone.plist\n# permanently unload job \nlaunchctl unload -w ~/Library/LaunchAgents/com.mountrclone.plist\n```\n\nIf there's a problem with the job then there should be an error command when attempting to load it.\n\nTry to reboot, login and check if the drive was mounted.\n\n## **How to unmount remotes**\n\n### **On Linux**\n\n```bash\nsudo umount \u003cdevice|directory\u003e\n# for example, to unmount /dev/sdc1\n# sudo umount /dev/sdc1\n```\n\n### **On Mac OSX**\n\nUse OSXFuse to unmount drives. \n\n```bash\numount drivename\n# example: unmount drive called gdrive\n#  umount gdrive\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftobiasmcvey%2Frclonesetup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftobiasmcvey%2Frclonesetup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftobiasmcvey%2Frclonesetup/lists"}