Apps and Installations
Have a question about a Dropbox app or installation? Reach out to the Dropbox Community and get solutions, help, and advice from members.
Hi All,
I sucessfully installed dropbox on a headless ubuntu server using the following guide:
https://www.linuxbabe.com/ubuntu/install-dropbox-headless-ubuntu-server
The dropbox file/folders sync correctly when starting dropbox using the dropbox command line utiliy.
The dropbox daemon appears running:
$ systemctl status dropbox
● dropbox.service - Dropbox Daemon
Loaded: loaded (/etc/systemd/system/dropbox.service; enabled; vendor preset: enabled)
Active: active (running) since Wed 2023-01-04 13:24:15 PST; 5s ago
Process: 24630 ExecStop=/bin/kill -HUP $MAINPID (code=exited, status=0/SUCCESS)
Main PID: 24635 (dropbox)
CGroup: /system.slice/dropbox.service
├─24635 /opt/dropbox/dropbox-lnx.x86_64-163.4.5456/dropbox
└─24671 /home/rajeev/.dropbox-dist/dropbox-lnx.x86_64-164.4.7914/dropbox /newerversion
Jan 04 13:24:16 zeus dropboxd[24635]: dropbox: load fq extension '/opt/dropbox/dropbox-lnx.x86_64-163.4.5456/psutil._psutil_linux.cpython-38-x86_64-lin
Jan 04 13:24:16 zeus dropboxd[24635]: dropbox: load fq extension '/opt/dropbox/dropbox-lnx.x86_64-163.4.5456/psutil._psutil_posix.cpython-38-x86_64-lin
Jan 04 13:24:17 zeus dropboxd[24635]: dropbox: load fq extension '/opt/dropbox/dropbox-lnx.x86_64-163.4.5456/tornado.speedups.cpython-38-x86_64-linux-g
Jan 04 13:24:18 zeus dropboxd[24635]: dropbox: load fq extension '/opt/dropbox/dropbox-lnx.x86_64-163.4.5456/wrapt._wrappers.cpython-38-x86_64-linux-gn
Jan 04 13:24:19 zeus dropboxd[24635]: dropbox: load fq extension '/home/rajeev/.dropbox-dist/dropbox-lnx.x86_64-164.4.7914/cryptography.hazmat.bindings
Jan 04 13:24:19 zeus dropboxd[24635]: dropbox: load fq extension '/home/rajeev/.dropbox-dist/dropbox-lnx.x86_64-164.4.7914/cryptography.hazmat.bindings
Jan 04 13:24:19 zeus dropboxd[24635]: dropbox: load fq extension '/home/rajeev/.dropbox-dist/dropbox-lnx.x86_64-164.4.7914/apex._apex.cpython-38-x86_64
Jan 04 13:24:19 zeus dropboxd[24635]: dropbox: load fq extension '/home/rajeev/.dropbox-dist/dropbox-lnx.x86_64-164.4.7914/psutil._psutil_linux.cpython
Jan 04 13:24:19 zeus dropboxd[24635]: dropbox: load fq extension '/home/rajeev/.dropbox-dist/dropbox-lnx.x86_64-164.4.7914/psutil._psutil_posix.cpython
Jan 04 13:24:20 zeus dropboxd[24635]: dropbox: load fq extension '/home/rajeev/.dropbox-dist/dropbox-lnx.x86_64-164.4.7914/tornado.speedups.cpython-38-
After a reboot the sync does not appear to be running and the command line states Dropbox is not running:
$ dropbox status
Dropbox isn't running!
I require the dropbox to automatically sync after reboot. What am I missing?
The headless ubuntu Dropbox sync is syncing now without any manual intervention).
1) Use this link to install dropbox on ubuntu: https://www.dropbox.com/install-linux
2) Use this link to setup dropbox systemd service unit: https://www.linuxbabe.com/ubuntu/install-dropbox-headless-ubuntu-server
Modify the dropbox.service file to call dropboxd using the install location in step 1 (not location in step 2 guide)
What was not clear to me before is the dropbox systemd daemon is running in superuser mode under the "username" account. To access/control the dropbox daemon from command line, sudo -u username dropbox <options> must be done.
That sums it up. Thanks to the knowledgble members who posted in the thread.
Hey @jainraje, sorry to hear you're having issues with this.
Can you please clarify if you've enabled the desktop app to auto-start when you boot your device as outlined here?
Let me know and we'll take it from there.
Walter
Community Moderator @ Dropbox
dropbox.com/support
Did this post help you? If so, give it a Like below to let us know.
Need help with something else? Ask me a question!
Find Tips & Tricks Discover more ways to use Dropbox here!
Interested in Community Groups? Click here to join
HI Walter,
Thank you for your message.
To summarize I installed the headless dropbox on a headless ubuntu 16.04 and confired a systemd service unit to run at system boot time (using my username as opposed to root). Finally, I enabled the auto-start at system boot as any other systemd service unit by issuing the following command: $sudo systemctl enable dropbox
My understanding is the above will setup the system to always run the dropboxd after system reboot. No manual intervention is required.
The dropbox.py (Dropbox Desktop App) and dropboxd work together yes?
Every time I run dropbox status is always returns Dropbox isn't running yet some files appeared to sync correctly. So I'm really confused and do not feel confident the system is setup correctly.
@jainraje wrote:...
Every time I run dropbox status is always returns Dropbox isn't running yet some files appeared to sync correctly. ...
Hi @jainraje,
Did you make sure you have run 'dropbox status' under the same user context like the Dropbox daemon? Take in mind that every user can have independent Dropbox context and running the control script in one context targets the Dropbox daemon on the same context, not any other! 😉
Hope this helps.
I believe yes to your question.
Upon closer inspection is appears the daemon is having errors starting.
$sudo journalctl -u dropbox.service
systemd[1]: dropbox.service: Main process exited, code=killed, status=9/KILL
systemd[1]: dropbox.service: Unit entered failed state.
systemd[1]: dropbox.service: Failed with result 'signal'.
@jainraje wrote:I believe yes to your question.
...
Hm... 🤔... What's the meaning of 'believe' above? What's it actually?! That's the matter! What's getting back following:
ps axo user,comm | grep dropbox
Nothing comes back:
$ ps axo user,comm | grep dropbox
A few additional data points:
1) After a fresh reboot the dropbox systemd service unit fails during start-up:
$sudo journalctl -u dropbox.service
systemd[1]: Started Dropbox Daemon.
dropboxd[29288]: dropbox: load fq extension '/opt/dropbox/dropbox-lnx.x86_64-163.4.5456/cryptography.hazmat.bindings._openssl.cpython-38-x86_64-linux-gnu.so'
dropboxd[29288]: dropbox: load fq extension '/opt/dropbox/dropbox-lnx.x86_64-163.4.5456/cryptography.hazmat.bindings._padding.cpython-38-x86_64-linux-gnu.so'
dropboxd[29288]: dropbox: load fq extension '/opt/dropbox/dropbox-lnx.x86_64-163.4.5456/apex._apex.cpython-38-x86_64-linux-gnu.so'
dropboxd[29288]: dropbox: load fq extension '/opt/dropbox/dropbox-lnx.x86_64-163.4.5456/psutil._psutil_linux.cpython-38-x86_64-linux-gnu.so'
dropboxd[29288]: dropbox: load fq extension '/opt/dropbox/dropbox-lnx.x86_64-163.4.5456/psutil._psutil_posix.cpython-38-x86_64-linux-gnu.so'
dropboxd[29288]: dropbox: load fq extension '/opt/dropbox/dropbox-lnx.x86_64-163.4.5456/tornado.speedups.cpython-38-x86_64-linux-gnu.so'
dropboxd[29288]: dropbox: load fq extension '/opt/dropbox/dropbox-lnx.x86_64-163.4.5456/wrapt._wrappers.cpython-38-x86_64-linux-gnu.so'
dropboxd[29288]: dropbox: load fq extension '/home/user/.dropbox-dist/dropbox-lnx.x86_64-164.4.7914/cryptography.hazmat.bindings._padding.cpython-38-x86_64-linux-gnu.so'
dropboxd[29288]: dropbox: load fq extension '/home/user/.dropbox-dist/dropbox-lnx.x86_64-164.4.7914/apex._apex.cpython-38-x86_64-linux-gnu.so'
dropboxd[29288]: dropbox: load fq extension '/home/user/.dropbox-dist/dropbox-lnx.x86_64-164.4.7914/psutil._psutil_linux.cpython-38-x86_64-linux-gnu.so'
dropboxd[29288]: dropbox: load fq extension '/home/user/.dropbox-dist/dropbox-lnx.x86_64-164.4.7914/psutil._psutil_posix.cpython-38-x86_64-linux-gnu.so'
dropboxd[29288]: dropbox: load fq extension '/home/user/.dropbox-dist/dropbox-lnx.x86_64-164.4.7914/cryptography.hazmat.bindings._openssl.cpython-38-x86_64-linux-gnu.so'
dropboxd[29288]: dropbox: load fq extension '/home/user/.dropbox-dist/dropbox-lnx.x86_64-164.4.7914/tornado.speedups.cpython-38-x86_64-linux-gnu.so'
dropboxd[29288]: dropbox: load fq extension '/home/user/.dropbox-dist/dropbox-lnx.x86_64-164.4.7914/wrapt._wrappers.cpython-38-x86_64-linux-gnu.so'
systemd[1]: dropbox.service: Main process exited, code=killed, status=9/KILL
systemd[1]: dropbox.service: Unit entered failed state.
systemd[1]: dropbox.service: Failed with result 'signal'.
systemd[1]: dropbox.service: Service hold-off time over, scheduling restart.
systemd[1]: Stopped Dropbox Daemon.2) A dropbox process is running in memory:
2) A dropbox process is running in memory:
$top | grep dropbox
12229 user 20 0 398112 39552 20472 R 100.0 0.5 0:00.26 dropbox
@jainraje wrote:Nothing comes back:
$ ps axo user,comm | grep dropbox
If nothing comes back (at that moment at least), no any Dropbox daemon is running. I cannot support your service setup. You should check what's going wrong there; it's not a Dropbox issue.
@jainraje wrote:...
...
2) A dropbox process is running in memory:
$top | grep dropbox
12229 user 20 0 398112 39552 20472 R 100.0 0.5 0:00.26 dropbox
As seems, for some reason, it starts later. Why? 🧐 It's something you should figure out.
As can be seen the context is different! Now if you just run:
dropbox status
..., you will get "Dropbox isn't running!" for sure. Cosa it's so: there is not running Dropbox daemon in "rajeev" context; it's running in "user" context.
Your default context is rajeev, but you can switch to user using something like:
sudo -u user dropbox status
Now you will get the actual context (the user context). 😉
Good luck.
the `user` in the log was me removing my actual username. sorry that was misleading. there are only 2 contexts rajeev and root. i'm going to try to sort this out. i'm going to disable the dropbox systemd and run dropbox manually. i'll keep this thread updated. any comments or suggestions from you or others are well received. again, many thanks for your messages.
Update:
After disabling the dropbox systemd service unit and rebooting no dropbox was running in memory according to `top`. I was then able to successfully run dropbox from the command-line. All desired file/folders are synching at this point.
Now that via the command-line dropbox is working correctly I'll focus my attention on getting dropbox to auto synch after system boot using the systemd service unit. i recall reading somewhere a delay is required to get that scheme to work.
Hi there!
If you need more help you can view your support options (expected response time for a ticket is 24 hours), or contact us on Twitter or Facebook.
For more info on available support options for your Dropbox plan, see this article.
If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!