What ports do you need to open up to make the server public?

I’m trying to open up a server to the public, but I don’t know what ports to open on the router. Can anyone help me with this?

To open up a minecraft server game to outside players, you only need to open up the game port specified in the server.properties.

Is the game port the server port?

Yes, and the default game/server port is 25565. It’s changeable, but I’d recommend keeping the default until you get a good grasp on how port forwarding works.

Each port you want available from outside needs to be port forwarded, which often includes 25565, 8443 (webui) and 22 (ssh). Note, these don’t need to be port forwarded, they are just common candidates for people who also want to connect to their servers for tasks when also outside their home network.