Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have set up a Minecraft server and have built lots of things, now I want my friend to play on it too.

I'm hosting it on my home computer and don't want to have to set up a new server elsewhere so I need to allow my server to be accessible over the internet.

How can I make this server available for my friend to connect to over the internet?

share|improve this question

migrated from May 8 '11 at 9:45

This question came from our site for passionate videogamers on all platforms.

This question is only marginally about Gaming; the only gaming-relevant bit about this question is knowing that Minecraft uses port 25565 by default. Migrated to Super User, where more general networking problems are on topic. – badp May 8 '11 at 9:44

Here's what the scheme of things probably looks like:

┌───────────┐             ┌────────┐           ┌────────┐             ┌──────────┐
│ Your      │  │ Your   │82.15.X.Y  │ Friend │  │ Friend   │
│ computer  ├─────────────┤ router ├───────────┤ router ├─────────────┤ computer │
├───────────┤└────────┘  78.13.Z.T└────────┘└──────────┘
│ Minecraft ├ Port 25565

└───────────────────────────┘ └───────────────────┘ └────────────────────────────┘
      Your home network           Teh Internets            Friend home network

Your minecraft server is listening is listening on port 25565 of your home computer, However, this is a private address that only makes sense when connected to your router. Each router has its own private addresses, which means that your computer can be on, your friend computer can also be on and everything is still okay.

To connect to you, your friend needs the IP address your router is connected to the internet with. Your ISP (more or less) dynamically assigns this number to you and it's what those "what is my ip" sites show to you. So, to your friend, you're 82.15.X.Y, and that's what he will enter on Minecraft.

However, 82.15.X.Y is not your computer, but your router. Your router doesn't know what to do with connections to that port and rejects the connection. What now?

Your router needs to know that, if he sees attempts to connect to port 25565 (Minecraft servers' default listening port), he should forward those connections to the computer on address — this is port forwarding.

To make port forwarding work, you need two things:

  • A static IP address in your home network. You can get this by configuring static allocation DHCP, so that your computer* always gets the same IP address (say,
  • The port forwarding information (forward all connections to port 25565 to

The exact configuration process depends by your router make and model. Sites like have extended guides to get this working.

* or, more accurately, the MAC address of your computer's network card.

share|improve this answer
This is an excellent answer. Thanks! – What Would Be Cool Aug 9 '14 at 20:10

An easy way I've found to let my friends connect to my Minecraft server, which is running on my own machine is to use a free tool called ngrok to expose my server to the internet.

1) Download ngrok from You'll need to signup for a free account as well, and follow their setup instructions.

2) Start your Minecraft server

3) To share your local Minecraft server, run the following in a terminal:

ngrok tcp 25565

4) This will display some information, with a line like the following:

Forwarding     tcp:// -> localhost:25565

Write down the number that's where the XXXXX is above.

5) Your server is now available on the internet! But how do your friends connect to it?

6) Tell your friends to start Minecraft, then

  • click "Multiplayer"
  • click "Direct Connect"
  • Fill in the following, replacing XXXXX the number you wrote down in step 4)

7) They should now be connected to your Minecraft server!

TROUBLESHOOTING: Note - if it doesn't work, then instead of "Direct Connect", add it as a server by choosing "Add Server", then supply Then just connect to the server that way instead!

share|improve this answer

You must log in to answer this question.