Skip to content

SpongeForge

A community-driven open source Minecraft: Java Edition modding platform.

egg-spongeforge.json

updated

Ports

Add an allocation on the node for each port.

  • Game 25565

Install

Installer image
eclipse-temurin:8-jdk-jammy
Install script
104 lines

Images

New servers use the first image. Users can change it on the Startup page.

  • Java 8 default 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
  • Java 25 ghcr.io/ptero-eggs/yolks:java_25

Panel features

  • eula

    The Panel asks the user to accept the Minecraft EULA when the server needs it.

  • java_version

    The Panel lets the user change the Java version when the server needs a different one.

  • pid_limit

    The Panel tells the user when the server reaches its process or memory limit.

Startup

The Panel runs this command to start the server. It replaces each variable in the command with the value of that variable.

2 variables

Startup command

java -Xms128M -Xmx1024M -Dterminal.jline=false -Dterminal.ansi=true $( [[  ! -f unix_args.txt ]] && printf %s "-jar server.jar" || printf %s "@unix_args.txt" )

Dotted values come from the server settings. These values are examples.

  • The name of the Jarfile to use when running Forge Mod.

    SERVER_JARFILEUsers can edit

    required|regex:/^([\w\d._-]+)(\.jar)$/

  • Either use a full version such as: 1.20.6-50.0.22-11.0.0-RC1633 to fetch an exact version Or just use the Minecraft version such as: 1.20.6, 1.19.4, etc. to get the recommended version Supported versions can be found here: https://spongepowered.org/downloads/spongeforge

    SF_MC_VERSIONUsers can edit

    required|string|max:30

Wings

Stop command
stop
Running when the console shows
)! For help, type

Files Wings edits

Wings sets these values in these files before each start.

server.properties properties

server-ip
0.0.0.0
server-port
{{server.build.default.port}}
query.port
{{server.build.default.port}}

Readme

SpongeForge

SpongeForge is the implementation of the Sponge API on the Minecraft Forge platform.

SpongePowered Website

Server Ports

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

Author & Contributers

Name Github Profile Buy me a Coffee
Red-Banana-Official https://github.com/Red-Banana-Official /
Parkervcp https://github.com/parkervcp /

