Auto-download from Modrinth¶
Modrinth is an open source modding platform with a clean, easy to use website for finding Fabric, Forge, etc mods and Paper, etc plugins, and datapacks. At startup, the container will automatically locate and download the newest versions of mod/plugin files that correspond to the TYPE and VERSION in use. Older file versions downloaded previously will automatically be cleaned up.
Usage¶
To use this feature, set the environment variable MODRINTH_PROJECTS to a comma or newline separated list of projects.
Each project entry can be any of the following combinations where a colon (:) is used to separate the different parts:
Project
Project : Version
Project : Release Type
Prefix : Project
Prefix : Project : Version
Prefix : Project : Release Type
@ Listing File
Where:
- Project is the project slug or ID, see below
- Version is the version ID (such as "Oa9ZDzZq") or number (such as "2.21.2"). When omitted, the latest release version will be selected. Using version ID will override Minecraft and loader compatibility checks.
- Release Type is
release,beta, oralphaindicating the latest version to select. - Prefix is
datapack,fabric,forge, orpaper- The
datapackprefix is optional when running a vanilla server - The
fabric,forge, andpaperprefixes allow for installing mods/plugins that differ from server'sTYPE. Using Sinytra Connector is an example of this, where Fabric mods can be loaded into a NeoForge server.
- The
- Listing file is a container path to a file containing a list of projects
Project ID
The project ID can be copied to the clipboard from the project page menu:

Project Slug
The project slug is the part of the URL that follows /mod/, /plugin/, or /datapack/. For example, this one is "essentialsx".

Version number and ID
The version number and ID are located in the metadata panel on a version specific page, such as https://modrinth.com/plugin/essentialsx/version/2.21.2

Examples¶
| Description | Example projects entry |
|---|---|
| Select latest version | fabric-api |
| Select specific version | fabric-api:bQZpGIz0fabric-api:0.119.2+1.21.4 |
| Select latest beta version | fabric-api:beta |
| Latest version using project ID | P7dR8mSH |
| Latest version of datapack | datapack:terralith |
| Specific version of datapack | datapack:terralith:2.5.5 |
| Mod loader override | fabric:fabric-apifabric:fabric-api:bQZpGIz0 |
| Projects Listing File | @/path/to/modrinth-mods.txt |
Notes¶
More about listing files
Each line in the listing file is processed as one of the references above; however, blank lines and comments that start with # are ignored.
Make sure to place the listing file in a mounted directory/volume or declare an appropriate mount for it.
For example, MODRINTH_PROJECTS can be set to "@/extras/modrinth-mods.txt", assuming "/extras" has been added to volumes section, where the container file /extras/modrinth-mods.txt contains
Auto-removal
Entries that are removed from the MODRINTH_PROJECTS list will be automatically removed from the mods or plugins directory. This is useful for removing mods/plugins that are no longer needed. An empty MODRINTH_PROJECTS list will remove all mods/plugins.
Disable processing
To temporarily disable processing of the MODRINTH_PROJECTS list, then comment out the MODRINTH_PROJECTS environment variable.
Optional projects¶
Projects that are not critical for the server to function can be marked as optional by appending a ? to the project slug or ID. When a compatible version cannot be found for an optional project, the server logs a warning and continues startup instead of failing.
This is particularly useful for server-side mods that tend to lag behind on Minecraft updates, such as map renderers (Pl3xmap, BlueMap), performance mods (Lithium, C2ME), or admin tools (Spark, LuckPerms).
The ? marker can be combined with all existing format options:
| Format | Example |
|---|---|
| Slug only | pl3xmap? |
| With version | pl3xmap?:Oa9ZDzZq |
| With release type | pl3xmap?:beta |
| With loader prefix | fabric:pl3xmap? |
| Full combination | fabric:pl3xmap?:beta |
| In listing files | pl3xmap? (one per line) |
When combined with VERSION_FROM_MODRINTH_PROJECTS, optional projects are excluded from the version calculation. This means an optional mod that hasn't been updated yet will never block a Minecraft version upgrade.
Automatic upgrades without optional-mod breakage
If a new Minecraft version is released and fabric-api + lithium support it but pl3xmap does not:
- The resolved
VERSIONis set to the new version (pl3xmap is not considered) fabric-apiandlithiumare installed normallypl3xmapis skipped with a warning in the logs- On a future restart, once pl3xmap publishes a compatible build, it is picked up automatically
Note
Optional projects marked with ? in listing files (@/path/to/file.txt) are supported ; the ? is parsed from each line the same way as inline entries.
Version from Projects¶
When the environment variable VERSION_FROM_MODRINTH_PROJECTS is set to "true" the Minecraft VERSION will be automatically determined by looking at the most recent version of Minecraft that is supported by all the projects provided in MODRINTH_PROJECTS.
Example
Given the environment variables
MODRINTH_PROJECTS: |
viaversion
viabackwards
griefprevention
discordsrv
VERSION_FROM_MODRINTH_PROJECTS: true
Let's say all are supported on Minecraft up to 1.21.8 except griefprevention, which is only supported up to 1.21.7. In that case, VERSION will be automatically set to 1.21.7.
Extra options¶
MODRINTH_DOWNLOAD_DEPENDENCIES- Can be set to
none(the default),required, oroptionalto download required and/or optional dependencies. MODRINTH_PROJECTS_DEFAULT_VERSION_TYPE- The version type is used to determine the newest version to use from each project. The allowed values are
release(default),beta,alpha. Setting tobetawill pick up both release and beta versions. Setting toalphawill pick up release, beta, and alpha versions. MODRINTH_LOADER- When using a custom server, set this to specify which loader type will be requested during lookups