Glowstone is an open-source replacement for CraftBukkit, Spigot, and Paper.
Similar to CraftBukkit and it's derivatives, it only requires a single port. Other plugins may require more ports.
| Port | default |
|---|---|
| Game | 25565 |
| Name | Tag |
|---|---|
| Java 8 | ghcr.io/ptero-eggs/yolks:java_8 |
| Java 11 | ghcr.io/ptero-eggs/yolks:java_11 |
| Java 16 | ghcr.io/ptero-eggs/yolks:java_16 |
| Java 17 | ghcr.io/ptero-eggs/yolks:java_17 |
| java 21 | ghcr.io/ptero-eggs/yolks:java_21 |
| java 22 | ghcr.io/ptero-eggs/yolks:java_22 |
The name of the server jarfile to run the server with.
The version of Glowstone to download. If it ends in SNAPSHOT, it will attempt to download from the maven repository.
GitHub user to use for api calls. This only needs to be set if you hit the GitHub API too often across multiple servers.
This can be either an OAuth or a Personal Access Token. This is required for the install is you set a user.
The repository to download from.
#!/bin/bash
# Server Files: /mnt/server
apt update
apt install -y jq curl
mkdir -p /mnt/server
cd /mnt/server
if [ $VERSION == *SNAPSHOT ]; then
echo -e "Using Maven"
DOWNLOAD_URL="https://repo.glowstone.net/service/rest/v1/search/assets/download?group=net.glowstone&name=glowstone&sort=version&repository=snapshots&maven.baseVersion=${VERSION}&direction=desc&maven.classifier="
else
echo -e "Using GitHub."
if [ -z "${GITHUB_USER}" ] && [ -z "${GITHUB_OAUTH_TOKEN}" ] ; then
echo -e "using anon api call"
else
echo -e "user and oauth token set"
alias curl='curl -u ${GITHUB_USER}:${GITHUB_OAUTH_TOKEN} '
fi
## get release info and download links
LATEST_JSON=$(curl --silent "https://api.github.com/repos/${GITHUB_PACKAGE}/releases/latest")
RELEASES=$(curl --silent "https://api.github.com/repos/${GITHUB_PACKAGE}/releases")
if [ -z "${VERSION}" ] || [ "${VERSION}" == "latest" ]; then
DOWNLOAD_URL=$(echo ${LATEST_JSON} | jq .assets | jq -r .[].browser_download_url | grep -i ${MATCH})
else
VERSION_CHECK=$(echo ${RELEASES} | jq -r --arg VERSION "${VERSION}" '.[] | select(.tag_name==$VERSION) | .tag_name')
if [ "${VERSION}" == "${VERSION_CHECK}" ]; then
DOWNLOAD_URL=$(echo ${RELEASES} | jq -r --arg VERSION "${VERSION}" '.[] | select(.tag_name==$VERSION) | .assets[].browser_download_url' | grep -i ${MATCH})
else
echo -e "defaulting to latest release"
DOWNLOAD_URL=$(echo ${LATEST_JSON} | jq .assets | jq -r .[].browser_download_url)
fi
fi
fi
echo -e "Downloading..."
curl --silent -L -o ${SERVER_JARFILE} ${DOWNLOAD_URL}
echo -e "Generating configuration..."
java -jar ${SERVER_JARFILE} --generate-config
echo -e "Install Complete"| Installation Image | eclipse-temurin:8-jdk | Installation Entrypoint | bash |
|---|