Skip to content

Instantly share code, notes, and snippets.

@superzazu
Last active May 20, 2019 11:49
Show Gist options
  • Save superzazu/6199aade598e167387d39dcca7ec3170 to your computer and use it in GitHub Desktop.
Save superzazu/6199aade598e167387d39dcca7ec3170 to your computer and use it in GitHub Desktop.
Debian/Ubuntu installer for Minecraft (Bedrock edition)
#!/usr/bin/env bash
# bedinst.sh: Minecraft bedrock server installer for Ubuntu
# example: $ bash bedinst.sh 1.11.2.1 output/
# see https://www.minecraft.net/en-us/download/server/bedrock/
if [[ $# -ne 2 ]]; then
echo "usage: $0 version output_folder" >&2
echo "usage: example: $0 1.11.2.1 output/"
exit 1
fi
version="$1"
output_folder="$2"
if ! [ -x "$(command -v wget)" ]; then
echo "error: wget is not installed" >&2
exit 1
fi
if ! [ -x "$(command -v unzip)" ]; then
echo "error: unzip is not installed" >&2
exit 1
fi
file="bedrock-server-$version.zip"
url="https://minecraft.azureedge.net/bin-linux/$file"
mkdir -p "$output_folder"
wget -O "$output_folder/$file" "$url"
unzip -n "$output_folder/$file" -d "$output_folder"
echo "SUCCESS: you can now launch server with:"
echo "$ cd $output_folder && LD_LIBRARY_PATH=. ./bedrock_server"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment