Tutorials/Setting up a server

= Download do Servidor Minecraft = Download Minecraft_Server.exe ou minecraft_server.jar do [Minecraft http://minecraft.net/download.jsp página de downloads].

Usuários do Windows podem usar o exe ou o jar, Mac OSX e Linux podem usar somente o jar.

É recomendável que você crie uma pasta ou no desktop do seu computador, ou em outro lugar no seu computador, para os arquivos do servidor. O aplicativo de servidor deve ir na pasta que você criar.

Nota: Existe também software de servidor personalizado disponíveis, mas note que esses aplicativos não são suportados pelo Mojang.

=Windows Instructions=

Verifique e instale a última versão do Java

 * 1) Certifique-se que você tem o Java 6 instalado. Para isso, precisamos primeiro abrir um comando (CMD) janela.
 * 2) * No Windows Vista / 7, abra o menu Iniciar, digite cmd no campo de pesquisa, e pressione enter.
 * 3) * No XP abra o menu iniciar e clique em Executar, digite cmd e pressione enter. Você também pode segurar a tecla Windows para baixo e pressione R para abrir Executar.
 * 4) * No prompt de comando, digite o seguinte comando e pressione enter:
 * 5) * Java, em seguida, deverá apresentar sua versão, que deve ler "Java versão 1.6"
 * 6) Se você receber esse erro ",  ", então você pode ter uma versão anterior (menos de 1.6) de Java ou Java não pode estar em seu caminho do sistema.
 * 7) * Para 32-bit usuários que você pode obter a última versão aqui: Java página de download. Se você usar um SO de 64 bits garantir que você baixar o pacote do Windows x64: Java página de download.
 * 8) * Depois de ter instalado a última versão do Java, tente novamente com.
 * *: Se você receber um erro neste momento, tente o seguinte para adicionar Java para o seu caminho do sistema.
 * 1) * # Direito em Computador.
 * 2) * # Clique em propriedades.
 * 3) * # Clique em "Configurações avançadas do sistema".
 * 4) * # Clique em "Variáveis ​​de ambiente".
 * 5) * # Em Variáveis ​​do sistema, encontrar a variável Path.
 * 6) * # Clique em editar e acrescentar afinaldo valor:  . Se você usar 32-bit Java para um recurso OS 64-bit:
 * 7) * # Reinicie o computador.
 * 8) * # Agora re-abrir o prompt de comando e tente novamente.

Inicie o Servidor de Minecraft (versão exe)
Clique duas vezes no "Minecraft_Server.exe" arquivo eo servidor deve começar.

Se o Windows não reconhece o filetype (Você está sendo solicitado a selecionar um programa para abri-lo com), pode ser porque Minecraft_Server está faltando a extensão. Exe. Isso pode ser corrigido por renomear o arquivo para Minecraft_Server Minecraft_Server.exe. Se funcionasse, o ícone deve ser agora o símbolo Minecraft.

Se isso não funcionar, você terá que entrar em uma janela de comando, abrindo Executar, digite cmd e pressione enter. Uma vez lá você precisa para navegar até a pasta que você criou.

Para fazer isso:


 * 1) Verifique se você está no drive apropriado (geralmente unidade C). Tipo   e tecle enter para acessar a unidade c
 * 2) Agora você precisa chamar o diretório (abra a pasta). Tipo   então aperte enter. Certifique-se incluir na cotação
 * 3) Verifique se você está no diretório apropriado. Tipo   e comando irá gerar uma lista de conteúdo da pasta, você deve ver minecraft_server lá.
 * 4) Renomear Minecraft. Tipo   entrar em seguida, bateu. Isso deve adicionar a extensão. Exe para o arquivo executável e ele agora deve funcionar corretamente

Inicie o Servidor de Minecraft (versão jar)

 * 1) Se você tiver a versão. Jar, você precisará ter uma variável de caminho configurado para Java, a fim de iniciar a versão jar do servidor. Consulte o passo 3 de "verificar e instalar o mais recente Java" acima para criar uma variável caminho.
 * 2) Para iniciar a versão pote de Minecraft sobre Windows, criar um novo arquivo no Bloco de Notas, e cole em
 * 3) Salve o arquivo como startServer.bat, e colocar o arquivo na mesma pasta como minecraft_server.jar. A extensão. Bat salva o arquivo como um arquivo de lote.
 * 4) Dê um duplo clique startServer.bat, eo servidor de Minecraft será executado.
 * 1) Dê um duplo clique startServer.bat, eo servidor de Minecraft será executado.

