Tutorial Created by Mzaq Table of Contents(links don't work yet): -Introduction (finished) -Setting up on Windows (finished) -Setting up on Mac (not started) -Setting up on Linux (not started) -Other Info (Work in progress)
This tutorial will show not only how to create a server but how to mantain it as well. Using simple steps you can have a server running in no time!
Note: If you want your server to be modded, please look at my modding servers tutorial. Without further ado, lets get started! Setting up the server on Windows
Windows users can use either the exe or the jar, while OSX and Linux users can use only the jar.
It is recommended that you create a folder either on your computer's desktop, or elsewhere in your computer, for the server files. The server app should go in the folder you create. Step 2: Checking for the latest Java
Make sure that you have Java 6 installed. To do so, we first need to open up CMD.
In Vista/7 open the start menu and enter cmd in the search field, and press enter.
In XP open the start menu and click Run, then enter cmd and press enter. You can also hold the Windows key down and press R to open Run.
At the command prompt, enter the following command, and press enter: java -version
Java then should display its version, and should read "java version 1.6"
If you have a previous version (less than 1.6) or you get this error: "'java' is not recognized as an internal or external command, operable program or batch file.", then you need to install/update the computers java version. You can do so at the java download page.
After you installed the latest java try again with java -version.If you get an error at this point, try the following to add java to your system path.
Right click Computer
Click "Advanced system settings"
Click "Environment Variables"
Under system variables, find the Path variable.
Click edit, and append to the end of the value: ";C:\Program Files (x86)\Java\jre6\bin"
Now re-open the command prompt and try again
Step 3: Starting the server For the .exe users - Double click on the "Minecraft_Server.exe" and the server should start.
For the jar users, which is a bit more complicated - You will need to have a path variable set up for Java in order to start the jar version of the server. Refer to step 2, above to set up a path variable or head to my tutorial.
To start the jar version of Minecraft on Windows, create a new file in Notepad, and paste in "java -Xmx1024M -Xms1024M -jar minecraft_server.jar nogui"
Save the file as start.bat, and place the file in the same folder as minecraft_server.jar. The .bat extension saves the file as a batch file.
Double click start.bat, and the Minecraft server will run.
Starting the jar version with more/less memory: Edit the code in the batch file you created, and increase/decrease the numbers to greater or less than 1024. The default amount, 1024, allocates 1 GB to the server application. Don't allocate more memory than you currently have!
Starting the jar version without altering your system path: To start minecraft.jar server without having to change your system path variable you need to instead express the path variable for Java in the "start.bat" file. This is handy because it allows you to still run commands from command prompt using the default system path, without having to constantly edit the system path.
To do this open your start.bat file (or whatever you've named it) with Notepad.
On the very first line add the command path=, then following with the system location of Java.
Most commonly this path will look like "C:\Program Files (x86)\Java\jre6\bin", so what you would then write is path= C:\Program Files (x86)\Java\jre6\bin.
Make sure that on the following line you still have the code java -Xmx1024M -Xms1024M -jar minecraft_server.jar to run the actual server file.
Step 4: Configuring the Minecraft Server
Configure the server by editing the server.properties. Windows may not recognize it, so tell it to open with any word processor (such as Notepad or Notepad++). The server should run fine from the default values.
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, and op privileges allows you to destroy/place blocks. Add the name exactly as it is. From the server gui, you can type "op <name>" and it will automatically update the ops.txt file.
Step 5:Joining your 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.
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.
Step 6:Ports and Networks
You must open the port (default is 25565) in TCP, in the firewall
If the server in question is not reachable via a globally routable address, you will need to add appropriate address and/or port number translation rules to the gateway — usually your router that does have the global 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.yougetsig...ols/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.
Setting Up a VPN (Hamachi) An easy way to set up a server between you and your friend 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.
Pass these details onto every person concerned and get them to login
One person set up a server.
Everyone else connect via their Hamachi ip address and use port number 25565 (default)
Other Info Server.properties
[size="1"]As of 19th April 2011 [Beta 1.5], these are the default settings for a newly installed Beta Minecraft server:
#Minecraft server properties#Thu Mar 31 20:05:08 CDT 2011level-name=worldhellworld=falsespawn-monsters=trueonline-mode=truespawn-animals=truemax-players=20server-ip=pvp=truelevel-seed=server-port=25565allow-flight=falsewhite-list=false
The "level-name" value will be used as world name and as folder name. You may also copy your saved game folder here, and change the name to the same as that folder's to load it instead.
[list][*]A single line of text. Characters such as ' (apostrophe) may need to be escaped by adding a backslash before them.[/list]
This option has shown up in the 0.2.2_01 release.
[list][*][b]true[/b] - the server will generate a Nether for the world, if one doesn't already exist, and players will spawn there instead.[*][b]false[/b] - default minecraft world-type[/list]
Set true if you want monsters to be spawned at night, false if you don't. [i]Tip: if you have major lag, turn this off/set to false.[/i]
[list][*][b]true[/b] - Enabled. Monsters will appear at night and in the dark[*][b]false[/b] - Disabled. No monsters.[/list]
Server checks connecting players against minecraft's account database. Only set this to false if your server is [b]not[/b] connected to the Internet. Hackers with fake accounts can connect if this is set to false! If minecraft.net is down or inaccessible, no players will be able to connect if this is set to true.
[list][*][b]true[/b] - Enabled. The server will assume it has an Internet connection and check every connecting player.[*][b]false[/b] - Disabled. The server will not attempt to check connecting players.[/list]
[url="http://www.minecraftwiki.net/wiki/Animals"]Animals[/url] will be able to spawn.
[list][*][b]true[/b] - Animals spawn as normal.[*][b]false[/b] - Animals will immediately vanish.[/list]
The max numbers of players that can play on the server at the same time. Note that if more players are on the server it will use more resources. Note also, admin connections are not counted against the max players.
[list][*]A number between 0 and 255.[/list]
Set this if you want the server to bind to a particular IP. It is strongly recommended that you leave server-ip blank!
[list][*]Blank, or the IP you want your server to run on.[/list]
Enable PvP on the server.
[i]Note: Hitting a player while having PvP set to false and having tamed wolfs will still cause the wolfs attacking the attacked player.[/i]
[list][*][b]true[/b] - Players will be able to kill each other.[*][b]false[/b] - Players cannot kill other players (Also called PvE).[/list]
Add a seed for your world. Like in singleplayer.
[list][*]It can be anything, from letters to numbers or a mixture.[*]Some examples are: 'minecraft', '404', '1a2b3c'[/list]
Changes the port the server is hosting on. This port must be forwarded if the server is going through a router. [url="http://www.minecraftforum.net/viewtopic.php?id=836"]This forum post[/url] explains very well how to forward a port easily. The default port number is 25565.
[list][*]A number between 1 and 65535, though it should be greater than or equal to 1024 as lower values are reserved for well-known services.[/list]
Enable a white list on the server. With a white list enabled, users not on the white list will be unable to connect.
[list][*][b]false[/b] - No white list is used.[*][b]true[/b] - The file white-list.txt is used to generate the white list.[/list]
Will allow users to use flight/no-clip on your server, if they have an [url="http://www.minecraftwiki.net/wiki/Mod"]mod[/url] that provides flight/no-clip installed. With allow-flight enabled griefers will possibly be more common, because it will make their work easier. This function was implemted by [url="http://www.minecraftwiki.net/wiki/Jeb"]jeb_[/url].
[list][*][b]false[/b] - Flight/no-clip is not allowed.[*][b]true[/b] - Flight/no clip is allowed, and used if the player have a no-clip mod installed.[*][/list][/size]
These commands are usable from the console, or from chat by ops on the server (by putting a slash "/" before a command). Items in [square brackets] are optional.
[b]Command Description Usage[/b]
help or ? Shows a list of server commands in the console or in-game. help
kick player Removes player from the server. kick player1
ban player Bans player from the server. ban player1
pardon player Pardons a banned player so that they can connect again. pardon player1
ban-ip ip Bans an IP address from the server. ban-ip 192.168.1.5
pardon-ip ip Pardons a banned IP address so that they can connect again. pardon-ip 192.168.1.5
op player Turns player into an op. op player1
deop player Removes op status from player. deop player1
tp player1 player2 Moves player1 to the same location as player2. tp player1 player2
give player id [num] Gives player num (default 1) of the resource with data value id. give player1 3 64 (gives player1 64 blocks of dirt)
stop Gracefully stops the server. stop
save-all Forces a server-wide level save. save-all
save-off Disables terrain saving (useful for backup scripts). save-off
save-on Re-enables terrain saving. save-on
list Lists all currently connected players. list
say message Broadcasts message to all players without a player name being shown and putting message in pink text. say hello minecraft world!
whitelist on/off Enable or disable whitelisting (i.e. only listed players may join). whitelist on
whitelist add/remove player Add or remove player from the whitelist. whitelist add notch
whitelist list Lists all currently whitelisted players. whitelist list
ts Spawns a thunder strike on cursor. /ts
whitelist reload Reload the whitelist from file. whitelist reload
time add/set amount Add to or set the world time. Amount may be a number between 0 and 24000, inclusive, where 0 is dawn and 12000 is dusk (i.e. clock is bisected; left side is night, right side is day). time set 0
These commands are usable by any player.
/kill Inflicts 1000 damage points to the user, killing them and returning them to the spawn point. Useful when lost or stuck.
/me action Sends a message as an IRC-style action (e.g. "* Player slaps everyone around a bit with a large trout").
/tell player message Sends a private message to player.
The Meaning of Life, the Universe, and Everything.
Thanks for this but could you help me out a bit? I'm trying to use mods on my server so I'm using the jar file but when I try to run it with the bat file all it does is flash the command prompt for a second and then it closes it.