Ask Your Question

Autostart dropbox daemon with Systemd

asked 2017-04-17 19:17:30 +0000

GeorgiY gravatar image

I have installed headless dropbox as described here

Also downloaded the Python management script and put it in /usr/local/lib as /usr/local/bin/dropbox

Created the following configuration file in my home directory - ~/.config/systemd/user/dropbox.service The content of the service is here - https://pastebin.com/uY7YiH0n

Then I enabled the service and started it and everything is fine.

The problem appeared when I reboot the machine and the service was not started.

systenctl --user status dropbox.service returns

● dropbox.service - Dropbox deamon Loaded: loaded (/home/georgi/.config/systemd/user/dropbox.service; enabled; vendor preset: enabled) Active: inactive (dead)

journalctl --user-unit dropbox.daemon returns https://pastebin.com/TjsfZK6x

I have no clue how to make the daemon start

edit retag flag offensive close merge delete


Is it possible, that after starting /usr/local/bin/dropboxd, the daemon detaches? If yes, try to make it not detach (see --help or man page). If you cannot stop the daemon from detaching, try changing the Type= option, e.g. to forking. See man systemd.service for details.

genodeftest ( 2017-04-17 21:17:55 +0000 )edit

thanks - it wasn't the type but rather the initial configuration and target. Check my answer.

GeorgiY ( 2017-04-18 18:15:02 +0000 )edit

1 answer

Sort by » oldest newest most voted

answered 2017-04-18 18:13:30 +0000

GeorgiY gravatar image

Just managed to start the service. There two things to be changed in the initial configuration:

First - Enable auto start systemd for user:

sudo loginctl enable-linger username

Second - Change the target in the configuration - there is no multi-user or network target for systemd in user mode. To list the available targets use the following command:

systemctl --user list-units -t target

The target should be changed for the After= in the [Unit] section and WantedBy= [Install].

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

[hide preview]

Use your votes!

  • Use the 30 daily voting points that you get!
  • Up-vote well framed questions that provide enough information to enable people provide answers.
  • Thank your helpers by up-voting their comments and answers. If a question you asked has been answered, accept the best answer by clicking on the checkbox on the left side of the answer.
  • Down-voting might cost you karma, but you should consider doing so for incorrect or clearly detrimental questions and answers.


Asked: 2017-04-17 19:17:30 +0000

Seen: 35 times

Last updated: Apr 18