Error in manual for installing on Ubuntu 18.04
When i try to make service autostart i continiously getting an error and it doesnt matter if i run it from user directory or trying to setup more secure configuration with dedicated user.
Only thing that help is change one raw in /etc/systemd/system/meshcentral.service
from
Capabilities=cap_net_bind_service+ep
to
AmbientCapabilities=cap_net_bind_service
I dont now why it happens, i dont have so deep understanding of these parameters, but anyway i hope this help someone and maybe we have an answer from developer.
I am very curious what a hell is that, it steals about an hour from my night life :)))
Posted Dec 18, 2019, 11:24 PM UTC
34
Oh wow, thank you for reporting this. I will fix the documentation right away. That parameter allows MeshCentral to bind to ports below 1025 like port 80 and 443. I looked at the systemd documentation online and indeed, not sure why "Capabilities=" would ever work. Thanks.
It's true mistery for me,but i have what i have,it's copy paste from my working config. I wonder if someone explain this problem
Looking at my Linux servers, I did not use the "Capabilities=" line at all since I use:
sudo setcap cap_net_bind_service=+ep /usr/bin/node
If you use "setcap" then you can run MeshCentral manually or using Systemd and it should work. If you use the AmbientCapabilities= it only works for Systemd. In any case, I just did a silent update of the documentation at https://www.meshcommander.com/meshcentral2.
Thank you very much for reporting this. I bet many others have run into this and not reported it.
Glad that i can help. And as far as i know if you use directly Setcap, you can ran into problems when kernel update arrived,it may reset this setting. But i dont fully confident about that