Build from Source

Traccar server consists of the back-end and the web interface. Make sure you get both repositories if you want web interface to work. Web interface is a git submodule in the main Traccar repository, so you can checkout everything you need with a single git command:

git clone --recursive https://github.com/tananaev/traccar.git

Build process contains of two parts. First is compiling server back-end from Java source code. Second one is creating installation files for various operating systems. Second part is most complicated and it's not required unless you want to distribute your application.

In most cases all you need is to build Traccar from source code and replace original files on the server with newly compiled ones.

Following instructions are only for building server side. Android and iOS apps are standard Android Studio and Xcode projects, so there are no special instructions required.

Build

Traccar is a Maven project. You need Java SDK version 6 or higher to build the project. For building the project I recommend one of the following options:

Eclipse

Eclipse is not recommended because of the number of reported problems with Eclipse Maven plugin.

Command Line

Make sure you have Maven and JDK installed. To generate binary files execute "mvn package" command in the terminal.

Compiling Web Interface

Web interface is written in JavaScript, so it doesn't generally require compiling. Release version of Traccar uses compressed version of web interface where all JavaScript are combined into one and minified. That's done for performance reasons.

If you modify web interface files, there are two deployment options:

Generate Installers (optional)

The only reason you would want to generate installers is to distribute your version of Traccar server. This is a very rare case.

You need to have Linux installed as the script is designed for Linux. I recommend latest version of Ubuntu or Mac. If you are on Windows, you can install Ubuntu in a virtual machine.

To generate installers, execute "setup/package.sh" shell script in the terminal. The script will check all requirements and show if anything is missing and where to download missing package.