How to setup a trick'd out CraftBukkit server (1.5.2-R1.0)

Discussion in 'Bukkit Help' started by LHammonds, Jun 15, 2013.

Thread Status:
Not open for further replies.
  1. Offline


    This tutorial will describe how to setup a tricked-out CraftBukkit server running bPermissions, Enjin DonationCraft, Essentials, Factions, Multiverse and various other plugins to customize the server.

    Similar threads I've created in the past: 1.3.1 and 1.2.5

    This documentation is very detailed and covers the step-by-step process so it is quite a lot to read. With that said, it is still just scratching on the surface of all the possible options each plugin offers and there are many more plugins than what is briefly covered here.

    The CraftBukkit server 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.

    • Install and configure a local CraftBukkit server on Windows
    • Install, configure and test plugins
      • bPermissions
      • Enjin DonationCraft
      • Essentials + Essentials Chat
      • Factions + Faction Chat
      • Multiverse
      • etc.
    • Install and configure Ubuntu Server (Linux)
    • Setup automated server maintenance scripts
    • Move CraftBukkit to the Ubuntu Server

    If you find this documentation helpful, feel free to leave a donation of any amount: PayPal for LHammonds


    • Minecraft 1.5.2 ($30 USD) (also works with 1.5.1 client)
    • Ubuntu Server 12.04.2 LTS, 64-bit (free)
    • Java version 1.7u21 (free)
      • Java 7 for Linux x64 = jre-7u21-linux-x64.bin
      • Java 7 for Windows x86 = jre-7u21-windows-i586.exe
      • Java 7 for Windows x64 = jre-7u21-windows-x64.exe
    • CraftBukkit 1.5.2-R1.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.5.2, be sure to only get the plugin version that was made for CB 1.5.2. 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 21 (both 64-bit and 32-bit versions)

    1. Download the latest recommended build (version) of CraftBukkit (1.5.2-R1.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.5.2-R1.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:

    Show Code for startcb.bat (open)

    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
    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
    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
    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
    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
    REM ** This will pause the screen so you can see any error messages after stopping the CraftBukkit server. **

    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 automatically 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 -> Control Panel -> Folder Options -> View tab)
    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 Internet Security 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 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:

    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, your other PCs will need to add 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:

    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. The most important being that anyone can login as your admin user (without a password) and have full control over your server!

    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)

    If you have a particular seed you want the world generated with, add it to the entry below. If you change the seed, you will need to delete the 3 world sub-folders so it can generate new worlds based on that seed. A good seed for testing is kingpunchwood which will spawn you near 2 villages.

    It is also a good idea to set a good description for your server by using the following line:

    motd=A Minecraft Server
    I have mine set to the following:

    motd=CraftBukkit 1.5.2 R1.0 Build 2788
    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.5.2 R1.0 Build 2788) 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. :D Disconnect when you are satisfied that it works good enough.
  2. Great Post, Really useful information. Would like to mention that you can use VM Virtualbox to setup a virtual Linux server on any existing machine for free. You can then port the server to any machine running Virtualbox. Snapshots allow you to save the state of a server and any services and configurations on it much like a video game emulator. Very useful for backups and migrations.
Thread Status:
Not open for further replies.

Share This Page