You can just copy the folder and create a new systemd service config.
Can I simply create a copy of /etc/systemd/system/traccar.service as traccar2.service and change the contents to the below?
[Unit]
Description=traccar2
After=network.target
[Service]
Type=simple
WorkingDirectory=/opt/traccar2
ExecStart=/opt/traccar2/jre/bin/java -jar tracker-server.jar conf/traccar.xml
SyslogIdentifier=traccar2
SuccessExitStatus=143
[Install]
WantedBy=multi-user.target
I don't see why not.
What I'm asking is if this is enough to make the copy of traccar work as a daemon that starts automatically on system reboot etc. like the original.
Should be enough.
gustavofarias are you managed to create working two instance on the same IP address?
You should probably share details about the errors that you get.
Anton sorry for taking your time and thank you for the answer, it was just a stupid mistake with permission files after I paste the files to the new directory.
I successfully ran three instances over one IP address.
Thank you.
followed all of the above steps, just to add, I changed my device ports from 5xxx to 6xxx on default xml . Created a new DB traccar2 on mysql . Changed web port to 8083. currently have 2 instances, working now for a few hours.
hello, sorry for reply this old topic, but i think i can not found solution for how to create windows service for my another traccar instances, please help.
thanks in advance.
I would like to install 2 instances of Traccar on the same server.
I think changing the web port, the protocol ports and the database schema of the second instance is enough to avoid any interference between the two instances.
But how can I change the default installation folder?