Tutorials/Setting up a server

This tutorial takes you through the steps of setting up your own server using the default server software that Mojang distributes free of charge. The software may be installed on most operating systems, including Windows, macOS, GNU/Linux and BSD.

For more tutorials, see the bottom of this page or the Tutorials page. For more information on Minecraft servers, see the Server page.

Notes:
 * Setting up a server takes some time, and some technical knowledge. Don't try to set up a server unless you have some basic computer and networking abilities. Probably, your best bet can be to look on the Internet for a guide on how to set up a server.
 * A Minecraft server does not need to be a high-end machine, but netbooks and notebooks don't usually make for good server machines. They typically have lower-end hardware and bad I/O performance in comparison to desktop computers.
 * Hosting and playing on the same machine is also possible, if your computer is powerful enough.
 * Having many players in a wireless network (WLAN and especially WWAN) is not recommended. Use a wired network instead, such as Ethernet.
 * If you decide you don't want to host, but still want to play online, check out the public server options on a Minecraft server listing website.
 * If you still want to manage a server, but not from home, check out the Minecraft server hosting area of the Minecraft forum or other websites. 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.

Note: There is also custom server software available, which most large servers use, but these applications are not supported by Mojang.

Warning
Since you're about to run your own server, you should be aware of the possible dangers. Running by the instructions below should not put you at any risk, but this is a wiki which everybody is allowed to edit, and we don't know about your system configuration, so we cannot guarantee you'll be out of danger.

In order to run your server and stay out of trouble, we strongly recommend you should at least know about the following:
 * Using the command-line and editing configuration files
 * Networking in general (IP, DHCP, ports, etc.)
 * Your system configuration
 * Your network configuration
 * Your router configuration (if you want other people to connect over the Internet)

Java
Java is a programming language designed to create programs for the Java Virtual Machine (JVM). The JVM supports many different platforms. By doing this, developers write code for the JVM and any platform supported by the JVM can run the program. Further reading.

This section is designed to answer some frequently asked questions about Java and guide you through some decisions regarding Java.

OpenJDK vs OracleJDK
OpenJDK and OracleJDK are very similar. OpenJDK is the official open source reference implementation of Java. OpenJDK is an open source codebase that almost all other JDKs are built on. Excluding packaging, cosmetic and license differences OpenJDK is the same as OracleJDK.

JRE vs JDK
JRE stand for Java Runtime Environment. JDK stands for Java Development Kit. JRE is a package tool designed to run Java programs. JDK is a package of tools designed to develop Java programs. The JDK comes with the JRE which comes with the JVM. If you have JDK then you have JRE and JVM. Vanilla Minecraft does not need JDK, but plugins may require it.

Headless Java
A headless Java installation is a trimmed down version of Java. It does not have a GUI or mouse/keyboard support. 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."

- Debian Wiki

Verify that the latest version of Java is installed
The Minecraft server requires the Java Runtime Environment (also called JRE or simply Java). For your security, you should only use the most recent version of Java. To verify that you have the latest version, do one of the following:


 * Open Windows Control Panel, find Java (it may be inside the Programs category), and click on Update Now.
 * Visit http://java.com/en/download/installed.jsp. This will perform an automatic version check from your browser. However, the Google Chrome and Firefox browsers do not run Java content and therefore cannot check Java through the browser.
 * Open a command window and enter the command . If a version number is reported, then check the Java website to see what the most recent version number is.

If you don't have Java or your version is outdated, then download it at http://www.java.com/download/.

Starting the Minecraft server
Begin by downloading the server software from the Minecraft download page. If you want older versions, find their links at their respective pages. The server is available as a Java .jar file.

Before starting the server, be aware that wherever you run the server from (your desktop, a download folder, etc.), it will create several configuration files in that location. It's better to create a dedicated folder for your server and run it from inside that folder, as this will make it easier to locate/organize all the files.

Double click the file and the server should start. It will write configuration files in the folder, and quit immediately.

The first, and required, configuration you have to do is accepting the EULA. A text file call eula.txt is created in the application folder. Open this file in a text editor and change the line  to. 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.

If you get an error such as "Can't save server.properties" and your screen fills with useless, gibberish text, then run the Minecraft Server as administrator by right-mouse clicking on it and choosing 'Run as administrator'. (You may need the administrator password to do this.)

You might want to customize the server configuration, as is explained below.

