Traccar server vs website (http://demo.traccar.org/) versions

GrahamGo8 years ago

Hi I am just two days into using Traccar, and are most impressed. But I have a question. I installed Traccar server on Windows 10 and later tried another version on my Qnap NAS. Thinking that my NAS runs all the time, sips power and might be the way to go.

Anyway, after a few hours of playing I got both versions working well. Then later I tried using the website version demo.traccar.org

Here is my question. I must be missing something, but I really do not see the advantage of the Windows, or NAS server versions over demo.tracar.org

What are the advantages of one method over another?

jovi8 years ago

Hi GRAHAMGO I leave you a python3 script that solves me very good to install tracing in debian or ubuntu.

#!/usr/bin/python
# -*- coding: utf-8 -*-

#script para instalar traccar
#python3 gps.py

import sys
import os


def instalar():
    os.system("sudo apt-get update")
    os.system("clear")
    os.system("sudo apt-get upgrade")
    os.system("clear")
    os.system("sudo apt-get install tasksel")
    os.system("clear")
    os.system("sudo apt-get install unzip")
    os.system("clear")
    os.system("sudo apt-get install ufw")
    os.system("sudo apt-get install mc")
    os.system("clear")
    os.system("sudo tasksel")
    os.system("sudo wget https://github.com/tananaev/traccar/releases/download/v3.9/traccar-linux-3.9.zip")
    os.system("clear")

    os.system("ls")
    os.system("unzip traccar-linux-3.9.zip")
    os.system("sudo ./traccar.run")
    os.system("sudo /opt/traccar/bin/startDaemon.sh")



#REINICIO
def dir_script():
    os.system("mkdir /opt/traccar/script")
    print("directorio creado...")

def crear_reinicio():
    archi=open('/opt/traccar/script/reinicio.sh','w')
    archi.close()

def grabar_reinicio():
    archi=open('/opt/traccar/script/reinicio.sh','a')
    archi.write('#!/bin/bash\n')
    archi.write("#script que reinicia el server y borra el .log\n")
    archi.write("reboot\n")
    archi.write("rm /opt/traccar/logs/tracker-server.log\n")
    archi.close()

#MEMORIA
def crear_memoria():
    archi=open('/opt/traccar/script/memoria.sh','w')
    archi.close()

def grabar_memoria():
    archi=open('/opt/traccar/script/memoria.sh','a')
    archi.write('#!/bin/bash\n')
    archi.write("#este scrpit muestra lamemoria en html\n")
    archi.write("df -h >/opt/traccar/web/memory.html\n")
    archi.close()

#COPIA LOG
def crear_copialog():
    archi=open("/opt/traccar/script/copia.sh", "w")
    archi.close()

def grabar_copialog():
    archi=open('/opt/traccar/script/copia.sh','a')
    archi.write('#!/bin/bash\n')
    archi.write("#este script copia el log para luego verlo en html\n")
    archi.write("cp /opt/traccar/logs/tracker-server.log /opt/traccar/web/\n")
    archi.close()    

#BORRA LOG PESADOS

def crear_borrarlog():
    archi=open("/opt/traccar/script/borrar.sh","w")
    archi.close()

def grabar_borrarlog():
    archi=open('/opt/traccar/script/borrar.sh','a')
    archi.write('#!/bin/bash\n')
    archi.write("#este script borra el log\n")
    archi.write("cat /dev/null > /opt/traccar/logs/tracker-server.log\n")
    archi.close() 

#PERMISOS
def permisos_sh():
    os.system("chmod a+x /opt/traccar/script/reinicio.sh")
    os.system("chmod a+x /opt/traccar/script/memoria.sh")
    os.system("chmod a+x /opt/traccar/script/copia.sh")
    os.system("chmod a+x /opt/traccar/script/borrar.sh")
    os.system("sudo ufw allow 8082")

def crontab():
    print("agregar al fin")
    os.system("echo '*  *    * * *           sh /opt/traccar/script/copia.sh' >> /etc/crontab")
    os.system("echo '0 22    * * *           sh /opt/traccar/script/reinicio.sh' >> /etc/crontab")
    os.system("echo '*  *    * * *           sh /opt/traccar/script/memoria.sh' >> /etc/crontab")
    os.system("echo '30 *    * * *           sh /opt/traccar/script/borrar-logs.sh' >> /etc/crontab")


instalar()
dir_script()
crear_reinicio()
grabar_reinicio()
crear_memoria()
grabar_memoria()
crear_copialog()
grabar_copialog()
crear_borrarlog()
grabar_borrarlog()
permisos_sh()
crontab()
Anton Tananaev8 years ago

Demo server is the same as any other instance of Traccar. There are no differences other than the place where it's hosted. Demo server is hosted on our server in the cloud. Windows or NAS "version" will be hosted on your own hardware.

GrahamGo8 years ago

#Anton, Thank you for the information. Somehow I had convinced myself that there had to be a significant difference. But your explanation makes it clear. #Jovi appears to be offering an extension. So it appears that Traccar can be extended to provide additional functionality. Not that I know how to add or implement it! Anyway, than you both. I will continue to use my NAS instance. I need to gain some confidence after barely getting it going! Thanks

Anton Tananaev8 years ago

No, he doesn't offer any extension. It's just a script to install Traccar on Linux. If you want to install server, I would recommend to follow official instructions instead.

jovi8 years ago

Correct is just a script to install 'tracar' with everything necessary.
I am using this script because I install it in less than a minute.

GrahamGo8 years ago

Thank you #Jovi. Now I have it working I just want to gain some experience. The only place that I went wrong was the need to open a couple of ports. So pretty painless.

jovi8 years ago

sudo apt-get install ufw

Install 'ufw' and then open the ports.

Example -> ufw allow 8082