I installed Dropbox using following commands

cd ~ && wget -O - "https://www.dropbox.com/download?plat=lnx.x86" | tar xzf -

Then I ran the demon with this command:


Now I want to sync my Dropbox data with the /var/www local directory.
Is it possible?

  • yes @Naveen.I can setup it to the /var/www/Dropbox using interfaces – underscore Jan 5 '14 at 10:14
  • I have my dropbox synced with a local folder on my laptop which is then synced with /var/www/. It's really nice. – Alvar Jun 25 '14 at 8:55
  • @Alvar how did you do that ? – underscore Jun 25 '14 at 9:19
  • See my answer! :) – Alvar Jun 25 '14 at 9:26

Dropbox currently does not support syncing folders outside the Dropbox folder, according to their web site.

However you can achieve this by creating a symbolic link between the Dropbox folder and the other folder you want sync, using this command:

sudo ln -s ~/Dropbox  **/path/to/another/folder**

So when you go inside /path/to/another/folder, you will be taken into ~/Dropbox
Make sure the other folder is accessible after linking.


According to their site https://www.dropbox.com/help/12/en you can't sync folders outside the Dropbox folder, but there is a workaround in Ubuntu

To get other folders synced into Dropbox you have to create a symbolic link from the target folder to the Dropbox folder

For example:

ln -sfn ~/Documents ~/Dropbox

My five cents:

Using a virtual machine it is quite easy

First stop all the shares or uninstall dropbox.

Just create virtual disk and mount it in /etc/fstab.

Mount it to the ~/Dropbox, i.e., /home/user/Dropbox/ . Like this

/dev/sdb1    /home/blue/Dropbox/           ext4    defaults        0       2

I have this setup on my laptop and often I edit the files on another computer and then test them on the laptop, takes 30 seconds for Dropbox to realize there are new files to sync, but works really great.

I created a symbolic linc with var/www/ and /home/user/code/.

run this in a terminal to setup the link between your local files and var/www

ln -s /home/user/code /var/www/

Now add /home/user/code to your dropbox folder. Then when you edit the files that are in /code via dropbox they will be changed also in /var/www/.

  • True, but you may run into permission problems if you link to your home folder. It is better to sync Dropbox to your /var/www/Dropbox folder and then link to /var/www – Jakke Jun 25 '14 at 11:00
  • @Jakke actually I don't get any permission errors, I've had this setup for half a year now. try it out if you don't believe me... – Alvar Jun 25 '14 at 11:06

I think this is the right command

sudo ln -s /path/to/another/folder ~/Dropbox

not this

sudo ln -s ~/Dropbox /path/to/another/folder

because he want to Dropbox this /var/www folder outside his server..

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.