A partir da versão jar sem alterar o caminho do sistema
Para iniciar o servidor minecraft.jar sem ter que mudar sua variável de caminho do sistema que você precisa, em vez expressar a variável de caminho para o Java no "start.bat" arquivo. Isso é útil porque ele permite que você ainda executar comandos de prompt de comando usando o caminho padrão do sistema, sem ter que constantemente editar o caminho do sistema. para que uma janela de comando não é aberto para mostrar a saída do nosso arquivo de começar onde  contém os valores existentes e Path ProgramFiles%   contém a localização do seu Arquivos de programas de 32 bits - geralmente "C: \ Program Files (x86)"
 * 1) Para fazer isso abra o arquivo start.bat (ou o que você colocou o nome dele) com o Bloco de Notas
 * 2) Na primeira linha adicione o comando
 * 1) Na linha seguinte verifique se o sistema pode encontrar Java (também chamado de Java Runtime Environment ou JRE) adicionando-o a variável de ambiente PATH. Em uma corrente Windows PC Java será mais comumente localizado em "C: \ Program Files (x86) \ Java \ jre6 \ bin", então o que você faria em seguida, escrever é
 * 1) Finalmente, certifique-se na última linha tem o comando que inicia o servidor de Minecraft-se:
 * 1) Se você preferir não usar o servidor de interface de usuário gráfica (GUI) para introduzir comandos de administração, basta adicionar a opção   para o final do último comando acima, de modo que ele lê:

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

= Linux Instructions = This tutorial for how to set up a Minecraft server on Linux was designed for people who don't have a lot of experience with Linux. There is a more advanced tutorial in the forums. This tutorial was tested on Ubuntu 9.10 32-bit but should work with the descendants of Debian.

Downloading
Ensure you have the latest server application software. Look under Download the Minecraft Server above for instructions.x

Verifying Java version
Open the terminal from Applications > Utilities > Terminal. Enter.

Make sure the first line says: java version "1.6.0_xx"

Where xx is any number. Don't sweat it.

Installing Java
If you get  (which may be followed by more text) or if you do have another Java version than 1.6 then you need to install or update java. The official Sun Java is recommended. Quite a few individuals have experienced issues with OpenJDK. If OpenJDK is installed, remove it before installing the official Sun Java.

Debian
To install Java, simply type this in terminal and press enter:

Ubuntu
For Ubuntu 10.04 LTS and on, the sun-java6 packages have been dropped from the Multiverse section of the Ubuntu archive. You must add these sources: Some distros have the command "add-apt-repository" removed. If this is the case, you will need to add the python properties by running the following command:
 * For Ubuntu 10.04 LTS (Lucid Lynx):
 * For Ubuntu 10.10 (Maverick Meerkat):
 * For Ubuntu 11.04 (Natty Narwhal):

Then you can proceed to add the source:


 * For Ubuntu 11.10 (Oneiric Ocelot):
 * Then install the packages:

openSUSE
Use

Arch Linux
Open a terminal and run  as root.

Other Distros
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.

Start the Minecraft server
Open the terminal again (Applications > Accessories > Terminal). Enter the following commands: (change minecraft_server to the same name of the folder you extracted the server to)

Less than 1GB free RAM
If you have less than 1024MB RAM, the above line may cause problems with swapping and out of memory conditions, which makes the game hard to play. Measure your current free RAM: It may look like this:

You are interested in the last number in the third line, 2163 in this case. Subtract some RAM as safety. On this computer, the server may use up to 1536 MB RAM. Now, replace the 1024 in the above example with the calculated number:

if Minecraft_Server.exe is being used you use:

Voila, it should run smoothly now.

Tip: If you want to spare more memory, you may set the -Xms parameter even lower, say:

The parameter controls how much memory is reserved on startup. Your server will start with 32MB RAM and whenever it needs more memory it will allocate some until it reaches the maximum of 512M. However, this will result in a little slowdown whenever the allocation is done.

Startup and maintenance script
Alternatively you can automate the startup of the Minecraft server.

Server startup script

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

= Mac OS X Instructions = Setting a server up in Mac OS X is "more involved" than in Windows because Notch has not provided an executable. For a full video tutorial click here. Keep in mind that the server won't run correctly on OSX 10.4 and may crash your machine.

Downloading
Ensure you have the latest server application software. Look under "Download the Minecraft Server" above for instructions.

Installing Java
Mac OS X already comes with its own version of Java that is updated automatically via Software Update (Apple menu > Software Update).

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

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 code, and save the file as "start.command" in the same folder as minecraft_server.jar. cd "$(dirname "$0")" exec java -Xmx1G -Xms1G -jar minecraft_server.jar
 * 1) !/bin/bash

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). Type in, with a space after it, then drag and drop the start.command file into the terminal window, then press enter. (This gives run permission to the script.)

Double-click the start.command file to start the server.

Run as a daemon
Alternatively you can automate the startup of the Minecraft server.

Create a Mac OS X startup daemon

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

= Configuring the Minecraft Server =

op privileges allows you to destroy/place blocks. Add the name exactly as it is. From the server gui, you can type "op " and it will automatically update the ops.txt file.
 * 1) Configure the server by editing the server.properties (Use this link to see how it works). Windows may not recognize it, so tell it to open with any text editor (such as Notepad or Notepad++). The server should run fine from the default values.
 * 2) Add your username to the admin.txt and/or ops.txt (newer versions may not have an admin.txt file). Admin.txt allows you to execute server commands.

= Connect to the Minecraft Server =
 * To test the server, if you are playing on the machine you are hosting on, select the "Multiplayer" option in the game client (or browser client) and type in "localhost".
 * For people connecting from the internet, they must connect using your external IP address. You must port forward for someone outside your network to connect to the server.
 * Users within your network can connect with your internal IP address. You do not need to port forward for connections that are within your local network.

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://mywanip.com/ to periodically check on the external 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). An example of a free dns service is Dyndns.

Firewalling, NATs and external IP addresses

 * You must open the TCP 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 http://www.yougetsignal.com/tools/open-ports/. 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/.

Local Network Dedicated 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 affect Beta servers, and you should be able to connect via an internal or external IP.

Setting Up a VPN (Hamachi)
An easy way to set up a server between you and your friends is to set up a VPN (virtual private network). A free software utility that can be used to set this up is Hamachi by LogMeIn.

Advantage of doing this saves you configuring ports on your router and if you have a dynamic IP address using Hamachi will provide you with a static IP.


 * 1) Install software on you and your friend's computers  https://secure.logmein.com/products/hamachi2/ or https://secure.logmein.com/US/labs/?wt.ac=73-516-440 for Linux (32-bit and 64-bit .deb and .rpm packages are available, you can install it on Gentoo by emerging "net-misc/logmein-hamachi")
 * 2) One person sign up for admin via logmein website
 * 3) Create new network
 * 4) Pass these details onto every person concerned and get them to login
 * 5) One person set up a server.
 * 6) Everyone else connect via their Hamachi ip address and use port number 25565 (default)

= Reporting problems in the forum = Before you can ask for help in the forums make sure that your problems is not listed in the Common Problems

If your problem is not listed you can create a new thread asking for help in the Server Administration Make sure to include as much information as possible:


 * Operating system
 * What you were trying to do
 * What you did so far
 * Any errors you encountered
 * Screenshots of the problem (if possible)

= Other tutorials = Here are some other tutorials on how to set up a Minecraft server.


 * Full video tutorial for setting up Minecraft server on Mac OSX, including port forwarding
 * Another Mac OSX and port forwarding tutorial
 * Alternate Mac OSX video (updated for 1.7)
 * Linux tutorial for more advanced users
 * Windows tutorial with focus on how to forward a port
 * Guide to setting up an alpha server using Virtualbox.
 * How to install a Minecraft Server on Debian (German)
 * How to Install Minecraft Server on CentOS

Tutoriels/Configurer un serveur Создание и настройка сервера 튜토리얼/서버 설치