Changes

  1. Adding java 25 to most minecraft eggs

    · Red-Banana-Official · fb0c032

  2. Move more eggs off deprecated openjdk images

    · Daniel Barton · a140ad1

  3. Sponge Forge: Updated install script to work with new endpoints (#88)

    · Red Banana · ff6fbb4

  4. Updating MC docker images (#23)

    · Red Banana · 8f3fc4d

  5. Validate and update embedded URLs

    · Daniel Barton · bf9f3cb

  6. SteamCMD + Other fixes

    · yesBad · edbf925

All changes on GitHub

Problem with this egg?

Open an issue on GitHub. Include your Panel and Wings versions.

Install script 104 lines bash in eclipse-temurin:8-jdk-jammy Show
#!/bin/bash
# SpongeForge Installation Script
#
# Server Files: /mnt/server
apt update
apt install -y jq curl

mkdir -p /mnt/server
mkdir -p /mnt/server/mods
cd /mnt/server

# Create spongeForge download URL using SF_MC_VERSION variable
if [[ "${SF_MC_VERSION}" == *-* ]]; then
    echo -e "Using specific SpongeForge version: ${SF_MC_VERSION}"
    SF_VERSION=${SF_MC_VERSION}
else
    echo -e "Fetching recommended SpongeForge version for Minecraft ${SF_MC_VERSION}"
    API_URL="https://dl-api-new.spongepowered.org/api/v2/groups/org.spongepowered/artifacts/spongeforge/latest?tags=minecraft:${SF_MC_VERSION}&recommended=true"
    SF_VERSION=$(curl -s ${API_URL} | jq -r '.coordinates.version // empty') || true
    if [[ -z "${SF_VERSION}" ]]; then
        echo -e "Attempting to fetch latest SpongeForge version for Minecraft ${SF_MC_VERSION}"
        API_URL="https://dl-api-new.spongepowered.org/api/v2/groups/org.spongepowered/artifacts/spongeforge/latest?tags=minecraft:${SF_MC_VERSION}&recommended=false"
        SF_VERSION=$(curl -s ${API_URL} | jq -r '.coordinates.version // empty') || true
    fi
    if [[ -z "${SF_VERSION}" ]]; then
        echo -e "Error: Failed to retrieve SpongeForge version for Minecraft ${SF_MC_VERSION}"
        exit 1
    fi
    echo -e "Found SpongeForge version: ${SF_VERSION}"
fi

# Handle older versions legacy-transfer
MC_VERSION=${SF_VERSION%%-*}
SF_BASE_URL="https://repo.spongepowered.org/repository/maven-releases"
if [[ "${MC_VERSION}" == "1.12.2" || $(printf '%s\n' "$MC_VERSION" "1.12" | sort -V | head -n1) == "$MC_VERSION" ]]; then
    SF_BASE_URL="https://repo.spongepowered.org/repository/legacy-transfer"
fi

# Download SpongeForge
if [[ $(printf '%s\n' "$MC_VERSION" "1.16.5" | sort -V | tail -n1) == "$MC_VERSION" || "${MC_VERSION}" == "1.21.4" ]]; then
    SF_DL_LINK="${SF_BASE_URL}/org/spongepowered/spongeforge/${SF_VERSION}/spongeforge-${SF_VERSION}-universal.jar"
else
    SF_DL_LINK="${SF_BASE_URL}/org/spongepowered/spongeforge/${SF_VERSION}/spongeforge-${SF_VERSION}.jar"
fi

echo -e "Downloading SpongeForge: ${SF_DL_LINK}"
curl -L --retry 5 --retry-delay 5 -o /mnt/server/mods/spongeforge-${SF_VERSION}.jar ${SF_DL_LINK} || {
    echo -e "Error: SpongeForge download failed. Attempted URL: ${SF_DL_LINK}"
    exit 1
}

# Forge version mappings for older versions
declare -A FORGE_VERSIONS=(
    ["1.12.2"]="14.23.5.2838"
    ["1.12.1"]="14.22.1.2480"
    ["1.11.2"]="13.20.1.2476"
    ["1.10.2"]="12.18.3.2477"
    ["1.9.4"]="12.17.0.1968"
    ["1.8.9"]="11.15.1.1890-1.8.9"
)

# Determine Forge version
if [[ -n "${FORGE_VERSIONS[${MC_VERSION}]}" ]]; then
    FORGE_VERSION=${FORGE_VERSIONS[${MC_VERSION}]}
else
    IFS='-' read -ra VERSION_PARTS <<< "$SF_VERSION"
    FORGE_VERSION=${VERSION_PARTS[1]:-${VERSION_PARTS[2]}}
fi

# Use unix_args.txt for versions 1.17 and above
if printf '%s\n' "$MC_VERSION" "1.17" | sort -V | tail -n1 | grep -q "$MC_VERSION"; then
    echo -e "Using unix_args.txt for versions 1.17 and above."
    ln -sf libraries/net/minecraftforge/forge/${MC_VERSION}-${FORGE_VERSION}/unix_args.txt unix_args.txt
fi

# Download Forge
echo -e "Downloading Forge for Minecraft ${MC_VERSION}"
FORGE_DL_LINK="https://maven.minecraftforge.net/net/minecraftforge/forge/${MC_VERSION}-${FORGE_VERSION}/forge-${MC_VERSION}-${FORGE_VERSION}-installer.jar"

echo -e "Forge download URL: ${FORGE_DL_LINK}"
curl -L --retry 5 --retry-delay 5 -o installer.jar ${FORGE_DL_LINK} || {
    echo -e "Error: Failed to download Forge installer. URL attempted: ${FORGE_DL_LINK}"
    exit 1
}

# Run installer
if ! java -jar installer.jar --installServer; then
    echo -e "Error: Invalid or corrupt Forge installer. URL: ${FORGE_DL_LINK}"
    exit 1
fi
rm installer.jar

# Locate universal jar
SERVER_JAR_PATH=$(find . -type f -name "forge-*-universal.jar" | head -n 1)
if [[ -f "$SERVER_JAR_PATH" ]]; then
    echo -e "Found Forge universal JAR: $SERVER_JAR_PATH"
    cp "$SERVER_JAR_PATH" server.jar
    cp "$SERVER_JAR_PATH" "${SERVER_JAR_PATH}.backup"
else
    echo -e "Error: Universal Forge JAR not found. Installation failed."
    exit 1
fi

echo -e "SpongeForge installation complete."