Connectivity
If you’re having trouble connecting to your Minecraft server there’s a process you should follow in order to try and understand where the issue lies. If you’re running on a third party hosting provider it’s recommended to reach out to them directly or check their status page.
Server Binding to Port
The first thing to check is that your server binds to the right port when you start it up, firstly you should see some errors in the console. This error will normally come from having two server processes running at the same time or you run an application on the same port as your Minecraft server.
You can fix this by going to the server.properties
file and look for the server-port
variable and increase the number by 1. When you restart the server you should see the server start up without issues.
If you don’t see the above error message you can check using Powershell or Bash that your server is listening.
Windows
If you’re running on windows please use the following command within a Powershell prompt.
Linux
If you’re running a linux distribution please use the following command within your active shell session.
Regardless of the operating system being used you should see one entry bound to 0.0.0.0, if you don’t go back and ensure the server-port
variable has been set properly.
OS Firewalls
Now we know that the server is running on the right port you should check that the connection is allowed to break out past ‘localhost’ (the pc the server is running on). You can run the following command(s) depending on your OS to ensure the local firewall is configured.
Windows
If you’re running on windows please use the following command within a Powershell prompt.
Linux
If you’re running a linux distribution please use the following command within your active shell session.
To ensure things are all working locally within your network, attempt to connect from another device in your house to the internal LAN address. e.g. 192.168.1.58:25565
You can find your host devices internal LAN address by running ipconfig
within command prompt or ip addr
/ ifconfig
will work on Linux within the shell session.
External Port Forwarding
Providing you can connect internally to your server, the issue most likely falls with either your router and port forwarding or your ISP and their use of CGNAT.
The first thing we need to check is port forwarding is configured correctly.
- Login to the admin interface (normally on http(s)://192.168.1.254 or http(s)://192.168.1.1)
- Admin username and password is normally on the bottom but a Google search may also help
- Look for a ‘Port Forwarding / NAT folder’
- You may need to go into any ‘Advanced Settings’ tab first
- You should ensure the rule has been configured as expected
- Service Name - ‘Minecraft’
- Protocol - ‘TCP’
- Internal IP - ‘Internal LAN IP of Host Device’
- Internal Port - ‘Match server.properties file’
- External Port - ‘Match server.properties file’
- Save changes
If all has been successful you should see OPEN but if you still see CLOSED it could be possible you’re running behind CGNAT.
You can find a great explanation on CGNAT below.
SRV Troubleshooting
Since release 1.3 Minecraft supports a method of connectivity called ‘SRV’ Record, in principle they allow you to bind a hostname such as play.mycoolserver.net
to an ip and a random port. The difference when using an SRV record over an A record is if you have a non standard port e.g. 25570 for your Minecraft server an A record would require you to type play.mycoolserver.net:25570
into your client.
In using an SRV record you bind the hostname and the service you’re running (a Minecraft server) to the specific port so when you go to your client you would only have to type play.mycoolserver.net
into your client and the SRV record would tell your client “hey use this port”.
When you create the record you should ensure it’s configured as follows:
_minecraft._tcp.<host> <TTL> IN SRV 1 1 <port> <subdomain>
- Host - this should be your current providers connection hostname
- TTL - set this to auto if using Cloudflare DNS or 3600 in any other dns providers panel
- Port - this should be the port you’re currently using to connect to your server with
- Subdomain - this should represent what you want your players to connect with
An example of a functional SRV record has been provided below, this was created in Cloudflare’s DNS manager so if Cloudflare is not your DNS solution then you may have a slightly different interface.