On a hosted server
A hosting provider gives every server a public address and a port. On StormNodes it is shown at the top of the server page in the panel, in the form address:port. That is exactly what players paste into Add Server, and it works from anywhere because the server is already reachable from the internet.
If the port is the Minecraft default, 25565, players can leave it off. Any other port must be included after a colon. A custom domain or subdomain can hide the port entirely, which is covered in the guide on connecting a domain to your server.
On your own computer: local versus public IP
A server on your PC has two addresses. The local IP, usually something like 192.168.1.20, only works for devices on the same home network. The public IP is the address your router has on the internet, and it is the one friends outside your house need.
On Windows, run ipconfig in a command prompt and look for IPv4 Address to find the local IP. On macOS and Linux, check the network settings or run ip addr. To find the public IP, open any "what is my IP" service in a browser on the same network.
- Same house or same Wi-Fi: use the local IP, or localhost on the server PC itself
- Friends elsewhere: use the public IP, which only works after port forwarding
- Never hand out 0.0.0.0 or 127.0.0.1, they do not point at your server from outside
Why the public IP alone often fails
Knowing your public IP is not enough on its own. The router has to forward port 25565 to your PC, the PC's firewall has to allow Java through, and your internet provider must actually give you a public address. Many mobile and some fibre connections use carrier-grade NAT, where no amount of port forwarding will make the server reachable.
Most home connections also change their public IP from time to time, which breaks the address you shared. A dynamic DNS service or a hosted server avoids that.
Finding the address of somebody else's server
For a public server, the address is on its website, its Discord or the server list where you found it. For a friend's server, ask them for the address and the port; there is no reliable way to discover it from inside the game, and scanning for servers is not something to do on networks you do not own.