Thanks, worked well on Armbian too, except for the autostart.
9) systemctl enable traccar.service
Thanks for this guide, I managed install Traccar along Octoprint on pi Zero W (waiting for 3B+).
I'm new to this SSH so I don't really know how this thing work, but managed to enable autostart after shutdown.
So, after creating traccar.service file and adding command lines,
I changed file permition to allow access to everyone:
sudo chmod 0777 traccar.service
then enabled service with:
sudo systemctl enable traccar.service
after that it should print that something was created, and it shoud be it. Restart and it should bootup automaticly.
I hope this will help to someone.
HI!
can I assign an external ip to access the raspberry as a vps?
regards!
You can forward all requests to your rpi, setting portforwarding on your router (a vpn it's better but common trackers just send packets to an ip:port). To avoid security problems I hosted all on a hetzner's vps (3.04€/month, 1vcpu 2gb ram 20gb storage, few cents for backups, I'm really happy)
Thanks Dario,
how many devices can you track with your hardware?
I have a google cloud platform instance with 10GB HDD, 3,75GB RAM, single core CPU and ubuntu 16.04 with only one tracker on it. I would like to get an idea of how many devices this hardware could support.
Regards!
It's absolutely overkill, actually I have 7 registered (but just 2 active now, other sends few points) and I am consuming 700mb of ram... You could try and if it's not enough just close it, you will pay the daily usage up to 3.04/month.
I am on google testing the service with the 300 dollars of initial credit they offer, but I will definitely not stop there, it is very expensive. Contaboo has good prices, do you have any experience with them?
Actually I am also looking for more accurate information on the consumption of resources for 200 devices with a report every 30s to have a clear idea about which vps should I pay.
I have no experience in it, but 200 devices are quite a lot, assuming a linear increase, you need a lot of ram. I read there are some possible optimizations, ask to Anton Tananaev, you need qualified help
Hi Dario, I migrate to hetzner but I can't open the port 80.
Do you know how can I open it?
Regards!
I am successfully running Traccar on my Raspberry Pi but cannot get autostart to work using the script above.
Checking journalctl, I get:
traccar.service: Changing to the requested working directory failed: No such file or directory
traccar.service: Failed at step CHDIR spawning /bin/sh: No such file or directory
But /opt/traccar and /bin/sh do exist, with sh redirecting to dash.
Do I have a permissions problem? Grateful for advice on how to get this working. Many thanks.
Good evening, I used the script in the description but it does not start. If I start it manualy it boots up. This is what journalctl replies to me
ago 30 00:19:16 raspberrypi systemd[16170]: traccar.service: Failed to determine user credentials: No such process
ago 30 00:19:16 raspberrypi systemd[16170]: traccar.service: Failed at step USER spawning /bin/sh: No such process
Requirements:
Steps:
Create directory "mkdir -+ /opt/traccar" and switch to "cd /opt/traccar"
Download Traccar server zip file traccar-other-*.zip from traccar download page https://www.traccar.org/download/,
use at the moment wget https://github.com/tananaev/traccar/releases/download/v3.11/traccar-other-3.11.zip
Extract the zip file traccar-other-*.zip by using at the moment: "unzip traccar-other-3.11.zip
and delete the zip file rm -f traccar-other-3.11.zip
After this step you have the server installed on your raspberry and you can start it with
"java -jar tracker-server.jar conf/traccar.xml" (in the /opt/traccar folder)
Check that the server starts. The last line should be something "Server - started". One line before you can see the server port of the webserver.
Open your browser and enter http://localhost:<port> (replace the port with the finding, usually 8082)
If the UI will be displayed all is correctly installed.
Some problems that can happen when you start the server:
For the next step press STRG+C to stop the server again.
If you want to install a autostart for traccar server follow the next steps:
[Unit]
Description=Traccar Service
After=network.target
Conflicts=shutdown.target
[Service]
WorkingDirectory=/opt/traccar
SyslogIdentifier=traccarserver
ExecStart=/bin/sh -c "exec java -jar tracker-server.jar conf/traccar.xml"
Type=simple
Restart=on-failure
SuccessExitStatus=143
[Install]
WantedBy=multi-user.target
--> You see there the same output as when you start it manually.