If you bind the [udp_tracker], [http_tracker] or [http_api] to port 0. The OS will bind to a random unused port.
This is to be expected. Torrust however does not inform the user which ports have been bound to.
This is what the console displays:
2023-02-16T12:35:49.246529+01:00 [torrust_tracker::jobs::udp_tracker][INFO] Starting UDP server on: udp://0.0.0.0:0
While the udp server actually bound to port 52862 in my case.
It would be nice to log the actual bound ports in the console.
[PR #156] provides a wrapper struct for the udp server and http api. These wrapper structs also include the bind_address (udp server) for the udp server or http api.