Configuring from the command line
Both the Java and the executable version can be run from the Windows command prompt/line with extra parameters to configure, for example, memory usage. As we currently know there is no command prompt for Java on the Windows platform that will run these commands correctly. That, however, is subject to change.

To start the server, change to the Minecraft server folder (find the file path to which your server's jar file is) and open the windows command prompt (in Start, just type cmd and it should have a file name of cmd.exe), then enter the following command:

Replace  with the server application file name, for example.

If you prefer not to use the server's Graphical User Interface (GUI) to enter administration commands, simply add the option  to the end of the command:

Some people have reported that this requires (significantly) less memory and CPU resources.

You can also replace the  command with. Javaw.exe is identical to Java.exe, but there is no associated console window. This may be preferable when using a .bat file. (See the next section.) Note however that Javaw also doesn't show any error messages in the command window if anything is wrong.

Using the  and   parameters, the initial and maximum memory size for Java can be specified. By default, your server runs with about 100 MB of RAM, which is very little. Most people will change their server to run with more, for example:



Set  if your server is on a 64-bit Solaris system using 64-bit Java:

Run with  to see all available arguments that can be passed to the server, below is a list of available commandline options for the server. Note that these commandline options are for the *server*, not java. So place these arguments after the 'server.jar':
 * Commandline Options:


 * If a bonus chest should be generated, when the world is first generated.
 * If the server is in demo mode. (Shows the players a demo pop-up, no further implications?)
 * Erases the lighting caches, etc. Same option as when optimizing single player worlds.
 * Forces upgrade on all the chunks, such that the data version of all chunks matches the current server version (same as with sp worlds).
 * Shows this help.
 * Initializes 'server.properties' and 'eula.txt', then quits.
 * Doesn't open the GUI when launching the server.
 * Which port to listen on, overrides the server.properties value. (default: -1)
 * Gives an ID to the server. (??)
 * Runs the server in offline mode (unknown where  is used for, probably used internally by mojang?)
 * The folder in which to look for world folders. (default: .)
 * The name of the world folder in which the level.dat resides.
 * Doesn't open the GUI when launching the server.
 * Which port to listen on, overrides the server.properties value. (default: -1)
 * Gives an ID to the server. (??)
 * Runs the server in offline mode (unknown where  is used for, probably used internally by mojang?)
 * The folder in which to look for world folders. (default: .)
 * The name of the world folder in which the level.dat resides.
 * Runs the server in offline mode (unknown where  is used for, probably used internally by mojang?)
 * The folder in which to look for world folders. (default: .)
 * The name of the world folder in which the level.dat resides.
 * The folder in which to look for world folders. (default: .)
 * The name of the world folder in which the level.dat resides.
 * The name of the world folder in which the level.dat resides.


 * Older Commandline Options:

Some options worked in older versions but were removed or replaced by newer ones.
 * to tell the server to run in online mode so only authenticated users can join. (This may no longer work in newer versions)
 * to tell the server to run in online mode so only authenticated users can join. (This may no longer work in newer versions)

Creating a .bat file to store the commands
To start the configured Minecraft server, without having to enter all commands every time, you can create a .bat file in the server folder. You can include the  command to tell the window to stay open after the /stop command is issued. Useful if you want to read what happened as it shut down.

Here is an example of a bat file:

@ECHO OFF java -Xms1024M -Xmx2048M -jar minecraft_server.jar nogui pause

Double click the file to start your server. You may get a "Class_Not_Found" and ServerGuiConcole error, just ignore these errors and you should see your "Server Thread/INFO" dialog start the server.

Further configuration
Read the sections Port forwarding and further for more information about configuring your server.

macOS instructions
Keep in mind that the server won't run correctly on macOS 10.4 and earlier and may crash your machine.

Downloading
Download the latest server application software from the download page.

Installing Java
macOS already has Java downloaded onto your machine. Java is updated through Java's website If you are running macOS 10.8.* (Mountain Lion) or macOS 10.9.* (Mavericks) You need to download Java here, as Mavericks will fail when looking for it. Java 6 Download

Setting up the Minecraft server
Ensure you have followed the download step before proceeding.

cd "$(dirname "$0")" exec java -Xms1G -Xmx1G -jar server.jar nogui
 * Create a folder, if you haven't already, and put minecraft_server.jar into it. For example, create a folder on the Desktop named minecraft_server and drag the jar file into it.
 * Open TextEdit, set the format to plain text (Format > Make Plain Text), copy and paste in the following:
 * 1) !/bin/bash
 * Save the file as "start.command" in the same folder as minecraft_server.jar.
 * This will give the server enough RAM to run. The amount of RAM can be changed by editing the  to something else, such as   for 2 GB.
 * Open Terminal (in /Applications/Utilities/Terminal).
 * Grant execute permissions on file start.command to Owner, Group. and Public. To do so, type in, with a space after it; drag and drop the start.command file into the terminal window; and then press enter. (This gives run permission to the start.command script.)
 * Double-click the start.command file to start the server.
 * A new Terminal window will open and, the first time you run the script, several error messages about missing files/directories will appear. This is normal. You're now ready to configure your server.

Using Time Capsule
Some homes use AirPort Time Capsule as a wireless router instead of other brands. This section will teach you how to set one up without messing up your file server.

NOTE: Make sure you have your admin username and password.

That's it! You're now ready to configure your server.
 * Open System Preferences > Network.
 * Click the Advanced button and go under TCP/IP.
 * Where it says Configure IPv4, change that option to Using DHCP with manual address.
 * Change the IP address to 10.0.1.x, where x is a number between the last number of the two numbers under DHCP range (i.e. 10.0.1.2 to 10.0.1.254 would be anywhere between 2 and 254).
 * Now go to the Sharing section and make sure that Internet Sharing is on.
 * Now, open up AirPort Utility and edit your Time Capsule settings.
 * Go under Network and make sure the option Router Mode is set to DHCP and NAT. Now, click the + button under the Port Settings.
 * Type in the following:
 * Description: Minecraft Server (or whatever you want to call it)
 * Private IP Address: The address you chose for the 4th step.
 * Change everything with the word port in it to 25565.
 * Now, hit Save and update the Time Capsule.

Linux instructions
Linux comes in many different varieties called distributions (distros). Some of these distros are designed or better suited for running a server. If you are setting up a dedicated server it is recommended to use one of these distributions.

Linux, in general, is more welcoming to open source programs. So where applicable it is recommended you use open source programs, such as OpenJDK.

Note: That a 64-bit version of Linux will probably perform better on a 64-bit CPU and that a 32-bit version will only use the first 4 GiB of RAM if more than that is installed.

Downloading
Download the latest server application software from the download page.

Installing Java
OpenJDK is in most distribution's repositories. You can install it there. For Oracle Java refer to Oracle's Download Page.

''Note: While not affecting servers JavaFX or other proprietary aspects of Java while need to be installed separately.

Solus
Run  to install OpenJDK.

For OracleJDK refer to Solus Help Center

Note: OpenJDK 11 is not in Solus' repositories.

Debian and Ubuntu
Note: You might need to install the package "software-properties-common" by running  and/or "python-software-properties" by running   to use the   command.

Due to licensing issues, the repository frequently used to install Oracle Java has been discontinued. It is now recommended that you install OpenJDK 8 or above.

OpenJDK can be installed with one command.

Removing the 'headless' part of the command will install all components of Java.

Note: Tested in Ubuntu 18.04.

openSUSE
Note: Due to possible instability openSuse Tumbleweed is not recommended as a dedicated server.

There are two main methods of install Java on openSuse.

The first is to use the GUI.

Visit openSuse.org and select your version of openSuse. When you click on your version a download should begin. YaST2 should open. Most users will not need to change the default settings.

The second is from the terminal.

Run

Java should be installed.

Note: Tested in openSuse Leap 15.1

Arch Linux
Note: OpenJDK 7 - 12 are the only officially supported versions of Java.

Headless Installation -

Full JRE -

If you encounter issues it is recommended that Linux users refer to the ArchWiki

Gentoo
Run

Gentoo Wiki

Raspbian
Run

eLinux Wiki is a great resource.

Arch Linux ARMv7
On ARMv7 it could better to use java from oracle. Accept the license agreement

and download jdk-7u60-linux-arm-vfp-hflt.tar.gz

Extract file in

and change java default with

Then

should give something like that:

(tested on Raspberry Pi 2)

Other distros
Check your distro's documentation. It should have information on how to install OpenJDK.

Alternatively, you can visit Java's website directly to download the Java package for Linux. Most distros work with this (either 32 or 64-bit). Instructions for the installation of those different packages are given on the site.

If during installation, it asks for a password, enter your password. If you get asked "Is this OK [Y/N]" Enter Y and press enter if required. Java should now be installed.

