Skip to content

Eggs and Nests

Eggs are game server configuration templates that define how a server is installed, started, and configured. Nests are categories that group related eggs together.

Concepts

Nests

A nest is a category such as "Minecraft", "Source Games", or "Voice Servers". Each nest contains one or more eggs. Nests help organize the egg library and are referenced when creating billing products.

Eggs

An egg defines everything needed to run a particular type of game server:

  • Docker Image(s) -- The container image(s) used to run the server on Linux nodes.
  • Startup Command -- The command executed inside the container to launch the game server. Supports variable substitution (e.g., java -Xms128M -XmxM -jar server.jar).
  • Install Script -- A shell script that runs during initial server provisioning to download game files, configure defaults, and prepare the environment.
  • Stop Command -- The command sent to the server process for graceful shutdown (e.g., stop for Minecraft).
  • Environment Variables -- Configurable variables that users can modify (server version, game mode, max players, etc.).
  • Default Port -- The default port number for this game type, used to suggest matching allocations during server creation.
  • Windows Support -- Optional Windows-specific startup command, install script (PowerShell), and SteamCMD app ID.

Importing Eggs from JSON

BadgerPanel ships with pre-built egg JSON files and supports importing additional ones.

  1. Navigate to Admin > Eggs and click Import Egg.
  2. Upload a JSON file or paste the JSON content.
  3. Select the target nest. If the nest does not exist, the import creates it automatically.
  4. Click Import. The egg and its variables are created.

Pre-Built Eggs

The following eggs are included with BadgerPanel:

  • Minecraft Java -- Standard Minecraft Java Edition server with configurable version and memory.
  • Minecraft Paper -- PaperMC server with build selection and automatic JAR download.
  • SteamCMD Generic -- A generic template for any SteamCMD-based game server, configurable via Steam App ID.

Creating a Custom Egg

  1. Navigate to Admin > Eggs and click New Egg.
  2. Select or create the parent nest.
  3. Fill in the egg details:
    • Name and Description -- Displayed to users during server creation.
    • Docker Images -- One or more image options. Each entry has a display name and image reference (e.g., ghcr.io/badgerpanel/yolks:java_21).
    • Startup Command -- The command template with placeholders.
    • Stop Command -- The string sent to stdin for graceful shutdown.
  4. Configure the Install Script:
    • Script Container -- The Docker image used to run the install script (default: alpine:3.18).
    • Script Entry -- The interpreter (default: bash).
    • Script Content -- The shell script body.
  5. Add Variables (see below).
  6. Set the Default Port if applicable.
  7. Optionally configure Windows fields for dual-OS support.
  8. Click Save.

Egg Variables

Variables are the configurable parameters exposed to server owners. Each variable has:

  • Name -- Display name shown in the UI.
  • Environment Variable -- The environment variable name passed to the container (e.g., SERVER_VERSION).
  • Default Value -- The value used if the user does not provide one.
  • Rules -- Validation rules (required, string, numeric, regex patterns, etc.).
  • User Viewable -- Whether the variable is visible to non-admin users.
  • User Editable -- Whether non-admin users can change the value.

Variables are injected into the startup command and made available as environment variables inside the container.

Editing an Egg

Navigate to Admin > Eggs > [egg]. All fields are editable. Changes to Docker images, startup commands, or variables apply to newly created servers. Existing servers retain their current configuration unless you trigger a reinstall.

Supported OS Configuration

Each egg declares which operating systems it supports via the supported_os field (defaults to ["linux"]). To enable an egg for Windows nodes, add "windows" to the list and configure the Windows-specific fields: windows_startup, windows_script_install, windows_script_entry, windows_config_stop, and optionally windows_steam_app_id.

BadgerPanel Documentation