Introduction: How To: Personal Minecraft Server in Custom Block Case
I've been wanting to build my own Minecraft server for quite awhile now, and thought it would be extra "cool" to build one in the style of a grass block from the game.
Here were some of the goals for the project:
- Small form factor
- Low energy consumption (since it will be running 24/7)
- Allow 4-8 players at one time
- Very few cables running off of it (preferably only 1 for power)
What is a Minecraft server? For those who don't know, a Minecraft server allows players to play together online or via a local area network. This is a dedicated Minecraft server, so it will always be running and connected to the internet (ideally), with its only purpose being hosting the Minecraft world. Players can log into the server from any location or computer as long as the connection speed is fast enough. The server isn't actually loading models or playing the game, it is only responsible for sending information about the world to the connected players and updating the world as players manipulate it. For a server to run smoothly, internet speed and components like the CPU and RAM (size, not speed) are important factors to consider.
Step 1: Pick Out the Parts.
For this build I used the following parts:
Processor: AMD Athlon 5150 APU (4 cores, 1.6ghz) with stock CPU fan. This processor runs 25W at load, so negligible hit to power bill. Minecraft is supposedly capable of taking advantage of multiple threads in some ways, but largely it seems to be single threaded for now. The 4 cores won't get used to their potential other than with Java garbage collection. I would, however, expect Minecraft (and most other games) to continue to move in a more parallel direction in the future. The integrated GPU is massive overkill here, as it basically won't be used...but it was essentially free, and I just like the idea of it. AMD also makes a 2.0ghz model of this chip for like $20 more...if you can get it on sale then do that instead.
RAM: 4GB(2 x 2GB) Crucial 1600 Mhz. The processor I chose is 1.6ghz, and I'm just a fan of matching frequencies...1333 would've done just fine here. (Technically the faster RAM also helps the iGPU I'm not using) I bought 2 sticks of 2GB on purpose thinking the chip/mobo support dual channel, but alas they do not...so buyer beware...just buy the cheapest single stick of RAM and then double it later if you need more.
SSD: 64GB ADATA, I'm all about the solid state drives, and a slow drive technically could bottleneck a server if the internet is fast enough (mine isn't).
MOBO: ASUS Mini-ITX (Also needed mounting screws and spacers)
PSU: Mini-Box pico-PSU-160-XT (160 watt), Fits in case wonderfully, but does require external power brick. Probably major overkill as I expect the system to never break 30W total, they sell a lower wattage one that would probably work fine, and allow for a smaller/cheaper power adapter.
WiFi/Bluetooth: Intel 3160 Dual Band Wireless AC + Bluetooth Mini PCIe card plus a Mini PCIe to PCIe adapter and Intel WiFi antenna, this ended up being a bit of a headache...but it works wonderfully now.
Case Fan: 40mm Noctua with low noise adapter
Power Adapter: 12v/16A AC-DC
Power Button: Green LED ring button from SparkFun
Case: 8x8x8in acrylic ballot box from Amazon
4 Rubber Legs for bottom
Vinyl: Fedex printed white vinyl with 16 bit grass block texture
System Benchmark: The only benchmark I've run on the system so far is the Windows Experience Index, and the results were as follows: Processor: 5.3, Memory(RAM): 5.9, Graphics: 4.6, Gaming Graphics: 6.1, Primary hard disk: 8.1
Step 2: Assemble the Core Components and Make Sure They Work.
I won't go into the specifics of basic PC assembly here, especially because it's fairly straightforward with these parts. The CPU comes with thermal paste pre-applied, and the CPU fan installation is simpler than most. The important thing here is to get everything hooked up and make sure the parts power on and show the BIOS, that way you can RMA any defective parts early on.
Refer to your motherboard's manual to make sure everything is hooked up where it needs to be. Just as an extra precaution try to work in a static free environment, or ground yourself prior to touching the parts directly.
Step 3: Mount the Motherboard.
This step was fairly tricky, and I sort of messed it up. I attached the metal spacers to the bottom of the motherboard, and then placed it inside of the ballot box to mark out where I needed to drill. Unfortunately when I actually drilled, the spacing shifted a small amount and DVI connector was a fraction of an inch too far forward. Instead of re-drilling I just shaved that fraction of an inch out of the inside of the box with my Dremel. I would recommend starting with one of the back corner holes first, screwing the motherboard in from there, and then drill the other three holes once you can see exactly where the metal spacers are lined up.
WARNING: Drilling into acrylic can be tricky, always start with a small bit and then slowly work your way up to larger bits so that the acrylic doesn't crack.
Step 4: Add Power Button.
Here I had to start the drilling with a small bit, work my way up the largest bit I had, and then get the Dremel out and slowly increase the size of the hole by shaving the inside in circular motions.
If you look at the motherboard manual it will show you where the front panel connectors are (system panel connectors), and you'll wire the power switch pins (PWR and Ground) from the motherboard to the button switch pins. Basically, anytime the button is pressed the PWR and Ground pins are being connected. If you want to test this logic out just try turning your computer on by using a flathead screwdriver to connect the pins.
Next, hook up +5V and GND for the LED (usually located right next to the ON/OFF pins, sometimes referred to as PLED+ and PLED-). For this particular button, I soldered 4 wires onto it and then just used some heat shrink wrap to cover them. I then plugged these wires into an old front panel adapter cord I had lying around.
NOTE: Refer to the data sheet for whatever button you choose, and just match the pins up with the motherboard manual's description.
Step 5: Add Case Fan (optional).
This part I probably didn't need, being that the CPU is only 25W, but I figured better safe than sorry. Again, mounting was kind of a pain, and then I just drilled a series of holes in the fan blade area. I've always used Noctua fans in builds because they're super quiet and also generally come with low noise adapters.
In retrospect, I probably would've instead just cut out the fan blade area entirely, and then just covered the small square area with a spray painted mesh grill...I still may go back and do this.
Step 6: Attach Rubber Feet.
Pretty self explanatory, just stick them onto the bottom. Not the sides or the top...but the bottom.
Step 7: Finish Basic Assembly and Organization.
All that is left in terms of case modifications is to drill one more hole for the power supply/power adapter hookup. Being that this is the only cord external to the case there is no cluster of cables to manage...just plug it in.
I also had to jump through a few hoops for the WiFi/Bluetooth method I chose. For one, I needed a Mini PCIe to PCIe adapter that supported bluetooth. Like most PCIe wifi adapters they have the antennas mounted to be outside of the case. To fix this I had to desolder and re-solder the antenna mounts so that they were turned inside, and then use the more flexible Intel WiFi antenna.
If you decide to go the PCIe wifi route, you'll have a hard time finding a card that will fit inside the box with the standard antennas and mounts. An easy alternative is just to cut one more hole and run ethernet through it, I'm just stubborn and hate cords.
Having said that, I didn't do anything too fancy for internal cable management...basically just zip ties, heat shrink wrap, and 2 sided tape. It was good enough to get the job done.
Step 8: Install Operating System and Test Minecraft Server.
I started out using Ubuntu 14.04 LTS to run the server, but have since migrated to Windows 8. Whichever OS you choose, just google "how to setup minecraft server in (OS of choice)" and you'll be presented with a plethora of help here.
A few things I noticed that helped server performance:
- Setting the server properties file to max render distance at 16
- Update Java to the newest 64-bit version
- If you're using Linux it's also helpful to have SSH and Screen installed, so that you can SSH into the server and attach to the Minecraft process if you need to do any server maintenance.
- If you're using Windows, the remote desktop connection feature comes in handy here, I just enabled remote desktop within my local network, and it works flawlessly. Another thing you'll probably want to do is disable any sleep or hibernate settings, and do manual updates to prevent unplanned restarts (another option is to create a batch file for starting minecraft and run it on startup).
NOTE: The exact command I use to run the minecraft exe is as follows:
java -server -Xms2048M -Xmx2048M -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:ParallelGCThreads=2 -jar ./minecraft_server.1.8.exe nogui
Breaking this down:
-server : this flag forces Java to use the more optimized server JVM
-Xms2048M : Occasionally prevents the JVM from needing to resize its memory allocation, 2048M = 2GB of RAM allocation
-Xmx2048M : Specifically allocates 2 gigs of RAM to Minecraft
-XX:+UseConcMarkSweepGC -XX:+UseParNewGC : Uses the concurrent mark sweep collector and is parallel, this is said to be a superior garbage collector for Minecraft.
-XX:ParallelGCThreads=2 : Sets max number of threads garbage collection can use
nogui : prevents the gui window for the server from opening, instead only uses command line (or terminal)
Step 9: Apply Vinyl.
This step was terrifying, as I have the world's most unsteady hands and only 2 of them. The method that ended up working best for me was to focus on getting the corners squared up, and just allowing small air bubbles to form initially. I then went back and poked very small holes in the air bubbles and pushed the air out. By the time the air pocket was gone the hole wasn't even really noticeable. There are better ways to do this, and I would recommend googling them or maybe finding another instructable explaining it in more detail.
The graphics I used for the 8x8in vinyl I've included above.
Step 10: Profit.
I've had the server up and running for a couple of months now and it's working fine for the most part. There were some wifi instability issues in Ubuntu that I'm attributing to a driver issue for the Intel chip I used. As a result, I've switched over to Windows 8 and so far it's been running without issues. Plus, being able to remote desktop into it has come in handy and works really well. As for heat and noise, the system produces neither. I'd say it would be safe to forego the case fan altogether since the AMD chip runs super cool and the case is fairly spacious.
Feel free to message with any questions you may have about the build. Thanks for checking it out!
We have a be nice policy.
Please be positive and constructive.