By: Dewaffler
Welcome to my attempt at a VPS setup guide! I haven't done a lot of guides before, so bare with me, and let's begin!
Hello class! Today we will learn how to setup a Minecraft server on a VPS.
Things you'll need:
Putty (SSH client)
Download: http://www.chiark.greenend.org.uk/~sgta ... nload.html
WinSCP (File transfer)
Download: http://www.winscp.net
A VPS w/ Ubuntu or other Linux distros
Download: Yeah, you can't download a VPS. Try the Seeking and Offering forums
This should be all you need for now. Let's get started!
First, log into your VPS with Putty.
Username: root
Password: YourRootPassword
First, you'll want to install Java. As root, enter:
sudo apt-get install sun-java6-jre
If that works, continue with installation. If you get “E:Couldn't find package sun-java6-jre” follow the steps bellow:
You'll need to edit the sources.list file, so enter this:
vi /etc/apt/sources.list
This will take you to the vi Ubuntu editor. To get started, use arrow keys to move down to a new line. Press “I” to start editing. Move down to your new line, and paste these sources:
(Paste in PuTTy with right-click)
deb http://us.archive.ubuntu.com/ubuntu/ maverick-backports restricted main multiverse universe deb http://archive.canonical.com/ lucid partner deb http://us.archive.ubuntu.com/ubuntu dapper universe multiverse deb-src http://archive.canonical.com/ubuntu lucid partner
To save, press “:” and type “wq” press enter.
Now type:
sudo apt-get update
It will update the sources you just added, it will take a few minutes , so be patient. After this is done, type:
sudo apt-get install sun-java6-jre
You should now be able to install Java. To select “Ok” just press Tab and then press enter.
Java will take a while to install, but after it's done we can get to the Minecraft stuff.
So, you should now have Java installed correctly. To test type
java -version
If it says “java is an unknown command” either you or I have done something wrong.
If it does work, continue on.
Before we install Minecraft, we are going to need a new user. Running a Minecraft server on root is a bad idea, so ssssssstop it!
To make a new user:
sudo adduser UserName
It will then prompt you for information, and automatically setup the rest of it.
Finally, we will need to download the Minecraft server software.
Before you do this though, make sure you create a new Minecraft directory.
If you are still in /root do this:
cd / cd home cd UserName mkdir Minecraft cd Minecraft
In Putty type
wget http://www.minecraft.net/download/minecraft_server.jarThis will download the file you need.
You need to edit the permissions of the file so it is executable. Type:
chmod 777 minecraft_server.jar
You should now be able to run it. For the first run, just type
java -Xms1024M -Xmx1024M -jar minecraft_server.jar
After it says “Done loading”, type “stop”
Here is where WinSCP comes in. Log into your server and navigate to the Minecraft directory.
Click on your server.properties file.
Change this file to suit your needs, and make sure server-port=25565 (If this is the port you want to use)
Alternative: You can also do this directly in PuTTy, just type
vi server.properties
Your server should now be ready for players! To start with the ability to close PuTTy and keep your server up, type “screen” and then run
java -Xms1024M -Xmx1024M -jar minecraft_server.jar
To run your server, and then close PuTTy, we need a package called "Screen"
sudo apt-get install screen
This will install Screen for your use. To first use it, just type "screen" and it should start a new session that will stick even when you quit Putty, just type in the command to start the server after typing screen.
After closing PuTTy, to get back on the screen type
screen -r
A way to increase server performance is to run the server command with some extra commands and such.
java -server -Xmx1024M -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:+CMSIncrementalPacing -XX:ParallelGCThreads=2 -XX:+AggressiveOpts -jar minecraft_server.jar nogui
Your server should run happily ever after, or not. If it hasn't leave a reply below and I will try and help you with the problem.
This is my first guide, and I probably didn't do the best on it. Feedback is appreciated
Also, if you notice I missed something, PM or reply and I will fix it.

Help
















