Skip to content

Instantly share code, notes, and snippets.

@DrewWeth
Last active January 18, 2020 01:26
Show Gist options
  • Save DrewWeth/3f7f392043a4781783afadb69e67f06f to your computer and use it in GitHub Desktop.
Save DrewWeth/3f7f392043a4781783afadb69e67f06f to your computer and use it in GitHub Desktop.
Starting a Minecraft Server
#!/bin/sh
# Based on: https://gist.github.com/niksudan/a3f90651f35203815f245d5d09ac6646
# This script uses tmux instead of screen because of prefer it.
# Update package manager and download java development kit.
apt-get update && apt-get install default-jdk
# Downloads Minecraft server 1.15.1
wget -O minecraft_server.jar https://launcher.mojang.com/v1/objects/4d1826eebac84847c71a77f9349cc22afd0cf0a1/server.jar
# You can detach tmux and keep your server running in the background by typing `Ctrl+b` then `d`.
# Your server will run in the background and can retrieved with the command `tmux attach`.
# Tmux is used because it will keep your program running when you sign off the machine.
apt-get install tmux
# This agrees to the end user license agreement here, so make sure you agree before you use this:
echo "eula=true" > eula.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment