Installing a Minecraft Server on Your VPS
For this guide, we'll be going over how to install a Minecraft CraftBukkit server on a CentOS 5 32-bit operating system. This guide assumes that your server is already up and running and has no modifications done to it. Make sure to read through the full guide before attempting the install.
First, Java will need to be installed to get it to work.
1. SFTP into your server using an FTP client such as FileZilla. We have a separate guide here for that: https://www.beastnode.com/portal/knowledgebase/92/Accessing-your-VPS-Server-using-SFTP-Secure-FTP.html
2. Download the latest version of Java JRE or JDK (either works - not the 'Server JRE' option) from here: http://www.oracle.com/technetwork/java/javase/downloads/index.html
Make sure you grab the "Linux x86" version in the .rpm format.
3. Upload the file to any directory in your server via the SFTP client.
4. After the file is uploaded, run this command from SSH (replace the filename as necessary):
rpm -Uvh filenameofjavainstaller.rpm
5. Type out "java -version" to verify that it is correctly installed.
Now we can install Minecraft.
1. SFTP into your server again.
2. Download the vanilla Minecraft server JAR here: https://minecraft.net/download (make sure to download the multiplayer server .jar file)
Or upload any of your own server JAR files (such as CraftBukkit, Spigot, etc).
3. Upload it to your server. Recommended directory would be in a (manually created) empty folder in the /home directory.
4. In most cases, you can simply start the server up with the following command via SSH:
java -Xms512M -Xmx512M -jar server.jar
However, if you close the SSH window/session, it kills the server, so we need to take an extra step:
4a. In SSH, type in:
screen -S minecraft
("minecraft" can be anything you want to identify the "screen" session)
4b. Now you can run the "java -Xms512M -Xmx512M -jar server.jar" command where the "512" values in the example will be how much memory you want to allocate to the server - it must be less than the current free memory your VPS has (check using the "free -m" command).
5. Now that your server is running, you want to put it into the 'background' (or detach it) by doing the following key combinations:
6. You should now be at your main SSH window with your Minecraft server running in the background. You can now close your SSH window. To return to your Minecraft server session at any time, type the following into SSH:
It will bring you back to the Minecraft server console, which you can stop using the "stop" command.
RUNNING MULTIPLE INSTANCES OF MINECRAFT
You can also run multiple instances of Minecraft on a single VPS as long as you don't over allocate your VPS' RAM to the Minecraft instances.
As per the steps above regarding the screen session, you can run a single Minecraft server in multiple screen sessions.
After you already have one Minecraft server running per the steps above, follow these steps to add additional running Minecraft instances:
1. In SSH:
screen -S instancename
("instancename" can be any name you want - as long as it isn't the same as any other screen sessions)
2. Follow the steps from the INSTALLING MINECRAFT section above to start up the Minecraft instance (it is recommended that you do this in a separate folder from any other MC instances to prevent conflicts). You will find that it will likely stop running on its own while starting up (due to port conflicts).
3. At this point, you will now want to edit the server.properties file (that should have been automatically generated when you started up the server) for the current server instance you are setting up and either set it to run on a different port or IP (if you purchased additional IPs for your VPS) from your other Minecraft instances.
4. Once that is done, try to start up the MC instance again:
java -Xms512M -Xmx512M -jar server.jar
Was this answer helpful?
Updated guide here:...
In order to change the operating system on your VPS or reformat it, you will need to login to the...
The hostname is used to identify your VPS (or dedicated server) during the ordering process. It...
Install MySQL on your Linux Server This guide is based on a standard install of CentOS - other...
Installing Minecraft: Pocket Edition servers has never been easier with the advent of Nukkit (the...