I will go for Command Line method, so we need Java and Maven
$ sudo apt install default-jdk $ sudo apt install maven $ git clone https://github.com/tananaev/traccar.git $ cd traccar $ git clone https://github.com/tananaev/traccar-web.git $ mvn package $ cd .. $ wget http://cdn.sencha.com/ext/gpl/ext-6.2.0-gpl.zip $ unzip ext-6.2.0-gpl.zip $ wget http://cdn.sencha.com/cmd/6.2.1/no-jre/SenchaCmd-6.2.1-linux-amd64.sh.zip $ unzip SenchaCmd-6.2.1-linux-amd64.sh.zip $ sudo ./SenchaCmd-6.2.1.29-linux-amd64.sh -q -dir /bin $ cd PATH to /traccar/traccar-web/tools $ ./minify.sh $ cd ../../setup $ wget https://excellmedia.dl.sourceforge.net/project/yajsw/yajsw/yajsw-stable-12.08/yajsw-stable-12.08.zip $ wget https://mlaan2.home.xs4all.nl/ispack/innosetup-5.5.9.exe $ sudo apt install wine-stable $ sudo apt install innoextract $ sudo apt install makeself $ sudo apt install dos2unix $ ./package.sh v3.9-latest
Now you've got the packages
copy traccar-linux-v3.9-latest.zip to your convenient directory and unzip it, then upgrade the current v3.9 to v3.9-latest.
Upgrade process is very simple:
Since we didn't change configurations & we didn't add data to current version "Simply"
$ unzip traccar-linux-v3.9-latest.zip $ sudo ./traccar.run $ sudo /opt/traccar/bin/startDaemon.sh
Very detailed documentation, thanks. Added some formatting as well.
When i do the below stage
Add the following lines to /etc/apache2/sites-available/domain-le-ssl.confProxyPass /api/socket ws://localhost:8082/api/socket ProxyPassReverse /api/socket ws://localhost:8082/api/socket ProxyPass / http://localhost:8082/ ProxyPassReverse / http://localhost:8082/
i have a blank file and nothing to add it to, if i copy the part you have and change the domain to mine I still cant access the site via port 80, any advice
I have found that there seems to be a default file in /var/www/html called index.html the file says i should replace it but i dont know what with so for now i have put a http redirect to point my page at port 8082 but i dont like having that in the top address and still want to change it.
Hi Amr
Thank you for the detailed installation guide, I have ran into a problem and hope maybe able to help me.
When I first installed traccar, I was able to view the site, however after make the said changes when I try to view the traccar webpage I get the apache2 Ubuntu default page. Please can you help me in resolving this error.
Many Thanks
Kyle
Hi Everyone,
I have the same issue, I can view traccar with localhost:8082 but after doing the above detailed proxy or redirection, I only see the Apache home page and it doesn't seem to actually direct it to http://localhost:8082. I will have to do the html redirection same as SpiderMax, but is there any other way of making sure it bypasses the index.html file in the html folder?
You need to edit the config file and change the web.port setting to which ever port you want.
Thanks SpiderMax, are you referring to the traccar.conf file? the config file is currently : (except obviously "mydomain.com" replaced with the actual url)
<IfModule mod_ssl.c>
<VirtualHost *:443>
ServerName www.mydomain.com
ServerAdmin admin@mydomain.com
DocumentRoot /var/www/html
ProxyPass /api/socket ws://localhost:8082/api/socket
ProxyPassReverse /api/socket ws://localhost:8082/api/socket
ProxyPass / http://localhost:8082/
ProxyPassReverse / http://localhost:8082/
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
SSLCertificateFile /etc/letsencrypt/live/www.domain.com/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/www.domain.com/privkey.pem
Include /etc/letsencrypt/options-ssl-apache.conf
</VirtualHost>
Yep I'm kind of confused too, all I'm getting is the apache page.
Just edit the /etc/apache2/sites-available/000-default.conf
with the ssl config.
I am sorry for late reply
You have to configure your vhosts properly and http proxy
After that use let's encrypt to use ssl
If you need it in detailed I can write it up
hi, great guide! im also getting just the apache page, is there a way to use ip instead of domain in vhosts?
Very good tutorial,but you didnt explain what about mysql database ?
Installing Latest Traccar on Ubuntu 16.10 Server x84_x64 on Remote VPS via SSH
Login to your server using putty http://www.putty.org/
If it's the first time you login to your server change root password by:
Then create a non root user and give him sudo permission.
Then switch to the new user.
From here we will use sudo command.
If your server version is Ubuntu 16.04 let's upgrade it first by the following commands:
Next, you need to install update-manager-core package on your system, if it’s not installed.
Next, edit /etc/update-manager/release-upgrades file
And set the variable prompt as below:
Then
Then you can go by the on-screen directives to complete the upgrade process.
Now let's install Java
Now let's install Apache
Set your vhosts in /etc/apache2/sites-available/ in my case and according my DNS configuration I will set 2 hosts wich is domain.com & www.domain.com
<VirtualHost *:80>
</VirtualHost>
2. configuration for vhost domain.com
Next, check for syntax errors by typing:
All you should see is:
Syntax OK
You can do a spot check right away to verify that everything went as planned by visiting your server's public IP address in your web browser
You should see "It works!"
Now lets use Let’s Encrypt to enable HTTPS on your website.
Then you can go by the on-screen directives
Now let's install traccar
Lest's test it by visiting domain.com:8082
Now lets redirect traccar port 8082 to http port 80
Add the following lines to /etc/apache2/sites-available/domain-le-ssl.conf
It should look like this
Now test it by visiting domain.com
Traccar server should work
Now edit /etc/apache2/sites-available/000-default-le-ssl.conf
It should look like this
Now let's set up our firewall
You should see
Status: inactive
Now you should see
Now your server is up and running and secure too.
Good luck!!!
I found a bug in the traccar-web regarding the registration button in the login page, so I will try to build latest traccar from the source after success I will post it.