
This tutorial will show you how to mount Google Team Drive or Google Shared drives using rclone running as a service on Windows.
As you may know that you can run rclone as a daemon on Linux, which means that rclone is running in the background. But that feature is not available on Windows, so we need to use third-party software call nssm to make rclone running in the background as a service.
With rclone running as a service, rclone will run when Windows run this means you don't need to run rclone manually every time you restart Windows.
Prerequisites
- Windows 8 to 10, Windows Server 2012 R2 to 2019
- Rclone
- Nssm
- Winfsp
Configure rclone
-
Download rclone for windows from the following link https://rclone.org/downloads/
If your system is 64-bit download rclone 64-bit else download the 32-bit and extract it to C:\rclone -
Open a command prompt or cmd (press win+r and type cmd) and run rclone config
cd C:\rclone rclone config
-
Type n to create a new configuration and type whatever name for remote name, for example teamdrive
-
For the type of storage to configure, type 15 for Google Drive (rclone v1.54.0) the number may differ on another rclone version
-
Press enter for client_id>, client_secret>, scope> and service_account_file>
-
Type n for Edit advanced config? (y/n) and type y for Use auto config?, a new browser window will open, login using your google account
-
Back to the command prompt and type y for Configure this as a team drive? and choose your team drive by typing the number
-
Type q to exit rclone configuration
You can verify the rclone configuration file is created by going to "C:\Users\<YOUR USERNAME>\.config\rclone", there should be a file named rclone.conf
Configure NSSM to install rclone as a services
-
Download and install Winfsp from this link https://github.com/billziss-gh/winfsp/releases/latest
-
Download NSSM from this link https://nssm.cc/download and extract to C:\nssm
-
Open cmd as Administrator and open NSSM service installer GUI by typing the following command
cd C:\nssm\win64 nssm install rclone-teamdrive
You can change rclone-teamdrive to whatever service name you like.
Note: change the nssm folder to C:\nssm\win32 if you using windows 32-bit -
On NSSM service installer GUI window use the following setting and click Install service
Path: C:\rclone\rclone.exe
Startup directory: C:\rclone
Arguments: mount teamdrive: X: --vfs-cache-mode full --config "C:\Users\<YOUR USERNAME>\.config\rclone\rclone.conf"teamdrive: is rclone remote configuration name
X: is the drive letter where team drive will be mount, you can change to another drive letter -
Run rclone service by typing the following command
nssm start rclone-teamdrive
Or your can start manually by Opening Services window by typing services.msc on run (win+r), locate and click rclone-teamdrive and then click start to run rclone mount as a services
-
Verify the mount by opening windows explorer and check for drive X:
Additional NSSM command
-
Editing rclone service
nssm edit rclone-teamdrive
-
Deleting rclone service
nssm remove rclone-teamdrive
After that restart your windows
-
For another nssm command, you can type
nssm help
Useful links
Rclone Documentation : https://rclone.org/docs/Winfsp Documentation : https://github.com/billziss-gh/winfsp
NSSM Documentation : https://nssm.cc/usage