![]() |
VOOZH | about |
This tutorial takes you through the steps of setting up your own Java Edition server using the default server software that Mojang Studios distributes free of charge. The software may be installed on most operating systems, including Windows, macOS, and Linux. For a tutorial about installing Bedrock Edition server software, see Tutorial:Setting up a Bedrock Edition server.
A Minecraft server provides a game environment for players to play multiplayer with others connected through the Internet or a local area network (LAN). Players are connected to a server using the Minecraft client software, and the server hosted using the server software.
This tutorial is meant to show and explain the basics and recommendations of setting up a Minecraft server, from installing Java, to configuring and publishing the Minecraft server itself. Setting up a server takes some time, and some technical knowledge. Take time to research any concepts you found unsure or uncertain before or while reading this tutorial.
In order to run your server correctly, we highly suggest that you should at least know about the following:
The performance of your Minecraft server can be influenced by many factors, but the two key elements that commonly affect all servers are the player count and the world size. The higher these numbers, the more hardware power you will need.
Depending on your player base's play styles, each player can affect your server's resource:
Typically, a Survival server with 4โ8 players can run on most modern hardware as defined below.
CPU
Most modern CPUs should suffice for a small to medium size server. For reference, starting with budget Intel 8th gen or Ryzen 2000 series CPU is good enough for small servers. Note that Minecraft servers mostly utilize a single core. If your server grows larger, you should ideally find a CPU with high single-thread performance.
RAM
Depending on your size of the world, you would need more RAM memory to run the server. For small servers, it is recommended that you have at least 2 GB of RAM available. It is very possible that you need 4 GB of RAM for larger servers.
Storage
Your Minecraft world can grow larger over time, so make sure to reserve at least 5GB of disk space for it.
Networking
Minecraft servers need a stable Internet connection. For this reason, Wi-Fi is not recommended. You typically won't need to worry about the bandwidth unless you run a large server. To make sure you have a low and consistent ping, it is recommended that your server's physical location be as close to your players as possible.
Other
You don't need extra hardware to run a server, including a GPU.
You can learn more about the system requirements to run a server on the Server/Requirements page.
If you still want to manage a server, but not from home, you might want to look for Minecraft server hosting services, which provide a machine and sometime a quick way to setup your Minecraft server. Expect to pay monthly for this type of server since finding free hosting is a rarity, but you save the hassle of constantly maintaining a server and ensure it is always online for your players.
Alternatively, you can pay for Realms, the official subscription-based server hosting service by Mojang Studios (although comes with limitations unlike a normal server).
If you want to setup a quick and simple multiplayer server in your home, check out the Tutorial:Setting up a LAN world. Note that players must be connected to the same local network, usually in the same network from Wi-Fi or router.
If you decide you don't want to host, but still want to play online, check out the public server options on the official server listing by GamerSafer.
There is also custom server software available, which most large servers use, but these applications are not supported by Mojang Studios. Notable custom server software being SpigotMC and PaperMC, and if using mods, you can run Forge and Fabric servers.
Java is the programming language in which Minecraft: Java Edition is written. Java applications require and run inside Java Virtual Machines (JVM), which are supported across many different platforms. Because of this, developers can write a Java application and any platform that supports JVM can run the same Java application in their environment (write once, run anywhere). Notably, this makes the game supported on Windows, macOS, and Linux systems.
In order to run Minecraft: Java Edition, you would need the JVM software. It is typically bundled in Java Development Kit (JDK) or Java Runtime Environment (JRE). Both can be used to run the game, but JDK contains software and tools designed to develop Java applications, while JRE only contains the necessary parts to run one (excluding the development software and tools of JDK). This makes JDK a bit bigger than JRE, so if you aren't planning to do Java development anytime soon, you shouldn't need JDK.
As always, you should only use the latest version of Java supported by the game, which is Java 25 (as of 26.1). If you use custom JVM from an OpenJDK build, you should notice that Minecraft Launcher only allow the custom JVM with the same primary Java version as the minimum required Java version to launch the game.[1]
A headless Java installation is a trimmed down version of Java. It does not have a GUI or mouse/keyboard support and its less resource intensive. Headless Java is frequently used in servers or other environments where a GUI is not needed.
There are several virtual packages used in Debian for Java. These cover runtime compatibility and come in two flavors; headless (omits graphical interfaces) and normal.
Some versions of Minecraft: Java Edition server require a minimum Java version in order to be run on. Here are several Java version requirements for Minecraft server:
For the full list of Java version requirement of Minecraft: Java Edition, please visit Tutorial:Update Java ยง Why update?
Older versions of Minecraft can run on newer Java, for example, Minecraft 1.16 can run on Java 17, Minecraft 1.18 can run on Java 20, etc.
As mentioned before, you can get JVM from Java Runtime Environment (JRE) or Java Development Kit (JDK). They are usually distributed by a third-party vendor as an OpenJDK build. OpenJDK is the official open source reference implementation of Java, meaning it contains the software and tools required to run Java applications, such as JVM. Unlike the name suggested, an OpenJDK build does not strictly provide JDK, depending on the vendor, they may provide JRE-only build of OpenJDK.
A Minecraft server only requires JRE, JDK includes extra development features that the game server does not use while running normally. To install OpenJDK for your server, please refer to Tutorial:Update Java ยง How to download.
A Minecraft server can be setup using Docker, which runs on an isolated environment separate from your system. It also provides an automatic setup with preset configuration. This can be useful in situation where you want to setup and run multiple Minecraft server quickly and separated from each other to avoid conflicts.
Docker uses an image which contains the software and pre-configured files ready to be used. It's usually managed by another person or third-party organization. The Docker image we are using for the tutorial is itzg/minecraft-server, which provides the latest and up-to-date Java Edition server:
docker-compose.yml:<container directory>/docker-compose.ymlservices: mc: image:itzg/minecraft-server tty:true stdin_open:true ports: -"25565:25565" environment: EULA:"TRUE" volumes: # attach the relative directory 'data' to the container's /data path -./data:/data
docker compose up -d in that directory.25565. See ยง Publishing the Minecraft server in the Local Area Network section for setup guidelines.For updating the Minecraft server later in the future:
docker pull itzg/minecraft-server itzg/minecraft-server:<tag> in the same directory, where <tag> is the specific Minecraft version you want to update to.docker compose down, then docker compose up -d to apply the update.The general gist of starting up a Minecraft server is that you will need to install java, run the server, accept the EULA, and run it again. Once you have installed java and opened up a command line, everything is basically the same.
cd (stands for "change directory"), followed by the path to the folder where you placed your server.jar file. For Windows, you can drag the folder into the command-line window to get the path, if you have a GUI open.java -jar server.jar --nogui. --nogui is optional, but it prevents a GUI window from opening. If you want the GUI, just run java -jar server.jar instead.eula.txt will be generated after you run the server for the first time. Open it in a text editor and change eula=false to eula=true. It signifies that you have read and understood the End User License Agreement that you'll follow when using the software. If you don't do this, the server will shut down immediately when you try to start it.java -jar server.jar --nogui. You can stop the server by typing stop in the command line, or by closing the window if you are using the GUI.At this point you should have a basic server running. One of the things you definitely want to do is write a startup script to launch your Minecraft server, so you don't have to write it again every time you launch the server.
Windows uses batch file to run series of commands on the command line.
Create a text file in the server directory with the following content:
<server directory>/start.bat@ECHO OFF java -Xms1024M -Xmx2048M -jar server.jar --nogui pause
Save the file, and double click it to start your server.
The "pause" command is there to keep the window open so you can read what happened after the server stops.
Most systems that are POSIX-compliant can write and run shell scripts. Shell scripts typically end with ".sh" filename extension.
Create a text file in the server directory with the following content:
<server directory>/start.sh#!/bin/sh cd"$(dirname"$0")" execjava-Xms1024M-Xmx2048M-jarserver.jar--nogui
Save the file, and run chmod a+x start.sh to make it executable. You can now run the file by double-clicking or by running ./start.sh in the directory.
If you want to add a pausing part like the Windows example, remove the exec word, and add a line of read -n 1 -p "Waiting..." to the end. This is useful if you are running the script by double-clicking on the GUI.
The -Xms1024M and -Xmx2048M options set your initial startup and maximum memory respectively for your server. See ยง Memory limits for further information.
Alternatively, you can manage and automate the startup and shutdown of the Minecraft server using scripts and tools listed below:
You can configure the server's basic functionalities and game rules by editing the server.properties file (the format for Java Edition is explained on that article). Be certain to edit the file with a text editor that does not add formatting (e.g. italics), such as Windows Notepad. Additional configuration may not be necessary as many servers run fine from the default values.
To become or add an operator, type /op <targets> into the server console. This adds the specified user's username and UUID to the ops.json file. You can also manually edit the same file to add operator status, but this requires the player rejoining to refresh their operator status in-game.
Operator status will not be changed if you change your username due to the use of UUID, except for offline server where UUID is generated from the player's username.
Operators may execute commands, in other words, operator privileges give you full control of certain aspects of the game outside the normal gameplay (e.g. teleporting players, switching game modes, and others).
Example
<server directory>/ops.json[ { "uuid":"069a79f4-44e9-4726-a5be-fca90e38aaf5", "name":"Notch", "level":4, "bypassesPlayerLimit":false } ]
Whitelist is a feature that allows and blocks specific players in a configured list to join the server. By default, this feature is disabled, but can be changed in the server.properties by setting white-list=true.
You can add a player to the list by typing /whitelist add <username> into the server console. You can also directly edit the whitelist.json file in the server directory by manually adding their username and UUID.
If you server is not published to the Internet, this feature may not be necessary, since the only players that can join your server are likely the ones that are physically connected or very close to the local network. Otherwise, it's important for server hosted in the public Internet, since whitelist safe guards your server from outside intrusion by letting select trusted players into the server.
Example
<server directory>/whitelist.json[ { "uuid":"069a79f4-44e9-4726-a5be-fca90e38aaf5", "name":"Notch" }, { "uuid":"853c80ef-3c37-49fd-aa49-938b674adae6", "name":"jeb_" } ]
For offline servers (with online-mode disabled in server.properties), you need to add the player's offline UUID from their username in the whitelist.json file. You can get offline and online UUID from this calculator:
The most important thing for a Minecraft server is the memory given to run with. It gives the server resources to handle world generation, player actions, and background processes smoothly. Insufficient memory can lead to lag, crashes, or slow chunk loading, especially as more players join or the world grows larger. Allocating enough memory ensures stable gameplay and reduces interruptions caused by the garbage collection or out-of-memory errors. There are two options that controls the server's memory usage, these options should be added between the java and the -jar on the command line:
-Xmx defines how much memory it is allowed to use. -Xmx2G (2 gigabytes) is more than enough for a home server with 5 players on default simulation distance (5ร212 = 2205 chunks simulated), but do scale it up by your actual settings. Setting the value too low causes frequent GC stops. Making it too high can make GC too long on Java 8.-Xms is the next biggest knob. It defines the initial memory size the server starts with, and only affects startup performance. If your server also runs things other than Minecraft, set it to 1/4 of the maximum size (so for our case, -Xms512M) for a good balance: the JVM will be allowed to return some memory to the OS when it's not needed โ the return algorithm is very conservative, so it has very minimal effect on long-term performance. If your server is fully dedicated to Minecraft, feel free to go higher: making it equal to the maximum size disables heap scaling and gives maximum startup speed.-XX:SoftMaxHeapSize=1G) is available for some versions of JRE. The JRE will try to only use that much memory, but will go over to a maximum of -Xmx if necessary.[2] If you are running many things on your server, this may be useful by keeping balance on the resources used by your server and other processes in your system.Java options should be added between the java and the -jar on the command line, or in your startup script.
-XX:+UnlockExperimentalVMOptions -XX:+UseG1GC -XX:G1NewSizePercent=20 -XX:G1ReservePercent=20 -XX:MaxGCPauseMillis=50 -XX:G1HeapRegionSize=32M works reasonably well, though of course better flags, like brucethemoose's Minecraft Performance Flags and Aikar's Garbage Collector flags exist.-XX:+UnlockExperimentalVMOptions -XX:+UseZGC. Tuning flags other than -Xmx are a lot less important compared to in GCs (because the default is quite good), although -XX:-ZProactive is worth a try if you want to trade memory for lag.To sum up, a reasonable flag combination can be as simple as -Xmx4G -Xms1G -XX:SoftMaxHeapSize=3G -XX:+UnlockExperimentalVMOptions -XX:+UseZGC. That is it. There are bits that you can squeeze from complicated flags, but you would get much more from modified server software. In fact, all serious discussions (e.g. Aikar and brucethemoose) of server performance assume some degree of modding.
The options for the server.jar are inserted after the java -jar server.jar part. Run with --help to see all available arguments that can be passed to the server.
Below is a table of available command-line options for the server:
| Option | Description |
|---|---|
--bonusChest |
Enable the bonus chest when generating a world for the first time. |
--demo |
Enable demo mode. Shows the players a demo pop-up, and players cannot break or place blocks after the 5 in-game days demo time has expired, even if they have purchased the game. |
--eraseCache |
Erase cached data like light levels and biome data, which must then be regenerated. Equivalent to the "Erase Cached Data" option of "Optimize World" in World Options on the client. |
--forceUpgrade |
Optimize the world by upgrading the level data to the latest format. Once the world is optimized, it is no longer compatible with older level formats. Equivalent to the "Optimize World" option in World Options on the client. |
--help |
Print available options without starting the server. |
--initSettings |
Initialize server.properties and eula.txt without starting the server. If either file is missing, it creates them with default values.
|
--jfrProfile |
Initialize Java Flight Recorder profiler for the server. While the server is running, the profiler can be opened using an external tool or software, such as VisualVM. It enables monitoring of the server's CPU, memory, and threads usage. Additionally, it saves a jfr file on the debug folder of the server.jar, containing JVM and operating system events, and several Minecraft-related custom events. Further information on Commands/jfr ยง Usage.
|
--nogui |
Disable the GUI when launching the server. |
nogui |
Legacy alias of --nogui.
|
--pidFile <path> |
Create a text file at path containing the process identifier (PID) of the server process while it's running.
|
--port <port> |
Specify the TCP port to use instead of the value in server.properties.
|
--recreateRegionFiles |
Optimize the world similar to --forceUpgrade, but also rewrites all the chunks independently of whether they have been upgraded, creating fresh and defragmented region files.[3] Using this option after changing region-file-compression in server.properties will recompress all region files in the new format.
|
--safeMode |
Ensure the server only loads the vanilla data pack. |
--serverId <id> |
Specify the "Server Id" string used in the crash report details. |
--universe <path> |
Specify the path to the directory level-name in server.properties is relative to. If empty, it is relative to the working directory.
|
--world <name> |
Specify the world name to use instead of the level-name value in server.properties.
|
The file generated by --pidFile can be used in command-line to stop the server itself, for example, using cat <path_to_pidfile> | xargs kill on most Linux systems.[4]
java-jarserver.jar--nogui
java-Xms1G-Xmx4G-jarserver.jar--nogui
java-Xms512M-XX:SoftMaxHeapSize=4G-Xmx8G-jarserver.jar--nogui
java-Xmx1G-jarserver.jar--port1337--nogui
java-jarserver.jar--worldawesome-world--port4745--nogui
java-jarserver.jar--safeMode--nogui
java-jarserver.jar--bonusChest--nogui
java-jarserver.jar--help
After successfully configuring and starting up your Minecraft server, you now must publish your Minecraft server, so players can see and join your server through the Internet or locally.
There are several methods of publishing your Minecraft server:
Local Area Network (LAN, or local network) is a computer network that is used to connect between devices and communications in a limited area, such as personal home, university campus, or office building. When your device is connected to your router, it is participating in the router's LAN, this includes other devices connected into the router. As such, using the LAN, you can connect and communicate to other devices or applications hosted on the network, such example is a Minecraft server. Computer network like LAN is usually considered a private network.
Each device in the network is given an unique identifier called IP address. When used in a LAN setting, these IP addresses are often referred to as internal IP address, as they belong to private IP ranges. Applications in these devices can listen for and send communications with other devices in the LAN through specific ports opened by their host devices.
When you start a Minecraft server on your device, the server requests a specific port number to the server host's operating system in order to communicate with other devices in the network. The host then assigns, and listens for all upcoming connections from the port, directing them to the Minecraft server to process. The default port for a Minecraft server is 25565, but can be configured in the server.properties file.
Players can connect to your server on LAN by inserting the server host's internal IP address followed by the port number. For example, if the server host's internal IP address is 192.168.1.2 and the port number is 1337, you would connect to the server using the address 192.168.1.2:1337.
Do remember that players need to participate in your LAN, if they aren't, they are unable to connect to your server locally. They can participate in your LAN by connecting their devices to the router via ethernet cable or wireless.
The server host's local or internal IP address is important for connecting to your server in LAN. It's also may be used in port forwarding, specifying which internal IP and port for your router to port forwards to.
With that in mind, here are the steps to retrieve the internal IP address:
cmd and hit .ipconfig and press . You should be given a list of text.ip address (or ip addr for short).
ethX or enpXsX, and for wireless, wlanX or wlpXsX. Notice the "X" on the device names, they usually indicate the bus and the slot number.inet, which will look like inet xxx.xxx.xxx.xxx, copy the xxx.xxx.xxx.xxx numbers down.Port forwarding is a special network configuration that redirects or forwards connections from an IP address and port number to another. This can be useful for a Minecraft server, as port forwading lets players connect to your server remotely, over long distance through the Internet.
When you create a port forwarding configuration[a], it essentially creates a bridge for connections between the Internet and your server in the local area network. The router forwards connections from your external IP address on the Internet to your server's internal IP address on the local network. This, in turn, allows players to connect to your Minecraft server on the Internet through your external IP address.
External IP address (also known as public IP) is a public facing address of your home network on the Internet. It allows communications remotely over the Internet. It is typically assigned to a router or network switch in a home network, not per devices, so port forwarding is needed to assign available ports from the external address to devices on the local network. You can find your external IP by searching "what is my IP" in Google, or in websites such as IP Chicken. Note your external IP address may be a dynamic IP configuration, see below.
As router interfaces vary significantly depending on the manufacturer and model, specific menu layouts may differ from the descriptions provided here. However, the general configuration steps should remain consistent across devices. The following steps show the general process for port forwarding a Minecraft server on most standard routers:
ipconfig, and find the IP address next to Default Gateway column.If your internal or external IP changes, this means the current IP you have is a dynamic IP. This can cause problems to the port forwarding rules. Here are some workarounds and fixes you can do to resolve this issue:
localhost, your internal IP (192.168.x.x) or your external IP.Virtual Private Network (VPN) can be used to let players connect to your server through a secure connection or a private network.
VPN simulates LAN connections between the players and the server over the Internet. Players can join a server hosted on the network by first connecting to the network via VPN software, and then accessing the server using the internal IP address provided by the VPN. This method serves as an alternative to port forwarding, which directly hosts and connects the server on the Internet.
However, this may be inconvenient for many players, as it typically requires everyone to download and install the same software the host uses in order to join the server.
There are three common VPN software you can use for connecting your Minecraft server: LogMeIn Hamachi, Radmin VPN, and ZeroTier. The following steps below are tutorial for setting up VPN for your server depending on the provider you use:
server-ip field in server.properties is left blank (as default)..deb and .rpm packages are available. For Gentoo, you can install it by emerging "net-misc/logmein-hamachi".
server-ip field in server.properties is left blank (as default).ipconfig, and look for IPv4 address in "ZeroTier One" ethernet adapter.After setting up your server, it is recommended to follow these practices:
/whitelist command.
enable-status to false, this suppresses the server's responses to status requests, making it appear offline to port scanners.Depending on which method you use to publish the server, here are couple of ways to connect into your Minecraft server:
localhost instead of an IP address.192.168.0.168:25565.Minecraft server can be connected through an Internet domain name, which is a custom string you can insert in the server address. You'll commonly see usage of domain name when visiting websites, for example, youtube.com, hypixel.net, minecraft.net, etc. These domain names are used in place of an IP address, where typing and remembering them is easier than numerical IP.
In order to use a custom domain name, you would need to register first through a domain registrar. Registering a domain name is often paid, and rarely ever free. You can register a custom domain name that ends with a prefix (e.g. <your-domain-name>.net), like .com, .org, .net, and much more. Alternatively, you can get a free custom domain through a dynamic domain service, such as NoIP. These services would typically give you a custom sub-domain, which ends with another string before the prefix (e.g. <your-domain-name>.example.com).
This section only covers connecting your domain name with your Minecraft server. If you want to learn more about domain name configuration, see Cloudflare articles about A record and SRV record.
After registering a domain, you can use it to point to your Minecraft server's IP address, so when player connect to your server, they can type your domain name instead of the server's IP address. This can be done by adding an A record (stands for address record) to your domain, which tells the game of the server's actual IP address from the domain name.
To do this, visit your domain's DNS records. This is usually provided through your domain registrar's website, in domain management or settings menu. If you haven't found it yet, please contact your registrar or visit their knowledge base for help.
In the DNS records, add a new A record with these values:
After adding the A record for your domain, wait for up to 10 minutes, as any DNS record updates are not instantaneous on other devices, including yours. When updated, players can connect to your server using your domain name, as specified in the "Host", or if blank, your root domain.
Since Java Edition 1.3.1, the game allows server operators using custom ports without requiring the player to explicitly type it. This is achieved by using a SRV record (stands for service record) in the DNS. The SRV record tells Minecraft the actual server's IP and port to use from a domain name.
SRV record only points to a domain name with their specified port, so would you need to create an A record pointing to your Minecraft server first. Difference with A record is that you cannot specify the custom port, as A record only points to the IP address.
Minecraft server fetches SRV record information exclusively from _minecraft._tcp.<your-domain-name> domain name:
_minecraft._tcp.<your-domain-name>, with <your-domain-name> is your designated domain name for your server. It can be added with sub-domain. For example, inserting _minecraft._tcp.play.example.org would make players connect to your server through play.example.org.<weight> <port> <target>:
25565).600 25565 mc.example.com.To manually verify whether your DNS record has been updated, you can run the following command: nslookup-q=<record-type><your-domain-name> (Windows) or dig<your-domain-name><record-type> (Linux and macOS).
The <record-type> could be "a" or "srv" for A record and SRV record respectively.
1.1.1.1, or Google's 8.8.8.8) your clients are using, it may take a day or so. This is expected as DNS resolvers usually serve cached domain names, and don't refresh their caches instantly.For A record, your <your-domain-name> needs to be the domain name you have specified in the A record. If your server's IP address is not included in the "Address" field under "Non-authoritative answer" section from the output, then it has not been updated yet.
An example output for your A record would be:
> nslookup -q=a YOUR.DOMAIN.com Server: UnKnown Address: 192.168.0.1 Non-authoritative answer: Name: YOUR.DOMAIN.com Address: 172.65.197.160
> dig YOUR.DOMAIN.com A ; <<>> DiG 9.20.16 <<>> YOUR.DOMAIN.com A ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 55270 ;; flags: qr rd ra ad; QUERY: 1, ANSWER: 6, AUTHORITY: 0, ADDITIONAL: 1 ;; OPT PSEUDOSECTION: ; EDNS: version: 0, flags:; udp: 4096 ;; QUESTION SECTION: ;YOUR.DOMAIN.com. IN A ;; ANSWER SECTION: YOUR.DOMAIN.com. 115 IN A 23.192.228.84 ;; Query time: 4 msec ;; SERVER: 10.255.255.254#53(10.255.255.254) (UDP) ;; WHEN: Mon Dec 01 19:44:27 +07 2025 ;; MSG SIZE rcvd: 136
For SRV record, your <your-domain-name> needs to be _minecraft._tcp.<your-srv-domain>, where <your-srv-domain> is the domain name you have specified in the SRV record.
An example output for your SRV record would be:
> 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
> dig _minecraft._tcp.YOUR.DOMAIN.com srv ; <<>> DiG 9.20.16 <<>> _minecraft._tcp.YOUR.DOMAIN.com srv ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 48436 ;; flags: qr rd ra ad; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1 ;; OPT PSEUDOSECTION: ; EDNS: version: 0, flags:; udp: 0 ;; QUESTION SECTION: ;_minecraft._tcp.YOUR.DOMAIN.com. IN SRV ;; ANSWER SECTION: _minecraft._tcp.YOUR.DOMAIN.com. 300 IN SRV 1 1 25565 ACTUAL.DOMAIN.com. ;; Query time: 52 msec ;; SERVER: 10.255.255.254#53(10.255.255.254) (UDP) ;; WHEN: Mon Dec 01 19:48:59 +07 2025 ;; MSG SIZE rcvd: 90
Q: I have a problem which is not answered in here! What should I do to?
A: Go to the Minecraft Forums and post your problem there. To help you, they need the following information:
And please, if we were able to help you, post where the problem was exactly and what the fix was for that. Other people will appreciate that (and we will be able to get a grip on the common problems!)
Q: On a Windows computer, when I double click the batch file it opens a command prompt window, but quickly disappears and the server does not start.
A: This may be caused by an error from the Minecraft server. Batch scripts immediately exit when there is no more instruction to run, to fix this and see the error, right-click your .bat program and hit edit, add a new line, type pause, then save and run the file.
If it says invalid path, it is probably due to an incorrect path to Java executables or your Minecraft server jar file.
PATH variable. On Windows, Java executables typically lives under C:\Program Files\Java\jdk<version>\bin or C:\Program Files (x86)\Java\jdk<version>\bin. Or if you've installed Adoptium's Temurin JDK/JRE previously, it may be under C:\Program Files\Eclipse Adoptium\<jdk>-<version>-hotspot\bin. Add these paths into your PATH variable accordingly.server.jar or minecraft_server.<version>.jar, or similar.If it says other error, you should post a thread using the template and guidelines above.
Q: Whenever I try to get the server up, it says "Failed to bind to port!".
A: The most common reason this happens is because you put an IP address in the server-ip field in your server.properties file. If the IP you specify isn't the same as any of your network interfaces, (your wireless or wired IPv4 from ipconfig/ifconfig/ip a) Minecraft will throw the port binding failure message. By leaving it blank, you let it bind to all interfaces. You will then be able to connect using localhost and people on your wired/wireless network (in the same subnet) can connect using the computers/server's internal IP address.
Alternatively, the error can mean that you have tried to use a port or an IP address that is already in use or that you do not have permission to use. You can try a different port by changing it in your server.properties file in this line: server-port=25565.
You should avoid using the following ports for your server as some ISPs may block these ports for security reasons:
Generally avoid any port numbers below 1024, since those ports are generally referred as well-known ports and are registered with the IANA for important services.
Q: I tried to run the server with Solaris/OpenSolaris and got the following error:
java.io.InterruptedIOException: Operation interrupted at java.net.SocketInputStream.socketRead0(Native Method) at java.net.SocketInputStream.read(SocketInputStream.java:129) at java.net.SocketInputStream.read(SocketInputStream.java:182) at java.io.FilterInputStream.read(FilterInputStream.java:66) at gq.a(SourceFile:131) at ji.g(SourceFile:197) at ji.c(SourceFile:17) at oq.run(SourceFile:84) 2011-05-31 16:57:26 [INFO] /:44673 lost connection
A: For whatever reason, out of all of the operating systems, only Solaris throws that exception when a thread interrupts a connection. A workaround is to change the default behavior on the command line:
java -Xmx1G -Xms32M -XX:-UseVMInterruptibleIO -XX:+UseConcMarkSweepGC \ -XX:+CMSIncrementalPacing -XX:ParallelGCThreads=$CPU_COUNT -XX:+AggressiveOpts\ -jar minecraft.jar --nogui
This instructs Java to use an interruptible IO stack instead of the default IO that is sensitive to interrupted threads.
Q: When I try to connect to my server this is what it says:
Connection lost The server responded with an invalid server key
A: This error is usually caused when the server sends an unrecognized function to the client, which may be caused by using outdated server, unrecognized or modded server, or it may be caused by the client with the same reasons (outdated, modded, etc.) In general, you should both check the server and the client softwares and their versions if they match.
Q: I cannot break/place any blocks!?
A: This is most usually caused by interacting with blocks in a protected area. If you are trying to interact near spawn, most likely it has been protected, by the Minecraft server software; either build away from it or get operator status.
Q: My server runs fine, but I cannot connect to it!
A: This could be caused by a series of issues. Please post a thread using the template and guidelines provided above.
Q: How do you give a .jar server more ram?
A: Change the numbers in the server launch command "-Xmx1G -Xms1G". The -Xms part specifies how much memory the server starts with, and the -Xmx specifies how much memory the server allowed to use.
For example:
-Xmx1G -Xms1G = maximum 1GB, starts with 1GB,-Xmx2G -Xms1G = maximum 2GB, starts with 1GB,-Xmx4G -Xms2G = maximum 4GB, starts with 2GB, and so on.Please read ยง Memory limits to learn more about these options.
Q: Why is the server CPU constantly at full load?
A: This is most commonly caused by the server's performance problem.
/kill @e[type=item] to remove all dropped items.view-distance and the simulation-distance options in the server.properties.Q: Help! How do you find out your server's IP address?
A: There are two types of IP address: your internal IP address and your external IP address.
Q: I port forwarded and allowed java.exe in my firewall and it's still not working!
A: Your modem might be acting as a router as well. If you switch ISP's or upgrade your connection to the Internet, you may get issued a modem/router combination (which might explain why it worked in the past).
You can verify this by looking for the WAN IP of your router. If it's an internal IP, you'll need to log into the modem/router your ISP issued to you, and configure port forwarding to the external IP of your router. See ยง Port forwarding for detail instructions.
Q: I turned off my firewall on my router/modem how does it still not work? However, port forwarding sites report they can "see" me? What's going on?
A: Turning off your firewall on your router/modem means you essentially disabled port forwarding. Port forwarding is actually a subset of firewall rules. If no rule exists on that port (for example 25565), the firewall will ignore/drop the connection attempt (hence, you get a connection timed out). If there is a rule, it should pass on the connection to whatever computer is configured to receive the initial connection attempt.
When you disable the router/modem firewall and test your public IP address on a port forwarding-checking website, the website will request your router/modem, and your router/modem will respond to that request. This is another reason why disabling your firewall is bad; you incorrectly believe that people outside your network can connect to your Minecraft Server on your computer, when really, they're trying to connect to the router/modem itself.
To solve this, the next step is to confirm if your port forwarding (rules) are correct. By searching "minecraft server checker" on the Internet you'll be able to check if you configured your network correctly such that users outside your network running the Minecraft client can indeed connect to your computer through your router/modem.
Q: What is connection timed out and connection refused?
A: Simply put, connection timed out is when a firewall ignores a connection attempt (ignores the intial connection packet with the SYN flag in the 3-way handshake). Connection refused is when there's no process listening on the port; therefore, the operating system lets the client (in the standard client-server model) know their connection attempt did not work.
The default configuration on all Windows computers (the home version) and (just about) all (SOHO) routers is to drop or time out the connections. This is called "stealth mode" and you can read more about it on superuser. Here's a brief summary: "The idea is that refusing a connection instead of timing it out will tell an attacker that there actually is a computer on that IP-Address. With the connection attempt timing out, the hope is that the attacker will ignore the computer."
You can read more about connection refused on serverfault.
So if your error message is a connection timed out, it's usually a firewall problem; you either need to allow Java in the Windows firewall or port forward. If the error message is a connection refused, perhaps your Minecraft server has not started properly or you turned off the firewall on your router instead of port forwarding.
As always, you can always ask the Minecraft Forum if you are uneasy or unsure about something, particularly if opening the command prompt/terminal and running commands makes you nervous.
Connection filtered and connection closed is another way of saying timed out and refused, respectively.