Skip to content

NeoForge

NeoForge Server. NeoForge is a modding API (Application Programming Interface), which makes it easier to create mods, and also make sure mods are compatible with each other. NeoForge is a fork of Minecraft Forge.

egg-neoforge.json

updated

Ports

Add an allocation on the node for each port.

  • Minecraft 25565

Install

Installer image
ghcr.io/ptero-eggs/installers:debian
Install script
115 lines

Images

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

  • Java 17 default 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 -XX:MaxRAMPercentage=95.0 -Dterminal.jline=false -Dterminal.ansi=true @unix_args.txt
  • The version of Minecraft you want to install for. Leaving latest will install the latest version.

    MC_VERSIONUsers can edit

    required|string|max:9

  • The full exact version. Ex. 20.4.194 https://projects.neoforged.net/neoforged/neoforge If it fails to download the server files it will fail to install.

    NEOFORGE_VERSIONUsers can edit

    nullable|regex:/^[0-9A-Za-z.\-\+]+$/

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

NeoForge 馃

This is a generic egg for the NeoForge standalone server.

NeoForge is a fork of Minecraft Forge for versions 1.20.1 or newer. The install script is based on the official Forge install script.

The egg supports downloading NeoForge for the latest or a specified Minecraft version, as well as downloading a specific NeoForge version.

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
Minecraft 25565

