Install Dropbox headless on a Linux server


Dropbox est un service de stockage et de partage de copies de fichiers locaux en ligne proposé par Dropbox Inc.
Via un agent installé sur votre ordinateur ou mobile, il est capable de synchroniser une arborescence sur le cloud et permet ainsi une sauvegarde et un versionning de celui-ci.
L’usage classique de Dropbox est d’utiliser un outil sur votre Desktop. Un usage moins évident est de l’utiliser sans le programme Desktop Windows sur un serveur LINUX.
Nous allons voir comment l’installer et le configurer sur un serveur LINUX DEBIAN.

La première étape consiste à mettre à jour le système.

apt-get update
apt-get upgrade

Ensuite on télécharge Dropbox depuis le serveur officiel.
Pour un système 32bit :

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

Pour un système 64bit :

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

The archive's decompression is done in the .dropbox-dist directory
Execute the following command to run the program:


The program will then detect that the computer is not linked to any account and will ask you to authenticate. To link the server the program provides you with a URL to open in your browser.
As long as this step has not been completed, the program will continue to prompt you for this action.


On the Dropbox browser, we are asked to confirm this linking:


Once accepted, the linking is immediately taken into account.


It is now necessary to create the Dropbox service, and for this, a file is available here:

And if the file disappears one day you can download it here:

You install it like this:

wget -O /etc/systemd/system/dropbox@.service

Enable the start at boot of the machine:

systemctl enable dropbox@root

Validate the installation by restarting the systemctl daemon

systemctl daemon-reload

And then start the service:

systemctl start dropbox@root

Next, check the status:

systemctl status dropbox@root

Apparently, there is a problem. We see that the service is looking for the file in /home/root/.dropbox-dist/dropboxd
In our case, the file is in /root/.dropbox-dist/dropboxd
We need to modify the service script: /etc/systemd/system/dropbox@.service


We reload and restart the service:

systemctl daemon-reload
systemctl start dropbox@root

The indicator is green, we're good to go.


All our files are well synchronized.

If Dropbox is now functional on your server, it still remains tedious to use on the command line. To make our lives easier, the editor provides a Python script to use in CLI to communicate with the program.

cd /usr/bin && curl -LO && chmod +x

In case you need it, you can download it here:

By placing it in /usr/bin, you allow the system to provide you with access regardless of where you are.


One of the most useful commands is to verify the status of a file. Dropbox will be able to provide its status via a color code upon executing ls.


When reading the source of the utility, you can see the following statuses with the corresponding color code:
up to date : 32
syncing : 36
unsyncable: 41
selsync : 37