This guide has been written hundreds of times, so here is one more. The aim of this guide is to be quick, painless, and secure. I'll be using a Digital Ocean - 512MB RAM - 20 GB SSD - 1TB Transfer - Ubuntu 13.10 64-bit server for this guide, which is at a convient price of $5/month!
What I assume about you
- You know how to connect/access your server via SSH. If you're on Windows, PuTTY is standard. If you're on Mac, your "Terminal" app can use SSH command.
- You have a server running Ubuntu 12.04 or later.
- You don't have a firewall/port blocker installed.
- You own a legal copy of Minecraft!
Creating an additional user
Once we're logged into our server, we need to create a new user to separate Minecraft from the root user. This is for organization and security!
adduser creeperInput a password different from root's. You can skip over the extra info.
chmod o+rw /dev/pts/0This allows our new user use of
Install Java (and screen if needed). Minecraft needs the Java.
apt-get install screen openjdk-7-jre
Commence Minecraft Setup
Switch to our new user, make a folder for all our Minecraft servers to be, and download the Minecraft server executable.
su creeperSwitch user from root to creeper.
cdShortcut to /home/creeper directory.
mkdir minecraftMake a minecraft folder.
cd minecraftChange directory to minecraft.
mkdir vanillaMake directory for server files.
cd vanillaChange directory to vanilla.
Find and copy the Minecraft server .jar URL from http://minecraft.net/download.
wget URL HERE Download the server .jar with this command.
Create a launch script
We have our server downloaded, we just need a small script to launch it.
nano launch.shStart editing a new file.
java -Xmx512M -Xms512M -jar minecraft_server.X.X.X.jar noguiEnter this into our launch.sh. Replace the X's with the version number.
- Press Control+X to save the file and exit
chmod +x launch.shMake launch.sh an executable.
If you have a server with more RAM, adjust the -Xmx and -Xms parameters.
Launching the server
We want the server to be running, even when we're not in the SSH session. To do this, we'll need to start a
screen -S MCStart our screen session and name it MC.
./launch.shLaunch our Minecraft server for the first time! This will add many files to our server folder.
- Confirm the server is running by connecting to it with your Minecraft client.
Congrats. You have a Minecraft server that rocks.
Protip: To leave your
screen session, press Control + A then D. To get back to your Minecraft console, use
screen -r MC to attatch to the session.
Tweaking the server settings
You have a shiny new server! But you want to change the settings a little. (Think MOTD, server name, world name, etc.) Close your server using the safe
stop-server command inside the Minecraft console.
Once the server is offline, edit the server properties file:
The changes your make are yours to make, not mine. Google "Minecraft server.properties" to find out what each setting does.
Add some admin to our server. Enter admin usernames here:
nano op.txt (Newline for every username)
Start up our server again to test the changes. Bingo bango bongo, all done. You're now the proud owner of a vanilla Minecraft server! What you do with it is up to you.
- 512MB of RAM on the server will be sufficient for 5-8 players. This might change as the game is updated for better or worse.
- I suggest investing extra time learning about Bukkit for your Minecraft server. I may do an addition post on creating a useful Bukkit server.
- A Digital Ocean server droplet was used to test this guide.
If you're looking for a great server provider, Digital Ocean is where it's at. If you found this guide useful and decide to use Digital Ocean as your server provider, I'd appreciate your support by using this DO referral link:
When you use this link and bill $10, I get $10 dollars towards my server costs! I'd really appreciate you and it would help me progress my goal of writing more fun server guides in my spare time while funding my own server projects! ♥