Changes

  1. Adding java 25 to most minecraft eggs

    路 Red-Banana-Official 路 fb0c032

  2. NeoForge: Improve version handling/parsing

    路 Red Banana 路 569eead

  3. Neoforge: Update install script to support -beta versions

    路 Red Banana 路 24b7e07

  4. NeoForge: Removed java versions below 21

    路 Daniel 路 f196d4c

  5. Updating MC docker images (#23)

    路 Red Banana 路 8f3fc4d

  6. Minecraft Eggs

    路 yesBad 路 d749608

All changes on GitHub

Problem with this egg?

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

Install script 115 lines bash in ghcr.io/ptero-eggs/installers:debian Show
#!/bin/bash
# NeoForge Installation Script
#
# Server Files: /mnt/server

apt-get update
apt-get install -y curl xq openjdk-17-jdk

if [[ ! -d /mnt/server ]]; then
    mkdir /mnt/server
fi

cd /mnt/server

# Remove spaces from the version number to avoid issues with curl
NEOFORGE_VERSION="$(echo "$NEOFORGE_VERSION" | tr -d ' ')"
MC_VERSION="$(echo "$MC_VERSION" | tr -d ' ')"

# If we have a specific NeoForge version set, use that
if [[ ! -z ${NEOFORGE_VERSION} ]]; then
  if [[ "${NEOFORGE_VERSION}" =~ "1.20.1-" ]]; then
    ARTIFACT_NAME="forge"
  else
    ARTIFACT_NAME="neoforge"
  fi

  BASE_URL="https://maven.neoforged.net/releases/net/neoforged/${ARTIFACT_NAME}/${NEOFORGE_VERSION}/"
  echo "Fetching file list from: ${BASE_URL}"
  FILE_LIST=$(curl -s "${BASE_URL}" | grep -oP 'href="[^"]+"' | cut -d'"' -f2)

  INSTALLER_JAR=$(echo "$FILE_LIST" | grep -E "${ARTIFACT_NAME}-${NEOFORGE_VERSION}.*installer.*\.jar$" | head -n1)
  if [[ -z "$INSTALLER_JAR" ]]; then
    INSTALLER_JAR=$(echo "$FILE_LIST" | grep -E "${ARTIFACT_NAME}-${NEOFORGE_VERSION}.*universal.*\.jar$" | head -n1)
  fi
  if [[ -z "$INSTALLER_JAR" ]]; then
    echo "Could not find a valid JAR file for NeoForge version ${NEOFORGE_VERSION}."
    exit 1
  fi

  echo "Downloading ${INSTALLER_JAR}..."
  curl -o "${INSTALLER_JAR}" "${BASE_URL}${INSTALLER_JAR}"
else
  if [[ "${MC_VERSION}" == "1.20.1" ]]; then
    XML_DATA=$(curl -sSL https://maven.neoforged.net/releases/net/neoforged/forge/maven-metadata.xml)
    ARTIFACT_NAME="forge"
    NEOFORGE_OLD=1
  else
    XML_DATA=$(curl -sSL https://maven.neoforged.net/releases/net/neoforged/neoforge/maven-metadata.xml)
    ARTIFACT_NAME="neoforge"
  fi

  REPO_URL="https://maven.neoforged.net/releases/net/neoforged/${ARTIFACT_NAME}/"

  if [[ "${MC_VERSION}" == "latest" ]] || [[ "${MC_VERSION}" == "" ]]; then
    echo "Getting latest version of NeoForge."
    MC_VERSION="1.$(echo -e ${XML_DATA} | xq -x '/metadata/versioning/release' | cut -d'.' -f1-2)"
  fi

  echo "Minecraft version: ${MC_VERSION}"

  if [[ -z "${NEOFORGE_OLD}" ]]; then
    if [[ "${MC_VERSION}" == *.*.* ]]; then
      VERSION_KEY="$(echo -n ${MC_VERSION} | cut -d'.' -f2-)."
    else
      VERSION_KEY=$(echo -n ${MC_VERSION} | cut -d'.' -f2-)
    fi
  else
    VERSION_KEY="${MC_VERSION}-"
  fi

  NEOFORGE_VERSION=$(echo -e ${XML_DATA} | xq -x "(/metadata/versioning/versions/*[starts-with(text(), '${VERSION_KEY}')])" | tail -n1)
  if [[ -z "${NEOFORGE_VERSION}" ]]; then
    echo "The install failed, because there is no valid version of NeoForge for Minecraft version ${MC_VERSION}."
    exit 1
  fi

  BASE_URL="${REPO_URL}${NEOFORGE_VERSION}/"
  echo "Resolved NeoForge version: ${NEOFORGE_VERSION}"
  FILE_LIST=$(curl -s "${BASE_URL}" | grep -oP 'href="[^"]+"' | cut -d'"' -f2)

  INSTALLER_JAR=$(echo "$FILE_LIST" | grep -E "${ARTIFACT_NAME}-${NEOFORGE_VERSION}.*installer.*\.jar$" | head -n1)
  if [[ -z "$INSTALLER_JAR" ]]; then
    INSTALLER_JAR=$(echo "$FILE_LIST" | grep -E "${ARTIFACT_NAME}-${NEOFORGE_VERSION}.*universal.*\.jar$" | head -n1)
  fi
  if [[ -z "$INSTALLER_JAR" ]]; then
    echo "Could not find a valid JAR file for NeoForge version ${NEOFORGE_VERSION}."
    exit 1
  fi

  echo "Downloading ${INSTALLER_JAR}..."
  curl -o "${INSTALLER_JAR}" "${BASE_URL}${INSTALLER_JAR}"
fi

# Clean previous install (for downgrade/upgrade support)
rm -rf libraries/net/neoforged/${ARTIFACT_NAME}

# Run the installer to generate startup arguments
echo "Running installer..."
java -jar "${INSTALLER_JAR}" --installServer

# Symlink unix_args.txt if it exists
if [[ -f "libraries/net/neoforged/${ARTIFACT_NAME}/${NEOFORGE_VERSION}/unix_args.txt" ]]; then
  ln -sf "libraries/net/neoforged/${ARTIFACT_NAME}/${NEOFORGE_VERSION}/unix_args.txt" unix_args.txt
fi

if [[ ! -f unix_args.txt ]]; then
  echo "Installer did not generate unix_args.txt. Installation failed."
  exit 1
fi

# Removal of unnecessary files
rm run.bat
rm run.sh

echo "Installation complete."