Home Dropbox Dbxfs – Mount Dropbox Folder Locally As Virtual File System In Linux

Dbxfs – Mount Dropbox Folder Locally As Virtual File System In Linux

By sk
Published: Updated: 17.3K views

A while ago, we discussed all the possible ways to mount Google drive locally as a virtual file system and access the files stored in the google drive from your Linux operating system. Today, we are going to learn to mount Dropbox folder in your local file system using dbxfs utility in Linux.

What is dbxfs?

The dbxfs utility is used to mount your Dropbox folder locally as a virtual filesystem in Linux and Unix-like operating systems. While it is easy to install Dropbox client in Linux, this approach slightly differs from the official method.

It is a command line dropbox client and requires no disk space for access. The dbxfs application is free, open source and written in Python.

Install dbxfs in Linux

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 be installed using pip3 package manager. Refer the following guide if you haven't installed Pip yet.

And, install FUSE library as well.

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

$ sudo apt install libfuse2

On Fedora:

$ sudo dnf install fuse

Once you installed all required dependencies, run the following command to install dbxfs utility:

$ pip3 install dbxfs

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:

Generate access token 1

Generate 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.

Authorize dropbox

Authorize dropbox

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.

Generate access token 2

Generate access token

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

Dropbox folder in file manager

Dropbox folder in file manager

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

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

Generate access token

Once you created an access token, encrypt it using any encryption tools of your choice, such as CryptomaterCryptkeeper, CryptGo, Cryptr, Tomb, Toplip 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.

Resources:

You May Also Like

10 comments

David H. Durgee December 14, 2018 - 7:53 am

Does the dbxfs mounted dropbox folder support syncing? As you might be aware, dropbox is changing their linux support and I am one of many users no longer able to use their linux client as they have dropped support for any file system but ext4 on linux. If dbxfs does include syncing support then this would be a great substitute for their linux client.

Reply
RSYDW March 22, 2019 - 8:24 am

Great Article.

Reply
Gwyneth Llewelyn June 10, 2019 - 12:50 am

Works like a charm. Thank you so much for your very extensive instructions! (Note: I’m using ext4 in the filesystem for the mount point, I have no idea if that makes any difference whatsoever, but I can certainly access all my files on Dropbox very easily)

Reply
Diogo Nardelli Siebert August 3, 2020 - 12:10 am

DBXFS is terrible. It works for a few seconds and then ist just freezes. The problem is that it freezes the whole filesystem, even an ls command in my home folder stop working. I recognize the effort and intention of the developers, but we (linux users) have to stop using dropbox, their support for the Linux community is just nonexistent.

Reply
RICCARDO November 10, 2020 - 3:34 pm

I have 2 dropbox accounts, I can I add (mount) the second account after mounting the first one?

Reply
sk November 10, 2020 - 8:06 pm

I think it is possible, but I haven’t tested it though. Please check it yourself and see if it works.

Reply
shahi February 10, 2021 - 4:26 pm

Thanks for your writing. I am facing one problem. When I try to create folder or file I suddenly get this error file/folder name is too long.

I don’t know why it show this warning. Any Suggestion.

Reply
Ian Liuzzi-Fedun August 17, 2022 - 3:03 am

Has anyone tried re-sharing the folder DBXFS uses? I get permissions errors when doing it one way or the other. If I set the folder for SMB to use, DBXFS doesn’t populate data, if i set SMB to share the folder DBXFS is using, it can’t get access.

Reply
Bastiaan April 11, 2024 - 5:16 pm

Super thx! Still works ano 2024

Reply

Leave a Comment

* By using this form you agree with the storage and handling of your data by this website.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

This website uses cookies to improve your experience. By using this site, we will assume that you're OK with it. Accept Read More