install Dropbox on a headless Ubuntu 10.04 LTS server

Hello folks,
in this post I would like to show you how easy it is to set up Dropbox on a Ubuntu server only using a ssh connection.

Ok, where to start. Hmm, first of all here is my setup:
I have a MiniITX mainboard with an Intel Atom CPU, 2GB RAM and 160GB HDD running 24/7 (almost ^_^). This system serves my as NAT Router to separate my network from the LAN in the building I am living. I bought it 3-4 years ago and it was really worth its price and by the way, energy consumption is really low (< 15 Watt). This system runs a Ubuntu 10.04 LTS server version and on this system I set up a Dropbox to have access to my account there too.

These sources were helpfull during my approach:

and basically this post is a mixture of both of them πŸ˜‰

In this post I wanna share the step that are necessary to setup Dropbox on a machine without a keyboard and monitor attached to it, this conditions are called “headless”. Well, we need access to this machine somehow, so I am using my laptop (Ubuntu Linux also) and ssh to connect to my headless machine (that implies that a ssh service/deamon is running there, but as far as I can remember installing a Ubuntu server automatically installs a ssh service).

First of all, you need a Dropbox account. If you don’t have one, get one for free here
If you don’t know about Dropbox, check their ad video on their webpage, it explains in pretty easy way what dropbox is and what it does.

Download and setup

Now open a ssh connection to your headless machine:

ssh user@machine

you are asked for your password and then you are connected.Β  Then you need to download the Dropbox client software. I have a 32bit system so I do:

wget -O dropbox.tar.gz ""

Having that you need to extract the archive using tar:

tar -xzvf dropbox.tar.gz

that creates a .dropbox-dist folder in the directory you run the command. I recommend to run that directly in your home directory.

For connecting your installation with your Dropbox account you need the system variable “LANG” to be set. Check it with

printenv LANG // what answers "de_DE.UTF-8" in my case

Connect the installation by starting:


what gives you something like this on your terminal:

This client is not linked to any account...
Please visit to link this machine.

Grab this link and paste it in your webbrowser and follow the steps shown. After the commandline shows you a message that says, that the client was successfully connected you can kill the deamon again (Ctrl-C).

Almost finished …

You have now Dropbox on your machine and connected to your account. BUT you just have killed the deamon that is necessary to sync all your files. Hmm one option is to start the deamon everytime you need it by hand


but believe me, that is not what you want. The other option is to create a small script and place it so in your system the dropbox deamon is always started automatically when your system starts, so basically you create a service πŸ˜‰ Create a file in /etc/init.d/:

sudo vim /etc/init.d/dropbox

Here is the content necessary for that script:

# dropbox service
# Replace with linux users you want to run Dropbox clients for
DROPBOX_USERS="put your server username here"


start() {
  echo "Starting dropbox..."
  for dbuser in $DROPBOX_USERS; do
    HOMEDIR=`getent passwd $dbuser | cut -d: -f6`
    if [ -x $HOMEDIR/$DAEMON ]; then
      HOME="$HOMEDIR" start-stop-daemon -b -o -c $dbuser -S -u $dbuser -x $HOMEDIR/$DAEMON

stop() {
  echo "Stopping dropbox..."
  for dbuser in $DROPBOX_USERS; do
    HOMEDIR=`getent passwd $dbuser | cut -d: -f6`
    if [ -x $HOMEDIR/$DAEMON ]; then
      start-stop-daemon -o -c $dbuser -K -u $dbuser -x $HOMEDIR/$DAEMON

status() {
  for dbuser in $DROPBOX_USERS; do
    dbpid=`pgrep -u $dbuser dropbox`
    if [ -z $dbpid ] ; then
      echo "dropboxd for USER $dbuser: not running."
      echo "dropboxd for USER $dbuser: running (pid $dbpid)"

case "$1" in




    echo "Usage: /etc/init.d/dropbox {start|stop|reload|force-reload|restart|status}"
    exit 1


exit 0

The only thing you need to adjust is the variable “DROPBOX_USERS” in the fourth line, everything else can stay as it is (you may need to pay attention to the intents of each line, bash is somehow a little restrictive about that. Best way: use “Tab” to intent the lines.)

Now you have to make the script executable by:

sudo chmod +x /etc/init.d/dropbox

and add it to the start up application after reboot:

sudo update-rc.d dropbox defaults

Now you can handle this service as every service on a ubuntu machine:

sudo service dropbox {start|stop|reload|force-reload|restart|status}

If it does not react the first time, you may need a reboot, but then you should get something like:

user@bluepill-server:/etc/init.d$ sudo service dropbox status
[sudo] password for user:
dropboxd for USER user: running (pid 2215)

Done !

Great, you have now dropbox running on your headless machine, congratulations πŸ˜‰ wasn’t that hard wasn’t it?

If you are satisfied with your work you can stop here. Otherwise you can read on for a little extra sugar πŸ˜‰

voluntary exercise …

You may have noticed that you can not see whether your headless installation is really working or not. Ok, you can check with “sudo service dropbox status” but you may want to know how fast the sync is done and so on. Mainly the information you get hovering your mouse over the normal desktop icon of dropbox. There is something quite similar to that: you canΒ utilise a python script offered by dropbox. Get it here and change permissions:

wget -O ~/.dropbox/ ""
chmod 755 ~/.dropbox/

By executing

.dropbox/ status

you get information what your installation is currently doing. Stating the script without parameter gives you an overview on the available commands.

A nice feature I’ve seen here is “exclude“, with what it seams possible the exclude files form syncing (haven’t tried that so far, but neat πŸ˜‰ )

Enable “lansync” is also a nice feature if you have several machines in a LAN connected data transfer is much faster than syncing only via the dropbox cloud.

So well I wanna make a stop here, say thanks for reading and your interest. In one of the upcoming post I wanna show you some fancy stuff you can to with this installation. So I hope you check back πŸ˜‰


4 thoughts on “install Dropbox on a headless Ubuntu 10.04 LTS server

  1. correction: you must download in USER’s directory, NOT dropbox-dist folder.

    ~: wget “”
    ~: chmod 755

  2. dropbox is extremely helpful. you helped me to find it and so i can use it with best results. thank you for your help

  3. Nice guide! However, it seems like they changed the name of the daemon to “dropboxd” now, so your init.d script needs to be updated.

Comments are closed.