Forge
A Forge server can be automatically downloaded, upgraded, and run by setting the environment variable TYPE to "FORGE".
A note from the installer
Please do not automate the download and installation of Forge. Our efforts are supported by ads from the download page. If you MUST automate this, please consider supporting the project through https://www.patreon.com/LexManos/
Since my project also relies on donations, please pass it along and consider contributing to the Patreon above.
The overall version is specified by VERSION, as described in the section above and provides the same benefits of upgrading as new versions are released. By default, the recommended version of Forge for that Minecraft version will be selected. The latest version can be selected instead by setting the environment variable FORGE_VERSION to "latest". You can also choose a specific Forge version by setting FORGE_VERSION with that version, such as "14.23.5.2854".
Example
or in a compose file
To use a pre-downloaded Forge installer, place it in a location mounted into the container and specify the container path with FORGE_INSTALLER. To download a Forge installer from a custom location, such as your own file repository, specify the URL with FORGE_INSTALLER_URL.
In both of the cases above, there is no need for the VERSION or FORGE_VERSION variables.
Note
If an error occurred while installing Forge, it might be possible to resolve by temporarily setting FORGE_FORCE_REINSTALL to "true". Be sure to remove that variable after successfully starting the server.
URLs configurable via environment variables:
FORGE_PROMOTIONS_URL: default is https://files.minecraftforge.net/net/minecraftforge/forge/promotions_slim.jsonFORGE_MAVEN_REPO_URL: default is https://maven.minecraftforge.net
Alternatives¶
NeoForge¶
Support for NeoForge is also provided. A NeoForge server can be automatically managed by setting TYPE to "NEOFORGE". VERSION specifies the Minecraft version and NEOFORGE_VERSION can be set to select a specific version, "latest", or "beta". By default, the latest, non-beta NeoForge version available for the requested Minecraft version will be used.
Example
or in a compose file
Cleanroom¶
Cleanroom isn't fully automated, but can be utilized by...
- choose the desired release at https://github.com/CleanroomMC/Cleanroom/releases
- grab the link to the
*-installer.jarfile in that release - with
TYPEset to "FORGE", setFORGE_INSTALLER_URLto the installer jar's link