Your SlideShare is downloading. ×
Your Own Minecraft Server on a Linode VPS
Upcoming SlideShare
Loading in...5

Thanks for flagging this SlideShare!

Oops! An error has occurred.

Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Your Own Minecraft Server on a Linode VPS


Published on

Published in: Technology
  • Be the first to comment

  • Be the first to like this

No Downloads
Total Views
On Slideshare
From Embeds
Number of Embeds
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

No notes for slide


  • 1. Your Own Minecraft Server on a Linode VPS#Danols Minecraft Server propertiesallow-nether=truelevel-name=worldenable-query=falseallow-flight=falseserver-port=25565level-type=DEFAULTenable-rcon=falselevel-seed=Artomix #ht tp:// must surviveAutomatic StartupCompared that what is posted on the Minecraft Wiki the below is a simple startup script usingDebians/Ubuntus start-stop-deamon utility, it does not have the update server, or run filesystem in memory option; in my opinion Java+Linux do a good job system caching ondemand and any speeds from running in memoryThe server is run under user minecraft-server and group daemon to increase security - thisaccount and group is created as follows:# useradd --home-dir /usr/local/minecraft-server --no-create-home -gdaemon --shell /bin/false minecraft-server# groupadd daemonCreate the startup script as follows# cd /etc/init.d/# touch minecraft-server
  • 2. # chmod +x minecraft-serverPaste the following code into the script and make sure to modify the DAEMON_ARGS settingto reflect your memory allocation.#!/bin/bash### BEGIN INIT INFO# Provides: minecraft_server# Required-Start: $local_fs $remote_fs $network# Required-Stop: $local_fs $remote_fs $network# Default-Start: 2 3 4 5# Default-Stop: 0 1 6# Description: Minecraft server debian init script.# Author: Daniel Sokolowski#### END INIT INFO# You can use this as a template or symbolic link it into`/etc/init.d` on Debian system# PATH should only include /usr/* if it runs after the mountnfs.shscriptPATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/local/binDESC="Minecraft Server"NAME=minecraft_server.jarSCREENNAME=minecraft-server # the session screen game givenDAEMON="/usr/bin/screen"DAEMONUSER=minecraft-serverDAEMONGROUP=daemon# the -Xincgc options enable incremental garbage collector whichslows# execution but makes more memory efficient.# -Xmx1024M is the recommended minimumAs a last resort, sleep for some time.## Function that stops the daemon/service#do_stop()# Return# 0 if daemon has been stopped
  • 3. # 1 if daemon was already stopped# 2 if daemon could not be stopped# other if a failure occurredstart-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile$PIDFILERETVAL="$?"[ "$RETVAL" = 2 ] && return 2# Wait for children to finish too if this is a daemon that forks# and if the daemon is only ever run from this initscript.# If the above conditions are not satisfied then add some other code# that waits for the process to drop all resources that could be# needed by services started subsequently. A last resort is to# sleep for some time.start-stop-daemon --stop --quiet --oknodo --retry=0/30/KILL/5 --exec$DAEMON[ "$?" = 2 ] && return 2# Many daemons dont delete their pidfiles when they exit.rm -f $PIDFILEsleep 5sreturn "$RETVAL"## Function that sends a SIGHUP to the daemon/service#do_reload()## If the daemon can reload its configuration without
  • 4. # restarting (for example, when it is sent a SIGHUP),# then implement that here.#start-stop-daemon --stop --signal 1 --quiet --pidfile $PIDFILE --name $NAMEreturn 0case "$1" inherobrine, factions