Ports are handled for you
Every server gets its own pair of ports, so two servers never clash and you never set one by hand. The Details tab lists them under Ports In Use.
At home on Windows
- Turn on Auto-manage UPnP and Auto-manage Firewall and HaruHost opens the ports when the server starts, where your router allows it.
- Or forward your port range for UDP once; HaruHost shows the rule under Devices → Manage device → Network Settings.
On a VPS
There is no router. Open your port range for UDP in the provider's firewall, if it has one, and friends join at the VPS's address.
Behind CGNAT
If your internet provider uses CGNAT, ports can't be forwarded at home. A small VPS with HaruHost gives the server its own public address; see game servers on a VPS.
Questions
TCP or UDP for a Bedrock server?
UDP. A TCP rule won't help Bedrock players connect.