Safely Sharing Files between Personal and Work Computers

My company doesn’t allow employees to connect to the company network from personal devices or use an unauthorised USB drive on work computers. This is a good security practice, but it can be inconvenient when I need to transfer files between my personal and work computers, for example my KeePass database. Syncthing is a good solution, but it requires both devices to be online at the same time. Fortunately, most companies have purchased Business licences for Microsoft 365, Google Workspace, or something similar, which typically includes commercial cloud storage. You don’t need to read on if both your personal and work computers are Windows—just log in to OneDrive with your work account on your personal computer and you’re done. But if you use Linux, like me, you might want to take a look at Rclone, which provides an rsync-like command that works with major cloud storage providers, as well as the ability to mount it as a local FUSE filesystem. This short article documents how I set up Rclone with OneDrive on my personal computer.

Install Rclone

Most distros have Rclone in their repositories, so you can install it with your package manager. But if you are on Debian, you might want to download the official binary instead of using the version in the repository, which strangely removes support for a lot of backends. However, the Debian package provides bash completion, which is not included in the official release. A good compromise is to install the Debian package, and then download the official release to e.g. ~/bin and prepend it to your $PATH. Rclone is developed in Go, so like other Go programs, everything is statically linked into a huge binary.

Setup

Configuration is pretty straightforward. Run rclone config to set up a new remote. You will be asked a series of questions, such as the name of the remote, the type, and other backend-specific questions. I just followed the defaults for OneDrive. Then you can create a mount point and mount the remote. For me there are three default folders there already: Apps, Attachments, and Microsoft Teams Chat Files. Just leave those alone and create a new folder for your files. You might also want to write some scripts that sync the files you use on both computers to the remote.

That’s it! Now you can access your files from your work computer without violating company policy.