Editing
Tutorials/Setting up a server
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Connecting to the Minecraft server == {{msgbox|title=An update is requested for this section.|text= <ul><li> Internal IP is less reliable than looking for the server by hostname, which is available through either router DNS or mDNS (Bonjour, available in all versions of macOS and Windows 10). Static IP works, but it requires making sure the router never gives the address to anyone else. (In an ideal world you'd just use [[Tutorials/Setting_up_a_LAN_world#Hosting_a_LAN_server|the existing LAN server discovery system]], but Mojang has decided it's irrelevant for dedicated.) <li> Port forwarding can potentially be replaced with UPnP. More flexible, but a bit brittle.</ul> }} * If you are playing on the same machine on which the server is running, select the "Multiplayer" option in the game client, click direct connect, and then type in {{cd|localhost}} instead of an IP address. **''Both hosting and playing on the same machine is not a recommended practice unless you have a powerful computer (e.g. more than 6 gigabytes of ram (4 for the server, 2 for the client, and some for the rest of the system).'' * Users within your local network (i.e., that are accessing the same router) can connect using your internal IP address; port forwarding is not required for such local connections. The internal IP address of a specific network adapter can be found by typing "ipconfig" into the command prompt and looking for the IPv4 address, or by using [https://www.whatismybrowser.com/detect/what-is-my-local-ip-address this website]. If the port is set to a number other than 25565 in [[server.properties]], that port must be included. This address (both IP and port) will look something like {{cd|192.168.0.168:25565}}. * Users connecting from the Internet (i.e., outside of your local network) must connect using your external IP address. You must port forward for someone outside your network to connect to the server. === IP address notes === * Unless you set a static IP for the computer that is hosting the game, the internal IP address can change. This affects port forwarding rules, and can make them invalid. Each modem or router has a different way of setting a static IP address. You should refer to the manual for your device(s) or online documentation for further instruction. * If you are having players connect to your external IP, your external IP can change if you do not have a static IP from your internet service provider. Use a tool such as [http://wanip.info/ WanIP] to periodically check on the external IP address. You may also search "my ip address" on Google and it will show your IP address. Alternatively, you can look into a DDNS service that will allow you to have a name, rather than an IP address, that will remain the same. The name will point to your external IP address, regardless of whether or not it changes (the DNS is updated when changes occur, hence "dynamic"). * For troubleshooting purposes you can try running ''Minecraft'' on the server machine and connect locally. You can connect through either <code>localhost</code>, your home network IP (<code>192.168.x.x</code>) or your public (Internet) IP. * If for some reason you have trouble with connecting publicly over your IPv4, try connecting over IPv6. This should only be done for testing whether your server is online, external players should still use IPv4. === Firewalling, NATs and external IP addresses === * You must open a TCP/UDP port (default is 25565) on the firewall. ** If the server in question is not reachable via a globally routable IP address, you will need to add appropriate address and/or port number translation rules to the gateway β usually your router has the global IP address. * For help with address translation, opening the firewall and routing (these three make up what people call port mapping/forwarding), [http://portforward.com/english/applications/port_forwarding/Minecraft_Server/Minecraft_Serverindex.htm portforward.com] is a good source. Select your router from that list, skip the ad that comes after selecting the device, and you will see instructions for setting up port forwarding. Alternatively, you can read the documentation supplied with your router, modem, or other ISP related hardware. * Verify the port is open, and note your external IP by using a port checker tool, such as [http://www.yougetsignal.com/tools/open-ports/ You Get Signal]. The default port you should test is 25565, unless you specified something else. '''Have the ''Minecraft'' server running when you test the port'''. * You can obtain your external IP address from [http://www.yougetsignal.com/what-is-my-ip-address/ YouGetSignal]. ==== Local network dedicated servers ==== ''This only applies to Classic (v0.30) servers.'' A common problem for server administrators is the inability to connect to your own server via another machine on your local network. A typical scenario for this is that you have a Classic server running on a dedicated machine, and you have your own machine which you play on. They're both connected to the same router/switch, and have internal IP's with the octets '192.168.x.x'. Normally, connecting via the URL generated for your server will result in an error message claiming that the server is offline. To correct this, you must add a function to the end of your URL, bookmarks, or whatever else you connect by. The function is: '''?override=true'''<br> Example: http://www.minecraft.net/classic/play/4c3bebb1a01816acbe31c5ece1570da5?override=true Previously, (before the 1.8 beta and website update) this was '''&override=true'''. This caused much confusion since the change was not announced by [[Mojang]], and wasn't announced on the website applet pages either. Before the update, connecting to your own URL via the website resulted in red text under the applet window saying "If you can't connect, try ''this link'' instead." The link returned the same thing, with the &override=true affixed to the end. '''Note:''' This situation does not effect Beta servers, and you should be able to connect via an internal or external IP. ==== The SRV record ==== ''Java Edition'' since [[Java Edition 1.3.1|1.3]] also supports using custom ports without requiring the player to type it. This is achieved by using a SRV record (for "service") in the DNS. The SRV record tells ''Minecraft'' the actual host and port to use; some DynDNS services and most static DNS services allow you to set it up.<ref>https://www.noip.com/support/knowledgebase/how-to-add-a-srv-record-to-your-minecraft-server-remove-the-port-on-the-end-of-the-url/</ref> To manually verify the SRV record, use (assuming the player-facing domain is "YOUR.DOMAIN.com"): <pre> > nslookup -q=srv _minecraft._tcp.YOUR.DOMAIN.com Server: UnKnown Address: [REDACTED] Non-authoritative answer: _minecraft._tcp.YOUR.DOMAIN.com SRV service location: priority = 5 weight = 5 port = 65312 svr hostname = ACTUAL.DOMAIN.com </pre>
Summary:
Please note that all contributions to Kiiw may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Kiiw:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Page
Discussion
English
Views
Read
Edit
View history
More
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Tools
What links here
Related changes
Special pages
Page information