Start traccar server under non root user

pavelik7 years ago

Hallo,
I am using CentOS 7 for running traccar server. How to run it under non root user? Missed I something in config file or It need to create new init startup file? Can you somebody share it?
Thanks

Anton Tananaev7 years ago

You can manually run it as a non root user.

pavelik6 years ago

Answer:

  1. stop traccar service
  2. create linux user
  3. in /opt/traccar/conf/wrapper.conf set:
wrapper.app.account=myuser
wrapper.app.password=password_only_if_user_has_login_password
  1. change file permissions on /opt/traccar for your user
  2. start traccar service
Trac5 years ago

It is not working in Centos 7.1

Trac5 years ago

That being said, we highly recommend you do not run Traccar as root user.

You can achive this by adding a systemd Drop-In to the traccar.service. For that, follow these steps:

mkdir  /etc/systemd/system/traccar.service.d/
touch /etc/systemd/system/traccar.service.d/run-as-user.conf
[Service]
User=traccar
Group=traccar
pavelik5 years ago

Ok, you are right. But my post is right for older version of traccar server < 4.0.

Trac5 years ago

What about new version 4.5 Linux?
How configure it to run Traccar as non root user?