Hat-tip to pointer2null in the Dropbox wiki for the [systemctl info] (http://www.dropboxwiki.com/tips-and-tricks/install-dropbox-in-an-entirely-text-based-linux-environment#comment-2426857341)
As root
sudo add-apt-repository "deb http://linux.dropbox.com/ubuntu xenial main"
sudo apt-key adv --keyserver pgp.mit.edu --recv-keys 5044912E
sudo apt-get update
sudo apt-get install python-gpgme dropbox
Then switch to the user dropbox is intended to run as. So...
su (whoever)
cd ~
dropbox start -i
Let the client install - however, it will fail to start. So run
~/.dropbox-dist/dropboxd
Paste the token into a browser, logged into the account of the dropbox you wish to connect.
##The essential part to get it autostarting on reboot
Edit nano /etc/systemd/system/dropbox.service
and paste this - don't forget to modify User and Group in the script
[Unit]
Description=Dropbox Service
After=network.target
[Service]
ExecStart=/bin/sh -c '/usr/bin/dropbox start'
ExecStop=/bin/sh -c '/usr/bin/dropbox stop'
PIDFile=${HOME}/.dropbox/dropbox.pid
User=user
Group=group
Type=forking
Restart=on-failure
RestartSec=5
StartLimitInterval=60s
StartLimitBurst=3
[Install]
WantedBy=multi-user.target
Use systemctl start dropbox.service
to start the service now.
Use systemctl enable dropbox.service
to make it start automatically at boot.