Creating a Start.sh file
A start.sh 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.jarYou 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 start.sh file and start editing it. Execute$ vim start.sh
to create a new start.sh file. Now pressi
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 editXms1024M -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 changeSpigot.jar
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 typewq!
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:./start.sh
to start your minecraft server!
Was this answer helpful?
Screen allows you to crate extra 'screens' which you can then execute processes in. You can...
Download PuTTY Download PuTTY from the website. After you download PuTTY, launch the...
Mac OS X has a built-in SSH client called Terminal which can be used to connect to remote...
A Secure Shell (SSH) client allows you to connect to your Virtual private Server (VPS) and...
Powered by WHMCompleteSolution