How to run Dropbox daemon in background?

If you're running the daemon from your own account, start it at boot time with Cron. Run crontab -e to edit your crontab file and add the line

@reboot ~/.dropbox-dist/dropboxd

run the command in this way:

($HOME/.dropbox-dist/dropboxd &)&

this will detach the process from tha actual terminal and put it in real background.

You will still have to start it back up manually after a reboot, though.


Here is my solution. This is on Debian 8.

Install Dropbox as per standard instructions. So far, I've only got one user connected, I don't know if this will work with multiple users as dropbox seems to register the machine and not the linux user account. If you know how to get multiple user accounts on one server working let us know.

https://www.dropbox.com/en_GB/install?os=lnx

Then install the python control script instructions but put it in /usr/bin and not your home directory bin.

Create file /lib/systemd/system/[email protected]:

[Unit]
Description=Dropbox as a system service user %i

[Service]
Type=forking
ExecStart=/usr/bin/dropbox start
ExecStop=/usr/bin/dropbox stop
User=%i
Group=%i
# 'LANG' might be unnecessary, since systemd already sets the
# locale for all services according to "/etc/locale.conf".
# Run `systemctl show-environment` to make sure.
Environment=LANG=en_US.utf-8

[Install]
WantedBy=multi-user.target

Enable the service for user fred:

$ sudo systemctl enable [email protected]

Then start the service:

$ sudo systemctl start [email protected]

Tags:

Daemon

Dropbox