Can I run my Minecraft server while being away from my home connection?

Solution 1:

As long as you know a publicly routable IP address for your server, you can connect to it like any normal network-listening program—Minecraft servers do not care if the files (and by extension, the entire computer system) have been moved to another place. If you're moving the server to another computer, just pack up the entire folder with the server jar, the world files, the server.properties, everything, and just move it directly to your new host machine.

If the computer hosting is behind a NAT (you can know this if ipconfig (Windows) or ip addr (Mac/Linux) on that computer says 192.168.something or 10.something instead of a proper IP address), and you would like to connect from outside the network covered by that NAT, you will need to find a way to punch through the NAT. The most common methods include:

  • Asking the network administrator nicely to add a "port forwarding" rule for you, or configuring the router if you own it. For obvious reasons, you probably can't do this at your school.
  • Using a public reverse proxy like ngrok, which lets you connect out from the server machine to another computer which redirects connections back.
  • Installing an IP overlay network like Yggdrasil and connecting through it.

You may also wish, if you do any of the above, to configure your server with a whitelist—it would be a right shame if someone scanning random IP addresses and ports happened to find your server and decided to do something mean :(