How do I set up a Minecraft server on a specific port?

Solution 1:

You can specify the Port in the server.properties file, which should exist next to your server executable:

server-port=<desired-port>

more information