`server.js` is using expressjs and runs the backend (file upload / communication with openpilot) and the useradmin dashboard to manage / view / download drives & logs.
`worker.js` is a background worker that is processing drives (analyzing video files & logs) to prepare drives for playback in cabana and to gather statistics. It automatically terminates itself after 60 minutes to make sure the video/log libraries do not cause memory leaks.
Both scripts can be started with a cronjob each minute, they use locking to make sure they run exclusively.
A compiled version of a custom cabana fork (https://github.com/florianbrede-ayet/retropilot-cabana) is directly bundled in the `cabana/` subdirectory and will be served by the express app. After starting `server.js`, cabana is ready to use.
backend = "https://api.commadotai.com/" # replace with the RetroPilot server
```
#### Option (b) Without code changes (not functional yet)
### Re-Registering OpenPilot Device
To re-register a freon previously registered on comma or a different server, you have to remove the old `dongleId` and reboot:
```
rm /data/params/d/DongleID
reboot
```
### Current Limitations
Right now, the OpenPilot dashboard does not display any statistics or pairing status.
The reason is that at least pre 0.8.3, the `offroad.apk` with react and comma-api is for some reason either ignoring `/etc/hosts` changes or not accepting the certificate from *Preparing > Option b)*.
Right now statistics are only available through the *RetroPilot Useradmin*, the beauty however is that the Pairing-QR-Code is always available so it's easy to unpair and repair the device to a different account on the RetroPilot Server.