Skip to content

Spigot

Spigot is the most widely-used modded Minecraft server software in the world. It powers many of the top Minecraft server networks around to ensure they can cope with their huge player base and ensure the satisfaction of their players. Spigot works by reducing and eliminating many causes of lag, as well as adding in handy features and settings that help make your job of server administration easier.

egg-spigot.json

updated

Ports

Add an allocation on the node for each port.

  • Game 25565

Install

Installer image
ghcr.io/ptero-eggs/installers:debian
Install script
83 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.

3 variables

Startup command

java -Xms128M -Xmx1024M -jar server.jar

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

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

    SERVER_JARFILEUsers can edit

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

  • A URL to use to download Spigot rather than building it on the server. This is not user viewable. Use <code>{{DL_VERSION}}</code> in the URL to automatically insert the assigned version into the URL. If you do not enter a URL Spigot will build directly in the container (this will fail on low memory containers).

    DL_PATHUsers cannot see

    nullable|string

  • The version of Spigot to download (using the --rev tag from https://hub.spigotmc.org/versions). Use "latest" for latest.

    DL_VERSIONUsers can edit

    required|string|between:3,10

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

Spigot

A high performance Minecraft server implementation

Spigot 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

Server Specific

Spigot was hit with a DMCA and now requires that it be built by the user.

This egg will build spigot for you

You can also supply a download link to a server jar if you want.

Changes

  1. Fix formatting

    · Rowan · b505302

  2. Adding java 25 to most minecraft eggs

    · Red-Banana-Official · fb0c032

  3. Update egg-spigot.json (#52)

    · Daniel Barton · ea64a01

  4. Updating MC docker images (#23)

    · Red Banana · 8f3fc4d

  5. Add Minecraft eggs

    · Daniel Barton · 7322302

All changes on GitHub

Problem with this egg?

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

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

mkdir -p /usr/share/man/man1

ARCH=$([[ "$(uname -m)" == "x86_64" ]] && echo "x64" || echo "aarch64")
    
function install_java() {
  echo "ARCH: ${ARCH}"
  echo "Download URl: $1"
  curl -L "$1" -o java.tar.gz
  tar xzf java.tar.gz
  export PATH=$PWD/$2/bin:$PATH
  java -version
}

function build_spigot()
{
  java -Xms$1M -jar BuildTools.jar --rev "${DL_VERSION}" || { echo -e "\n install failed! Attempted to install ${DL_VERSION} with memory of ${SERVER_MEMORY} and Java version of:"; java -version; exit 1; }
}


## Only download if a path is provided, otherwise continue.
if [ -n "${DL_PATH}" ]; then
    cd /mnt/server || { echo "Failed to change directory"; exit 1;}
    MODIFIED_DOWNLOAD=$(eval echo "$(echo "${DL_PATH}" | sed -e 's/{{/${/g' -e 's/}}/}/g')")
    echo -e "Using custom provided download link ${MODIFIED_DOWNLOAD}"
    curl -L "${MODIFIED_DOWNLOAD}" -o "${SERVER_JARFILE}"
else
    # Fetch the java version info from the spigotmc API
    if [ -z "$DL_VERSION" ] || [ "$DL_VERSION" == "latest" ]; then
        DL_VERSION="latest"
        SPIGOT_VERSION_JSON=$(curl --fail -s https://hub.spigotmc.org/versions/latest.json)
    else
        # Get requested version    
        if ! SPIGOT_VERSION_JSON=$(curl --fail -s https://hub.spigotmc.org/versions/${DL_VERSION}.json) ; then
            # Default to latest
            echo "Invalid version requested... defaulting to latest."
            DL_VERSION="latest"
            SPIGOT_VERSION_JSON=$(curl --fail -s https://hub.spigotmc.org/versions/${DL_VERSION}.json)
        fi
    fi
    JAVA_VERSION_INDEX_MIN=$(echo "$SPIGOT_VERSION_JSON" | jq -r '.javaVersions[0]')
    JAVA_VERSION_INDEX_MAX=$(echo "$SPIGOT_VERSION_JSON" | jq -r '.javaVersions[1]')


    # Spigot version table - https://hub.spigotmc.org/stash/projects/SPIGOT/repos/buildtools/browse/src/main/java/org/spigotmc/builder/JavaVersion.java
    # Install the minimum supported java version
    if  [ 52 -ge "$JAVA_VERSION_INDEX_MIN" ] && [ 52 -le "$JAVA_VERSION_INDEX_MAX" ]; then
        install_java "https://github.com/adoptium/temurin8-binaries/releases/download/jdk8u312-b07/OpenJDK8U-jdk_${ARCH}_linux_hotspot_8u312b07.tar.gz" jdk8u312-b07
    elif [ 60 -ge "$JAVA_VERSION_INDEX_MIN" ] && [ 60 -le "$JAVA_VERSION_INDEX_MAX" ]; then
        install_java "https://github.com/adoptium/temurin16-binaries/releases/download/jdk-16.0.2%2B7/OpenJDK16U-jdk_${ARCH}_linux_hotspot_16.0.2_7.tar.gz" jdk-16.0.2+7
    elif [ 61 -ge "$JAVA_VERSION_INDEX_MIN" ] && [ 61 -le "$JAVA_VERSION_INDEX_MAX" ]; then
        install_java "https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.1%2B12/OpenJDK17U-jdk_${ARCH}_linux_hotspot_17.0.1_12.tar.gz" jdk-17.0.1+12
    elif [ 65 -ge "$JAVA_VERSION_INDEX_MIN" ] && [ 65 -le "$JAVA_VERSION_INDEX_MAX" ]; then
        install_java "https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.3%2B9/OpenJDK21U-jdk_${ARCH}_linux_hotspot_21.0.3_9.tar.gz" jdk-21.0.3+9
    elif [ 67 -ge "$JAVA_VERSION_INDEX_MIN" ] && [ 67 -le "$JAVA_VERSION_INDEX_MAX" ]; then
        install_java "https://github.com/adoptium/temurin23-binaries/releases/download/jdk-23.0.1%2B11/OpenJDK23U-jdk_${ARCH}_linux_hotspot_23.0.1_11.tar.gz" jdk-23.0.1+11
    else
        echo "Unsupported Java version required"
        exit 1
    fi

    mkdir -p /srv/
    cd /srv/ || { echo "Failed to change directory"; exit 1;}
    curl -L https://hub.spigotmc.org/jenkins/job/BuildTools/lastSuccessfulBuild/artifact/target/BuildTools.jar -o BuildTools.jar

    # Force the minimum Wings install container memory should someone provide less or 0 as it will break the Java build process
    if [ "$SERVER_MEMORY" -lt 1024 ]; then
        echo -e "Do not use 0 for memory with Java applications. Defaulting to 1024MB.\n WARNING! 1024MB might not be enough to build 1.17+ releases."
        SERVER_MEMORY=1024            
    fi
    build_spigot "${SERVER_MEMORY}"
    mv spigot-*.jar "/mnt/server/${SERVER_JARFILE}"
fi


## install end
echo "-----------------------------------------"
echo "Installation completed..."
echo "-----------------------------------------"