Syncing files via Dropbox to a linux server

Posted on Aug 17, 2020

I have a penchant for keeping all my notes and todo lists in plain text, and these files are synced between by phone and laptops with Dropbox.

I also wanted the capability to quickly run scripts against them. The iPhone app Shortcuts allows you to run arbitrary code via ssh which was a perfect solution for me, so I needed my todo files somewhere that I could ssh into. For me, this was an linux server I keep running. These are the steps to setup Dropbox syncing a particular folder to your linux server.

First you need to install some extra dependencies 1 which are required by the Dropbox install script.

sudo apt-get install libc6 libxxf86vm1 libglapi-mesa libxdamage1 libxfixes3 libxcb-glx0 libxcb-dri2-0 libxcb-dri3-0 libxcb-present0 libxcb-sync1 libxshmfence1

We can then grab the correct version of the install script from

I am running Ubuntu 18.04 x64 so the install commands look like so.

cd ~ && wget -O - "" | tar xzf

That will download the install script and run it. We can then start running the Dropbox daemon. The first time we run this, it will prompt us to authorise ourselves by following a link in the browser. After doing so, it may appear to hang, but the daemon is just running in the foreground. You can ctrl-c to get out of it.


We then want to download the python script which Dropbox provides to control the service. The following will download it to your home directory.

cd ~ && wget -O ./

We can then use the script to setup the Dropbox service to autostart.

./ autostart

And then actually start it in the background.

./ start

If you are like me, you probably don’t want your entire Dropbox folder syncing to your server, so you can do the following. This will exclude the content of the Dropbox folder from syncing, and then specifically allow a certain folder. In this case some_folder_you_specifically_want_to_sync.

./ exclude add ~/Dropbox
./ exclude remove ~/Dropbox/some_folder_you_specifically_want_to_sync

Et voila! You now have a specific folder syncing to your Linux server with Dropbox!

  1. This was discovered after hitting upon a bug detailed here: ↩︎