This tutorial will describe how to setup a tricked-out CraftBukkit server. It will initially be created on a Windows 7 PC and then moved to an Ubuntu Server where it will remain as a production server running almost completely automated. Goals: Done - Install and configure a local CraftBukkit server on Windows Done - Install, configure and test plugins Done - Move CraftBukkit to an Ubuntu Server (Linux) Done - Setup server maintenance scripts Donations If you have the means and will to donate, please support Mojang 1st by buying a copy of Minecraft if you have not done so already, then to the authors of your favorite plugins. If by then you still want to send some my way, I would be grateful. Here is my link: PayPal for LHammonds Prerequisites Minecraft 1.3.1 ($30 USD) (also works with 1.3.2 client) Ubuntu Server 12.04.1 LTS, 64-bit (free) Javaversion 1.7u7 (free) Java 7 for Linux x64 = jre-7u7-linux-x64.bin Java 7 for Windows x86 = jre-7u7-windows-i586.exe Java 7 for Windows x64 = jre-7u7-windows-x64.exe CraftBukkit 1.3.1-R2.0 (free) CraftBukkit plugins (free) For CraftBukkit servers, I like to select plugins that do not have any client-side requirements. Simply install on the server and everyone immediately enjoys the new content added to the server. I will describe how to 1st setup the server on Windows and then transfer it to Ubuntu, however, all of this can be done starting with Ubuntu but I find it easier starting off with a pre-built installation (since my desktop is Windows) Also note that whenever I say "download the latest version" of a plugin, I am talking about the latest one for the specific CraftBukkit (CB) version you are using. If you are using CB 1.3.1, be sure to only get the plugin version that was made for CB 1.3.1. Newer versions of plugins might work but they also might not. Same goes for the other way around. If a plugin was made for an earlier version of CB, it may or may not work with the newer version of CB. But no matter what, always check the server.log for errors and make sure the plugin works in the game before claiming success and trying to install another. Several plugins in this tutorial were made for much older versions of CraftBukkit but through testing, have been verified to still work with newer versions. Install a local CraftBukkit server on Windows These steps were documented on a Windows 7, 64-bit PC with Java 7 Update 7 (both 64-bit and 32-bit versions) 1. Download the latest recommended build (version) of CraftBukkit (1.3.1-R2.0 at the time of this writing) 2. Make a folder on your computer. Example: E:\CraftBukkit 3. Copy the CraftBukkit jar file into this folder. Example: E:\CraftBukkit\craftbukkit-1.3.1-R2.0.jar 4. Rename the jar file to "craftbukkit.jar" to keep things simple. 5. Create a text file called E:\CraftBukkit\startcb.txt and copy the following text into it: Code: @ECHO OFF SET RAM2USE=2048 CD /D E:\CraftBukkit REM ** Look for a version of Java 7 that matches the OS (32-bit for 32-bit, 64-bit for 64-bit) ** IF EXIST "%ProgramFiles%\Java\jre7\bin\java.exe" GOTO JAVA7DEFAULT REM ** Look for 32-bit version of Java 7 on 64-bit OS ** IF EXIST "%ProgramFiles(x86)%\Java\jre7\bin\java.exe" GOTO JAVA732BIT REM ** Look for a version of Java 6 that matches the OS (32-bit for 32-bit, 64-bit for 64-bit) ** IF EXIST "%ProgramFiles%\Java\jre6\bin\java.exe" GOTO JAVA6DEFAULT REM ** Look for 32-bit version of Java 6 on 64-bit OS ** IF EXIST "%ProgramFiles(x86)%\Java\jre6\bin\java.exe" GOTO JAVA632BIT :JAVA7DEFAULT REM ** This will execute if run on a 32-bit OS with a 32-bit version of Java 7 ** REM ** This will execute if run on a 64-bit OS with a 64-bit version of Java 7 ** "%ProgramFiles%\Java\jre7\bin\java.exe" -Xmx%RAM2USE%M -Xms%RAM2USE%M -jar craftbukkit.jar GOTO DONE :JAVA732BIT REM ** This will execute if run on a 64-bit OS with only a 32-bit version of Java 7 ** "%ProgramFiles(x86)%\Java\jre7\bin\java.exe" -Xmx%RAM2USE%M -Xms%RAM2USE%M -jar craftbukkit.jar GOTO DONE :JAVA6DEFAULT REM ** This will execute if run on a 32-bit OS with a 32-bit version of Java 6 ** REM ** This will execute if run on a 64-bit OS with a 64-bit version of Java 6 ** "%ProgramFiles%\Java\jre6\bin\java.exe" -Xmx%RAM2USE%M -Xms%RAM2USE%M -jar craftbukkit.jar GOTO DONE :JAVA632BIT REM ** This will execute if run on a 64-bit OS with only a 32-bit version of Java 6 ** "%ProgramFiles(x86)%\Java\jre6\bin\java.exe" -Xmx%RAM2USE%M -Xms%RAM2USE%M -jar craftbukkit.jar GOTO DONE :DONE REM ** This will pause the screen so you can see any error messages after stopping the CraftBukkit server. ** PAUSE NOTE #1: You might need to adjust the amount of memory used on the 2nd line (1024 = 1 GB RAM minimum). NOTE #2: You might need to adjust the server folder on the 3rd line to reflect your system. For this example, I have it installed on drive E: NOTE #3: This batch script will choose the newer Java installed as well as picking the 64-bit version if present. 6. Save and close the text file. Rename the file to "startcb.bat" (you might need to disable hidden filename extensions to make this work) 7. Double-click "startcb.bat" and if things go well, CraftBukkit will start in black DOS window and go through the initial startup and generate the initial files and sub-folders. Depending on your security, you may need to give permission to let the processes run (e.g. Comodo will ask about 4 questions before letting it run) 8. Once the server has finished loading, type "stop" at the server console to gracefully stop CraftBukkit. Get used to what it normally says when shutting down properly...it can be handy to know. Then press any key to close the window (this is that "pause" command at the end of the script) Configure the CraftBukkit Server At this point, we now have a default CraftBukkit server. Let's configure some of the basic settings. (Make sure the server is not running) Use a text editor to edit Server.Properties Notice the following line: Code: server-port=25565 This is the default port the server will use to communicate to Minecraft clients. Make sure your firewall will allow traffic on this port. If you change this port to anything else, your Minecraft clients will need to add the port as part of the server IP when defining your server. Example: If you change it to 25500 and your IP is 192.168.1.100, your other PCs will need to add 192.168.1.100:25500 as the server address. If you plan to host this server on a private network which does not have or want Internet access, you need to change the following line from true to false: Code: online-mode=true The above is great for LAN parties and homes where young kids can play on local servers without being exposed to the big bad Internet...however, if you plan to run a public Internet server, it is a bad idea to by-pass the login authentication for many reasons. If you know how many people will be connecting to the server, be sure to set that amount on the following line (typically, it is a good idea to set it one higher than your expected maximum) Code: max-players=20 It is also a good idea to set a good description for your server by using the following line: Code: motd=A Minecraft Server I have mine set to the following: Code: motd=CraftBukkit 1.3.1 R2.0 Build 2340 Save and close Server.Properties Double-Click startcb.bat to start the CraftBukkit server with your new settings. Once it loads up, give yourself admin rights on the server by typing op YourMinecraftName at the server console. This adds your name to the following file: E:\CraftBukkit\ops.txt Start your Minecraft client and click Multiplayer from the main screen. Click the "Add server" button. Give the server a name and type in the IP address of the server (if on your PC, simply use "localhost" or something like "localhost:25500" if using a custom port number and then click Done. If the client sees the server, you should see your server with your custom description (e.g. CraftBukkit 1.3.1 R2.0 Build 2340) as well as the amount of currently logged in players and maximum amount of players (e.g. 0/20). If you get connected, see if you can survive the 1st night. Disconnect when you are satisfied that it works good enough.