Dropbox

From SME Server
PythonIcon.png Skill level: Advanced
The instructions on this page may require deviations from standard procedures. A good understanding of linux and Koozali SME Server is recommended.


Warning.png Warning:
At this time (August 2014) this procedure requires installation of gcc in order to compile python2.7 from source. Having gcc installed on your server could significantly compromise your server's security.
Thorough understanding of linux system management is required.

Proceed at your own risk


Dropbox can be installed on a SME server that also has python 2.7 installed.

Dropbox installation instructions for linux can be found here: https://www.dropbox.com/install?os=lnx

These instructions describe a way to install Dropbox and link /root/Dropbox to an existing Dropbox account.

Prerequisites

Installation

Install the dropbox binaries

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

Link your SME server to an existing Dropbox account

At the command prompt on your SME server execute this command:

cd ~ && python2.7 .dropbox-dist/dropboxd

A URL will be displayed that can be used to link your SME server to an existing dropbox account. To complete the account link, you open the provided URL in a browser on a computer that will let you login to your account.

After you have successfully opened the account link URL, your SME server will display a message similar to:

This computer is now linked to Dropbox. Welcome <name>

Press <Ctrl>-C to close the dropbox daemon.

You will also get an email at the email address used by your dropbox account indicating that a new computer has been linked to your account.

Install the dropbox command-line manager

The dropbox command line manager is useful for stopping, starting, and monitoring the dropbox daemon.

cd ~
wget -O dropbox.py https://www.dropbox.com/download?dl=packages/dropbox.py
chmod 700 dropbox.py

You can now start the dropbox daemon manually using

python2.7 /root/dropbox.py start

Configure Dropbox to start at boot

While logged in as root, run 'crontab -e' and add the following line to the crontab file for root:

@reboot /usr/local/bin/python2.7 /root/dropbox.py start

Update Dropbox

cd ~ && python2.7 dropbox.py stop
uname -a |grep "x86_64" \
&& wget -O - "https://www.dropbox.com/download?plat=lnx.x86_64" | tar xzf - \
|| wget -O - "https://www.dropbox.com/download?plat=lnx.x86" | tar xzf -
python2.7 dropbox.py start

Using Dropbox

Once the dropbox daemon is installed and linked, your existing Dropbox folder will synchronize into ~/Dropbox.

I have not tested this, but you should be able to link arbitrary ibays or user folders into your Dropbox folder using hard links and possibly symlinks.