Starting the Server
Open the terminal.

Type (make directory)

Go to Minecraft.net and download the latest server version. Put server.jar in  folder.

Type  (list directory)

Type (change directory)

Type  (how much RAM the JVM starts with) (the maximum amount of RAM)

Note: At least one gigabyte of RAM recommending for running a server.

''Note: When deciding how much RAM to allocate to your server ( >1G) remember to account for you OS and other applications. You can check how much RAM you have using the  command (in gigabytes.)''

The expected output:

If you did not get this output make sure you have entered the command correctly with no errors or typos. Also make sure server.jar and you are in the correct directory

Type (text editor)  (the file)

Change  to   to indicate you have read and agree to the EULA.

Ctrl+O to save; Ctrl+X to exit

Type  to start the server.

''Note: Adding  after   will not launch the GUI.



Creating a (basic) startup script
Create a document named

Copy paste this inside.

In the terminal type

Type  to start your server and   to stop your server.

Startup and maintenance script
Alternatively, you can manage/automate the startup and shutdown of the Minecraft server using a script such as the ones listed below:


 * Minecraft Server Manager A comprehensive startup script for Minecraft and Bukkit servers (support Debian, such as Ubuntu).
 * MSM can also periodically create World Edit compatible backups.
 * Keeps players informed with configurable in-game messages, such as "Shutting down in 10 seconds!"
 * Expose in-game commands (such as "say", "op" and "whitelist") to the terminal.
 * Tab completion on all commands makes learning easy.
 * Visit Minecraft Server Manager's GitHub page for the full list of features.
 * Server startup script
 * FreeBSD startup script
 * OpenBSD startup script
 * Ubuntu startup script
 * rfwadmin startup script with web interface (for Linux servers). Nice web interface for quickly saving and loading maps.
 * Minecraft Systemd Service A fully systemd-integrated minecraft service:
 * Working on CentOS and Fedora
 * Protecting the server with various readonly and inaccessible jails
 * Safe restart and stop operations using rcon
 * Can be combined with a Minecraft Command Center Script for ease of administration
 * Arch Linux systemd wrapper

A simple installer script (also installs Java)
https://github.com/silvertriclops/MCSLI

Note: this is a very early project, designed with offline installation in mind, and will be updated periodically to make it more user friendly.

FreeBSD instructions
This part was tested with FreeBSD 10.0 amd64 and 'jre-7u65-linux-i586.tar.gz'

