Skip to content

Instantly share code, notes, and snippets.

@Sonictherocketman
Last active March 1, 2016 07:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Sonictherocketman/221c6fad8ea76657d2b2 to your computer and use it in GitHub Desktop.
Save Sonictherocketman/221c6fad8ea76657d2b2 to your computer and use it in GitHub Desktop.
Set up a Minecraft server on a blank Linode instance.
#! /bin/bash
# Set up a Minecraft server on a blank Linode instance.
# Usage:
# $ wget https://gist.githubusercontent.com/Sonictherocketman/221c6fad8ea76657d2b2/raw/1b565e1b5ed8b8b38efbf6d987da8986666857b8/install_mc_server.sh
# $ sh install_mc_server <version>
#
# author: Brian Schrader
# since: 2016-02-29
set -e
VERSION=$1
# Get everything setup
sudo apt-get install default-jre
mkdir mc-server && cd mc-server
wget "https://s3.amazonaws.com/Minecraft.Download/versions/$VERSION/minecraft_server.$VERSION.jar"
# Initial Startup
java -Xmx1024M -Xms1024M -jar minecraft_server.jar nogui
# Accept the license agreement
cat eula.txt | sed 's/false/true/g' > eula.txt
# Start up the server for reals
java -Xmx1024M -Xms1024M -jar minecraft_server.jar nogui
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment