First install python3 and python3-pip

Check if python3 is installed:

python3 –version

If not install python3:

apt install python3-pip

Install python3-pip

apt install python3-pip

Check if pip3 is installed:

pip3 –version

Install dbxfs in Linux

The dbxfs officially supports Linux and Mac OS. However, it should work on any POSIX system that provides a FUSE-compatible library or has the ability to mount SMB shares. Since it is written for Python 3.5, it can installed using pip3 package manager.

And, install FUSE library as well.

On Debian-based systems, run the following command to install FUSE:

$ sudo apt install libfuse2

Mount Dropbox folder locally Using Dbxfs In Linux

Create a mount point to mount your dropbox folder in your local file system.

$ mkdir ~/mydropbox

Then, mount the dropbox folder locally using dbxfs utility as shown below:

$ dbxfs ~/mydropbox

You will be asked to generate an access token:

To generate an access token, just navigate to the URL given in the above output from your web browser and click Allow to authenticate Dropbox access. You need to log in to your dropbox account to complete authorization process.

A new authorization code will be generated in the next screen. Copy the code and head back to your Terminal and paste it into cli-dbxfs prompt to finish the process.

You will be then asked to save the credentials for future access. Type Y or N whether you want to save or decline. And then, you need to enter a passphrase twice for the new access token.

Finally, click Y to accept “/home/username/mydropbox” as the default mount point. If you want to set different path, type N and enter the location of your choice.

All done! From now on, you can see your Dropbox folder is locally mounted in your filesystem.

Change Access Token Storage Path

By default, the dbxfs application will store your Dropbox access token in the system keyring or an encrypted file. However, you might want to store it in a gpg encrypted file or something else. If so, get an access token by creating a personal app on the Dropbox developers app console.

Create a new app on the DBX Platform

Once the app is created, click Generate button in the next button. This access token can be used to access your Dropbox account via the API. Don’t share your access token with anyone.

Generate access token

Once you created an access token, encrypt it using any encryption tools of your choice, such as CryptomaterCryptkeeperCryptGoCryptrTombToplip and GnuPG etc., and store it in your preferred location.

Next edit the dbxfs configuration file and add the following line in it:

"access_token_command": ["gpg", "--decrypt", "/path/to/access/token/file.gpg"]

You can find the dbxfs configuration file by running the following command:

$ dbxfs --print-default-config-file

For more details, refer dbxfs help section:

$ dbxfs -h

As you can see, mounting Dropfox folder locally in your file system using Dbxfs utility is no big deal. As far tested, dbxfs just works fine as expected. Give it a try if you’re interested to see how it works and let us know about your experience in the comment section below.

Leave a Reply