Creating a file

A file allows you to easily start your minecraft server from a terminal prompt, without the hastle of remembering long java commands and arguments. We create a small script that you can execute to start your minecraft server. Its a same concept as a start.command on a mac or a start.bat on windows. So instead of running somethign similar to this whenever you want to start your server:
$ java -Xms4024M -Xmx4048M -jar spigot.jar 
You can simply run:
$ ./

and your server will start and display console. Make sure you are starting your server in a screen. Instructions for doing so are avalaible on our Basic Screen Usage guide. 

Creating and running a start file

Note: I will be showing instructions for doing this in the console but this could also be done from a ftp client. However the script must be started from the VPS's terminal.

First Create the file and start editing it. Execute 

$ vim

to create a new file. Now press 


to go into editing mode and copy and paste this sample code into your start file. Now move your cusor using the arrow leys and edit

Xms1024M -Xmx4096M

to your liking. Remember that Xms is the amount of ram that the server will start with, while Xmx is maximum that can be allocated to the server. We reccomend in most circumstances you set Xmx to your VPS's ram, minus around 1GB to give the system some breathing room. Xms can be set to around 1/4 of Xmx. You may also have to change


to the name of your minecraft servers java file. For instance, craftbukkit.jar or minecraftServer.jar. Once you have edited the file to your liking. Press Escape. Then press : (colon). The cursor should reappear at the lower left corner of the screen beside a colon prompt. Then type


and press enter to save and quit your file. Now either create a new screen session or reattach a new one. To start the server navigate to the servers root directory and execute:


to start your minecraft server!

Was this answer helpful?

 Print this Article

Also Read

Basic Screen Usage

Screen allows you to crate extra 'screens' which you can then execute processes in. You can...

How to SSH on Windows using PuTTy

Download PuTTY Download PuTTY from the website. After you download PuTTY, launch the...

How to SSH on Mac

Mac OS X has a built-in SSH client called Terminal which can be used to connect to remote...

SSH Tools

A Secure Shell (SSH) client allows you to connect to your Virtual private Server (VPS) and...

Powered by WHMCompleteSolution