Cloud Tutorials

Host a Minecraft Server

Written by David Wahlstrom


Minecraft + DreamCompute

The Internet is a wonderful tool with many magical places to visit. One crowd favorite is the world of Minecraft. If you wish to control your own virtual world, then follow along as I help guide you through setting up a Minecraft server on DreamCompute.

Watch out creepers!

Minecraft Server Quick Setup Guide

For those who are impatient, here are the steps required:

  1. Launch Ubuntu-14.04 image (lightspeed).
  2. Add security group rules (TCP 25565).
  3. Install required software (apt-get -y install wget screen openjdk-7-jre-headless)
  4. Download Minecraft Server (wget -O mcserver.jar).
  5. Agree to the EULA (echo ‘eula=true’ > eula.txt).
  6. Run Minecraft Server (java -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -d64 -Xms512M -Xmx2G -jar mcserver.jar).

The best way to level up your productivity at work? Gamify it!

Minecraft Server Walkthrough

For the more patient-minded out there, you will be rewarded with wonderful technical talk about what is going on in each step!

1. Create a Security Group

First, let’s create the security group bits we need. Click on the “Access & Security” section on the left of the dashboard, then click the “Create Security Group” button. We’ll call our security group “minecraft” and give the description of “minecraft”.

2. Manage Rules

Next, click the “Manage Rules” button next to the “minecraft” security group we just created. Finally, click the “Add Rule” button and add an ingress TCP rule allowing port 25565.

Minecraft: security group3. Create a VM

Next, we need to make a VM for our server. We’ll use Ubuntu-14.04, but anything that runs Java should work equally well. After clicking “Launch Instance” in the DreamCompute dashboard, give your server a name, select a boot type, select a flavor (lightspeed has 4GB of RAM which is a good starting point), and choose the Ubuntu-14.04 image.

After these things are set, select the “Security Groups” section and click the plus-sign button next to “minecraft” (the security group we created). Last but not least, click on the “Configuration” section and paste the bash script below.  

One thing worth mentioning here is the “-Xms512M -Xmx2G”.  These tell Java the minimum memory to use (-Xms512M) and the maximum allowed memory (-Xmx2G). If you select a flavor other than lightspeed, these values may not be appropriate.


apt-get update && apt-get -y install wget screen openjdk-7-jre-headless

su - dhc-user -c 'wget -O ~/mcserver.jar'

su - dhc-user -c 'echo 'eula=true' > ~/eula.txt'

su - dhc-user -c 'screen -S mcserver -d -m java -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -d64 -Xms512M -Xmx2G -jar mcserver.jar'

Now click the “Launch” button. In a couple minutes, your server will be online with the Minecraft server software installed and running!

Keep your notes neat and organized while you code — it’s possible! — with these 6 tools.

At this point, you should be able to add your server to your client by clicking “Multiplayer”, then “Add server”, then giving it a name of your choosing and providing the IPv4 address assigned to your VM.2016-01-07-10-21-06_scrot

Now you have a very basic Minecraft server running in the cloud. Minecraft servers have a plethora of customizations (mods) available if you want to trick yours out.

One last thing to note is that you can log in to your server (via ssh) as ubuntu and there should be a file that you can edit to modify the default server settings (things like MOTD and max allowed players).

Ready to build your (Minecraft) castle in the sky? DreamHost can help.

Have Questions?

Let us know in the comments below!

About the author

David Wahlstrom

David Wahlstrom is a Cloud Systems Engineer at DreamHost.


    • Oh ram? Ok. It’s depending on plugins and players. This is a technical question you’re asking, “how much ram”.

  • I have Minecraft installed on my desktop with Ubuntu.
    My nephew has a copy of Minecraft installed in the console XBox One.
    Using a server like this, we can play together?

    • A quick search suggests that the answer to your question is “no”. Microsoft has some preliminary cross-platform features allowing up to 5 players (on any combination of PC/xbox) on the same network to play together. However, the cross platform support is limited and does not work on a centralized server.

  • I have 1 ip WAN(modem) , 1 ip Lan(PC Machine) in my network, and this is machine run “mcserver.jar” with system ubuntu 14. This machine be connected in internet gateway.
    how connect phonne with Minecraft PE in this server?