Hello,
Yes, just set Port to zero and the server will choose the first available port that finds.
TsgcWebSocketServer1.Port := 0;
You can know which is the Port selected accessing to the bindings property.
TsgcWebSocketServer1.Bindings.Items[0].Port;
Kind Regards,
Sergio