How To setup Minecraft server on Windows OS

From Got Opinion Wiki
Revision as of 12:10, 4 February 2015 by Paul (talk | contribs)
Jump to navigation Jump to search

This How To describes a basic setup of a Minecraft Server on Windows server operating system.

Install Java

Install Oracle's latest version of Java for your operating system. Use 64-bit if you have a 64-bit operating system (preferred).

Download lastest version from java.com here.

Download Minecraft Server

Download latest version of Minecraft multiplayer server for your operating system (.exe for Windows or .jar for Linux).

Notes about using Minecraft Server:

  • You don't actually "install" Minecraft. Simply run the executable.
  • I download the file into a directory dedicated to Minecraft. On Windows I use C:\minecraft (or other drive letter).
  • The Minecraft application uses a healthy amount of disc I/O. Put the Minecraft executable on the fastest drive you have available (I use a dedicated 60GB SSD).

Initial configuration of Minecraft Server

  • Open File Explorer and watch directory where Minecraft Server executable is located.
  • Run the executable once to generate default files.
  • IMPORTANT Always correctly stop the executable. Type /save-all press ENTER then /stop press ENTER.
  • File Explorer should show the directory with some new files or directories.
  • Edit the eula.txt agreement. You want to change eula=false to eula=true then save and exit the eula.txt agreement.
  • Run executable second time to generate default files.
  • Correctly stop the executable.

At this point the root Minecraft directory will have some additional files and directories with default settings.

You want to use a text editor to edit the server.properties file. NOTE: Make sure you preserve the file name of server.properties (.properties is the file extension).

Gamepedia has an ad ridden but useful description of the server.properties file.

Here are the default 1.8.1 server properties:

#Minecraft server properties
#Wed Feb 04 13:22:43 CST 2015
generator-settings=
op-permission-level=4
allow-nether=true
resource-pack-hash=
level-name=world
enable-query=false
allow-flight=false
announce-player-achievements=true
server-port=25565
max-world-size=29999984
level-type=DEFAULT
enable-rcon=false
level-seed=
force-gamemode=false
server-ip=
network-compression-threshold=256
max-build-height=256
spawn-npcs=true
white-list=false
spawn-animals=true
hardcore=false
snooper-enabled=true
online-mode=true
resource-pack=
pvp=true
difficulty=1
enable-command-block=false
gamemode=0
player-idle-timeout=0
max-players=20
max-tick-time=60000
spawn-monsters=true
generate-structures=true
view-distance=10
motd=A Minecraft Server

For my kid friendly server I change these settings (for details on changes see "Using Minecraft" section:

level-name=yourWorldNameGoesHere
server-port=63000
white-list=false
pvp=false
motd=Your Server Message Goes here.

Using Minecraft

level-name= The entry here will create a folder in your C:\minecraft directory equal to this value. I use only letters with no spacing.

server-port= I use high unused port. The clients must be set to use this port. The firewall must be set to port forward using this port.

white-list=false Leave false for anyone to join. Set true for only pre-approved people to join. I would leave false unless unauthorized clients are accessing your server. If you don't publish the IP address for others to use and use a custom port you should not have any authorized clients.

pvp=false When true players can damage and knock each other back. This is dangerous when you're traveling together or digging together and accidentally knock another off a ledge to their death. We don't attack other players on our server so this is set to false so players cannot bump, hit, or knock each other around.

motd=Your Server Message Goes here.

Supporting Minecraft

This is a basic How To. You could setup Minecraft server as a service (preferred) which is beyond the scope of this How To.

For now, this How To will require that you log into the Windows machine running Minecraft locally (you should not be logged in with an administrator account!). That user must run the Minecraft executable and stay logged in (or the executable will terminate).

You want to give the same Windows user remote access so you can log into Windows Server remotely. That way if your Minecraft server crashes or need console access you can remote into Windows server, take over Windows user session, then disconnect after doing your maintenance (do not log off!).

Firewall changes

Whatever value you used for server-port in the server.properties file must be configured in the router or firewall to forward those TCP ports to Minecraft Server IP address (whatever IP address Minecraft server is using). If you have one IP address on your server that would be the IP address. If you have a multi-homed server then you will want to configure the server-ip property in server.properties file.

Client access

If you use a port other than the default 25565 for server-port property then clients will need to use that port. When you communicate to people your server IP (or domain name) simply communicate the port.

Example: server-port=61000 in server.properties You have setup DNS for your public IP address pointing to minecraft server to be mc.mydomain.com. You communicate to your clients that they use mc.mydomain.com:61000 for server address.