default config file

stephana month ago

Hi,
i installed traccar following this guide:

https://www.traccar.org/install-digitalocean/

Unfortunately, i have the same problem as i had years ago, when i first installed an traccar server:
The config file does not contain any statements, and i dont get it from the
https://www.traccar.org/configuration-file/
site.
In my opinion it was wayyyy easier for me (and probably some other guys, too), if there was an default-config provided with any! config options included (and e.g. commented out).

Now i am here, searching how i get my parameters ( changing web.port to 80, disabling all the unnecessary ports and so on) into the config file
(right now i get

2024-12-26T00:29:18.468884+00:00 traccar systemd[1]: Started traccar.service - traccar.
2024-12-26T00:29:19.099379+00:00 traccar traccar[2220]: 2024-12-26 00:29:19 ERROR: Main method error -  - SAXParseException (... < Config:45 < <gener:-1 < *:-1 < ... < Main:117 < *:111)
2024-12-26T00:29:19.111719+00:00 traccar systemd[1]: traccar.service: Main process exited, code=exited, status=1/FAILURE
2024-12-26T00:29:19.111817+00:00 traccar systemd[1]: traccar.service: Failed with result 'exit-code'.

Is there anywhere an demo-config-file available?

Thanks,
Stephan

Anton Tananaeva month ago

What is the problem with the configuration documentation? It is complete and includes all the default values.

stephana month ago

Disclaimer: translated via ChatGPT as my english is not that good:

Hello, thank you for your response. I'm glad to hear that the documentation is complete, but for example, right at the first point, "protocol.address", I have to guess whether it refers to the IP address (protocol address – so I would understand an IP address here) or the interface ("If not specified, server will bind all interfaces." – I would understand "eth0" here).

This still leaves me unclear about how to set this option in an empty file as "valid XML" – I would never have come up with this:

<entry key='protocol.address'>192.168.0.1</entry>

And the fact that before that, there should be:

<?xml version="1.0" encoding="UTF-8"?> 
<!DOCTYPE properties SYSTEM 'http://java.sun.com/dtd/properties.dtd'> 
<properties>

I probably wouldn't have figured out just from the statement "make sure it's a valid XML file."

I believe it wouldn't be a big effort to provide an example configuration – it doesn't have to be fully complete, but at least it would give a starting point. If you disagree, that's totally fine with me – I just wanted to share my opinion since this is the second time I’ve encountered this problem (I set up a Traccar server 10 years ago and faced the same issue).

Anton Tananaeva month ago

I wouldn't argue too much about the address. The documentation might not be the best, but it an advanced feature that most people never need to worry about. And people who do, can easily find examples on the forum.

As for the XML format, this point doesn't make any sense to me. We already provide the configuration file by default. You don't need to worry about modifying any headers.