VPS FAQ and Tutorials

How to create a Minecraft server with Debian 7 ?

Install Java and Nano


First, execute these commands to install Java and Nano :

apt-get update && apt-get upgrade
apt-get install default-jdk screen
apt-get install nano

You may have to confirm, insert O to confirm.

Install Minecraft Server


Create a new user for your server :

adduser minecraft

Then define a password, your can ignore all the rest.

Go in your minecraft user's folder:

cd /home/minecraft

Download the minecraft server version you want to install (here MC 1.9.2) :

wget https://s3.amazonaws.com/Minecraft.Download/versions/1.9.2/minecraft_server.1.9.2.jar

Rename your server minecraft_server.jar :

mv minecraft_server.1.9.2.jar minecraft_server.jar

Create a eula.txt file :

touch eula.txt && echo "eula=true" >> eula.txt

Creating a minecraft start script


Download the script :

wget -O /etc/init.d/minecraft https://www.omgserv.com/bundles/omgservwebsite/files/minecraft.sh

Now create a Backup folder :

mkdir /home/minecraft/backups

Execute these commands to make this script runnable.

chmod +x /etc/init.d/minecraft
chown minecraft:minecraft /etc/init.d/minecraft
chown -R minecraft:minecraft /home/minecraft/


Then this one to run your server when the VPS boot :

update-rc.d minecraft defaults

Editing the script :


You can edit the script with this command :

nano /etc/init.d/minecraft

Preview of the editable part :

#Settings
SERVICE='minecraft_server.jar'
USERNAME="minecraft"
MCPATH='/home/minecraft/'
INVOCATION='java -Xmx2048M -Xms2048M -jar minecraft_server.jar nogui'
BACKUPPATH='/home/minecraft/backups/'

Appuyez sur les touches ctrl+x puis o puis Entrée pour valider la modification du fichier.

You can custom your script by editing these values :
SERVICE= The name of the server .jar file.
USERNAME= The name of the user which is running the server (let minecraft by default)
MCPATH= File path for the server .jar file.
INVOCATION= Define the Java arguments (Xmx = Max RAM and Xms = Server Start RAM)
BACKUPPATH= Backup folder path.

Server Commands



Start the server

service minecraft start

Stop the server

service minecraft stop

Restart the server

service minecraft restart

Update the server

service minecraft update

Run a backup

service minecraft backup

Get server status

service minecraft status