Egg Repository

Pterodactyl Community Egg Repository

Glowstone

Glowstone is an open-source server implementation for Minecraft: Java Edition 1.12.2 and up.

Read Me

Glowstone

Glowstone is an open-source replacement for CraftBukkit, Spigot, and Paper.

Ports

Similar to CraftBukkit and it's derivatives, it only requires a single port. Other plugins may require more ports.

Portdefault
Game25565
Yolks
NameTag
Java 8ghcr.io/ptero-eggs/yolks:java_8
Java 11ghcr.io/ptero-eggs/yolks:java_11
Java 16ghcr.io/ptero-eggs/yolks:java_16
Java 17ghcr.io/ptero-eggs/yolks:java_17
java 21ghcr.io/ptero-eggs/yolks:java_21
java 22ghcr.io/ptero-eggs/yolks:java_22
Variables and Startup

Startup Command

java -Xms768M -Xmx{{SERVER_MEMORY}}M -XX:+UseG1GC -jar {{SERVER_JARFILE}}

Variables

Server Jar File

The name of the server jarfile to run the server with.

Environment Variable: SERVER_JARFILE
Default Value: glowstone.jar
User Viewable:
User Editable:
Glowstone Version

The version of Glowstone to download. If it ends in SNAPSHOT, it will attempt to download from the maven repository.

Environment Variable: VERSION
Default Value: latest
User Viewable:
User Editable:
GitHub User

GitHub user to use for api calls. This only needs to be set if you hit the GitHub API too often across multiple servers.

Environment Variable: GITHUB_USER
Default Value:
User Viewable:
User Editable:
GitHub OAuth Token

This can be either an OAuth or a Personal Access Token. This is required for the install is you set a user.

Environment Variable: GITHUB_OAUTH_TOKEN
Default Value:
User Viewable:
User Editable:
GitHub Package

The repository to download from.

Environment Variable: GITHUB_PACKAGE
Default Value: GlowstoneMC/Glowstone
User Viewable:
User Editable:
Match

Environment Variable: MATCH
Default Value: glowstone.jar
User Viewable:
User Editable:
Install Script
#!/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 Imageeclipse-temurin:8-jdkInstallation Entrypointbash