Last active
January 18, 2020 01:26
-
-
Save DrewWeth/3f7f392043a4781783afadb69e67f06f to your computer and use it in GitHub Desktop.
Starting a Minecraft Server
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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