Magma is most powerful Forge server providing you with Forge mods and Bukkit Plugins using Spigot and Paper for Performance Optimization and Stability. Using: https://github.com/magmamaintained
Magma is most powerful Forge server providing you with Forge mods and Bukkit Plugins using Spigot and Paper for Performance Optimization and Stability.
The minecraft server requires a single port for access (default 25565) but plugins may require extra ports to enabled for the server.
Port | default |
---|---|
Game | 25565 |
Providing a Minecraft version of latest
or an empty value will default to 1.18.2 as this is the latest version that Magma supports at this time.
There is no API to query to find the true latest supported version.
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 |
Name | Description | Environment Variable | Default Value | User Viewable | User Editable |
---|---|---|---|---|---|
Server Jar File | The name of the server jarfile to run the server with. | SERVER_JARFILE | server.jar | Yes | No |
Minecraft Version | MC_VERSION | 1.20.1 | Yes | Yes | |
Tag Version | Optional. Specify the tag version to install. Set latest to install latest | TAG_VERSION | latest | Yes | Yes |
#!/bin/bash
mkdir -p /mnt/server
cd /mnt/server
## get release info and download links
LATEST_JSON=$(curl --silent "https://api.github.com/repos/magmamaintained/Magma-${MC_VERSION}/releases/latest")
RELEASES=$(curl --silent "https://api.github.com/repos/magmamaintained/Magma-${MC_VERSION}/releases")
if [ -z "${TAG_VERSION}" ] || [ "${TAG_VERSION}" == "latest" ]; then
DOWNLOAD_LINK=$(echo ${LATEST_JSON} | jq .assets | jq -r .[].browser_download_url )
else
VERSION_CHECK=$(echo ${RELEASES} | jq -r --arg VERSION "${TAG_VERSION}" '.[] | select(.tag_name==$VERSION) | .tag_name')
if [ "${TAG_VERSION}" == "${VERSION_CHECK}" ]; then
DOWNLOAD_LINK=$(echo ${RELEASES} | jq -r --arg VERSION "${TAG_VERSION}" '.[] | select(.tag_name==$VERSION) | .assets[].browser_download_url')
else
echo -e "defaulting to latest release"
DOWNLOAD_LINK=$(echo ${LATEST_JSON} | jq .assets | jq -r .[].browser_download_url)
fi
fi
if [ ! -z "${DOWNLOAD_LINK}" ]; then
if curl --output /dev/null --silent --head --fail ${DOWNLOAD_LINK}; then
echo -e "link is valid. setting download link to ${DOWNLOAD_LINK}"
DOWNLOAD_LINK=${DOWNLOAD_LINK}
else
echo -e "link is invalid closing out"
exit 2
fi
fi
echo "Download Link: '${DOWNLOAD_LINK}'"
# Check we found a download link
# Download server.jar
echo -e "running: curl -sSL -o ${SERVER_JARFILE} ${DOWNLOAD_LINK}"
curl -sSL -o ${SERVER_JARFILE} -sSL ${DOWNLOAD_LINK}
echo -e "Install Complete"