Installing Java
Due to performance and crash issue with OpenJDK and Minecraft server, we will install Sun/Oracle JRE made for linux. Before installing this JRE, you have to install the linux binary compatibility on FreeBSD, you can follow this documentation. Jave requires some information about the proc. You have to mount linprocfs, type: and add this line to : The Sun/Oracle JRE has a dependency marked as forbidden and the installation will fail. Go to  and in the Makefile remove the line which starts with. Next you have to manually get the linux tarball due to licence issue (like `jre-7u65-linux-i586.tar.gz') from java official web site and copy the file to. Then to install the JRE, go to  and run:

Note: The previous version of this part, tested on FreeBSD 9.2 amd64, was explained like this: You may have to set JRE_UPDATE_VERSION variable in your Makefile to the actual number (e.g. 45 like in this example) and run 'make install NO_CHECKSUM=1'.

Try running. You may end up with a message that it cannot find. One way to fix it is to add your java paths to the search explicitly. Make a symlink: And in  add: Run. Now  should work.

Launching Minecraft Server
Create a folder and copy the minecraft server jar in it. In the actual version you will get this exception  if you run the server in the usual way, so we add this line to the command to fix that. The command to launch is like

Plan 9
Use: Then snarf java -jar  xvmf in acme

Docker
Docker is a container based platform which ensures that you do not contaminate your host system.

Getting docker (for Linux, Mac & Windows)
Read https://docs.docker.com/install/

Docker image
Download latest minecraft-server-standalone Setting up a container with port 25565 open, 1G ram assigned and named "Standalone-Minecraft-Server" Start the server

Port forwarding
Port forwarding is used when you have a router and you wish to let users connect to your server through it. If you wish to host your server for local reasons, it is not required that you do so. Keep in mind that port forwarding might cause security risks.

'''When port forwarding, it varies on how your router will ask you for the information. If you don't understand on how your router wants you to input the information, try visiting PortForward.com for a tutorial.'''

Once you have managed to locate your router's admin page, and find the Port Forwarding page; hit add new service (may not work) (if you use Belkin, this can be very difficult to perform) or custom service. When you get a page asking to setup the new rule, it should prompt you on what you want to call it. You may name it as you wish, but for simplicity, name it "minecraft". Then, you want to look for "type". If "TCP/UDP" or "Both" isn't an option you will have to create two rules for both protocols. For the ports (internal and external), enter 25565. If it asks for anything else other than output IP (or internal IP, server IP), leave it alone and continue.

To find your computer's IP address, use the following steps:

Windows
 * Press ; this should be up to the "Run" dialog box. Type  and hit . This should open a command window with a black background. From there, type   and press . You should be given a list of text. Scroll up to "Wireless LAN" (if using wireless) or "Ethernet" (if using a wired connection), and look at "IPv4 address". To the right of this should be a string of numbers (of the form xxx.xxx.xxx.xxx). Copy this down by right-clicking the window and selecting "Mark", then highlight the area and hit Enter. Don't copy any parenthesis or letters.

Mac
 * Locate your way to your desktop. Pull up the apple menu under the logo and scroll down to System Preferences; then select "Network" your IP should be on the lower right as "IP address (xxx.xxx.xxx.xxx)". Once you have your IP, copy it down.

Linux
 * Either you use the network diagnose center (depending on distribution), or the terminal with . The output should return all your interfaces. Search for , copy the xxx.xxx.xxx.xxx numbers down.

Once you have this IP, enter it in the "Output IP / Server IP" or whatever way it asks for where the service points to.

Once you have completed it, find where it says to save/continue/apply. And you have successfully port forwarded. When you run your Minecraft server, you have to leave the Server IP field empty in the server properties.

For people to connect to your server, they must use your external IP, which you can find at websites such as IP Chicken. If you don't want to use such IPs, use DynDNS services such as NoIP DynDNS

Configure and connect
Now it is time to configure and connect.

Setting up a VPN
An alternate way to set up a server between you and your friends is to set up a VPN (virtual private network). This method may be deemed unrecommended, and an inconvenience for many users due to the fact that all users who wish to connect to the server must download external software in order to join or create server. An alternative to this method is to port forward. A free software utility that can be used to set up a VPN ais Hamachi by LogMeIn. OpenVPN is another (free, open source) alternative that supports most OSes, but is a bit more difficult to configure. Free Radmin VPN is another software with no need to register on the website and no limits per the number of users. The free version of Hamachi allows up to 5 connections (i.e. players).

Setting up Hamachi

 * 1) Install Hamachi on each computer that wishes to participate in the server, including the host. Windows / Mac Linux (32-bit and 64-bit   and   packages are available, you can install it on Gentoo by emerging "net-misc/logmein-hamachi")
 * 2) The host server signs up for admin via the Logmein website.
 * 3) On the host machine, a new Hamachi network is created.
 * 4) The host installs and configures the Minecraft server software: The server IP field in server.properties is left blank (as default).
 * 5) The host passes the newly created Hamachi network credentials to each of the players.
 * 6) The players connect to the host's Hamachi network.
 * 7) Now that all the machines are connected within the same Hamachi network, the host gives their machine's Hamachi IPv4 address to the players.
 * 8) Each player connects using this IP as per the usual Minecraft multiplayer screen.
 * 9) Note that Hamachi has been squatting on an IANA-allocated IP block (25.0.0.0/8). As such, Hamachi fundamentally conflicts with the internet itself.

Setting up Radmin VPN
It is very similar to Hamachi installation.


 * 1) Download free and install Radmin VPN
 * 2) Create a network: after Radmin VPN installation on the local computer press "Create network" button. Set a Network name and a Password —> Press "Create" button.
 * 3) Now the new network will appear in the main window —> invite friends, send them the info to connect -> you are welcome to run Minecraft.
 * 4) Connection: after program launch press “Join network" —> in the dialog box press enter Network name and Password received from the network administrator —> "Join" —> the new network and its nodes will be shown in the main window. —> Connect to the host in Minecraft.
 * If the connection on Radmin VPN has been established, but you don`t see other players in the game, then it is required to adjust firewall for work of the game or just turn the firewall off.

Configuring the Minecraft server
[{"uuid": "user-UUID-value","name": "your-name","level": 4}, ...]
 * 1) First, open eula.txt, and change the line  to.
 * 2) Configure the server by editing the server.properties file, the format for which is explained here. Be certain to edit the file with a text editor that does not add formatting (e.g., for italics), such as Windows Notepad. Additional configuration may not be necessary as many servers run fine from the default values.
 * 3) To become or add an operator (op), type  into the server console or gui. This adds the specified user's username and UUID to the   file. Operator status will not be changed if you change your username due to the use of UUID.
 * 4) * Administrators and operators may execute commands. In other words, operator (op) privileges allow you to control certain aspects of the game (e.g., teleporting players).
 * 5) * ops.json contents:
 * 1) If your server.properties is configured to enable whitelist, you can add a user to the  by typing  into the server console or gui. Due to the transition to the UUID system, it is not recommended to directly edit.

Connect to the Minecraft server

 * 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 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 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.
 * 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 MyWANIP 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 DNS 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).
 * For troubleshooting purposes you can try running Minecraft on the server machine and connect locally. You can connect through either, your home network IP  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), 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 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 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 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.

FAQ (frequently asked questions)
'''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)!
 * Operating system
 * Version of Java
 * One machine or multiple computers
 * Exact description of the problem
 * Steps you have taken to solve the problem
 * Any errors you encountered
 * Screenshots of the problem (if possible)
 * Anything else that might help us to solve your problem - there almost never is too much information (passwords would be too much information!)

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: Right-click your .bat program and hit edit; add a new line and type  save and run the file. If it says invalid path, it is probably due to an incorrect path to java.exe/javaw.exe or your Minecraft server jar file. You may just need to change  to. Or search your system for java.exe/javaw.exe and adjust the path accordingly. (It's probably under  or  .) Also, you must have the offline version of Java installed—not just the Java plug-in for your browser.

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 (private) IP address.

Alternatively, the error can mean that you have tried to use a port that is already in use or that you do not have permission to use (ports < 1024 are privileged and require root/Administrator access to bind to). You can try a different port by changing it in your  file in this line:.

Note: You should avoid using the following ports for your server as some ISPs may block these ports for security reasons and you shouldn't be running the Minecraft server as root (in the case of a Linux type OS and ports < 1024):
 * 21 (Used by most FTP Servers)
 * 22 (Used by Secure Shell daemon)
 * 25 (Used by Mail Servers for SMTP)
 * 53 (Used by DNS Servers)
 * 80 (Used by most Web Servers)
 * 110 (Used by most Mail Servers for POP3)
 * 115 (Used by Simple File Transfer Protocol)
 * 143 (Used by Mail Servers for IMAP)
 * 443 (SSL port for Web Servers)
 * 3306 (Used by most MySQL Servers)

Generally avoid any port below number 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 unrecognized server software, unbalanced client / server versions or modifications to the client.

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 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 part is the maximum amount of memory the server can use. = 1GB = 2GB And so on.

Q: Why is the server CPU constantly at full load?

A: Some users are experiences full CPU load on the server. This may be caused by the GUI (graphic user interface) window. Run the server with the  option to disable this window.

'''Q: Help! How do you find out your server's IP address?'''

A: Read

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 a private IP, you'll need to log into the modem/router your ISP issued to you, and configure port forwarding to the WAN IP of your router.

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 packet with a 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."

[https://serverfault.com/questions/725262/what-causes-the-connection-refused-message 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 forums 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.

Video/Alternative Tutorials
Here are some other tutorials on how to set up a Minecraft server:
 * Windows
 * Server Tutorial: How to Make A Vanilla Minecraft Server
 * How To Make a 1.6.2 Minecraft Server on Windows
 * How to Set Up and Host a Vanilla 1.5.2 Windows Minecraft Server
 * Mac OS X
 * How To Make a 1.6.2 Minecraft Server on Mac OS X
 * How to setup a 1.3.2+ Minecraft Server on OS X
 * Alternative video tutorial on setting up a Minecraft server with Mac OS X
 * Linux
 * Linux tutorial for more advanced users
 * How to Install Minecraft Server on CentOS
 * How to make a Minecraft Server on Ubuntu for beginners
 * Others
 * How to Set Up Port Forwarding
 * How to Port Forward any Minecraft Server (1.6.2)
 * Alternative port forwarding tutorial for Windows (with pictures)
 * Full course
 * Course: How to Make a Server

Anleitungen/Server erstellen Tutoriels/Configurer un serveur 튜토리얼/서버 설치 Создание и настройка сервера 教程/架设服务器