Dropbox headless

Dropbox headless

ubuntu 18.04 hw2018 server 18.04 dropbox systemd syncthing

This page is about dropbox, but as you may have noticed this page has the flag syncthing, because syncthing is an interesting FOSS alternative.

dropbox can be run on a headless machine, unfortunately only on x86 and x86_64.

Here is how to autostart dropbox for a user.

Download dropbox

cd ~ && wget -O - "https://www.dropbox.com/download?plat=lnx.x86_64" | tar xzf -
sudo wget -O /bin/dropbox "https://www.dropbox.com/download?dl=packages/dropbox.py"
sudo chmod +x /bin/dropbox

Configuration

.dropbox-dist/dropboxd 
...
This computer isn't linked to any Dropbox account...
Please visit https://www.dropbox.com/cli_link_nonce?nonce=ALSO_COPY_THIS_KEY to link this device.
This computer isn't linked to any Dropbox account...
Please visit https://www.dropbox.com/cli_link_nonce?nonce=ALSO_COPY_THIS_KEY to link this device.
This computer isn't linked to any Dropbox account...
Please visit https://www.dropbox.com/cli_link_nonce?nonce=ALSO_COPY_THIS_KEY to link this device.

Open the link in your browser, accept, then kill CTRL-C/kbd>dropboxd

Autostart

mkdir -p ~/.config/systemd/user/
sudo loginctl enable-linger $USER
wget -O ~/.config/systemd/user/dropbox.service https://raw.githubusercontent.com/RandomReaper/dropbox-systemd-user-service/master/dropbox.service
systemctl --user daemon-reload && systemctl --user enable dropbox --now

Manually stopping and starting

systemctl --user stop dropbox

and

systemctl --user start dropbox

~~~

Question, remark, bug? Don't hesitate to contact me or report a bug.