Fabric
A Fabric server can be automatically downloaded, upgraded, and run by setting the environment variable TYPE to "FABRIC"
Example
Using docker run command line
In a compose file service:
By default, the container will install the latest fabric server launcher, using the latest fabric-loader against the minecraft version you have defined with VERSION (defaulting to the latest vanilla release of the game).
A specific loader or launcher version other than the latest can be requested using FABRIC_LOADER_VERSION and FABRIC_LAUNCHER_VERSION respectively, such as:
Using launcher and loader versions
With docker run
docker run -d ... \
-e TYPE=FABRIC \
-e FABRIC_LAUNCHER_VERSION=0.10.2 \
-e FABRIC_LOADER_VERSION=0.13.1
In a compose file service:
The container fetches Fabric loader and game version metadata from the Fabric meta API. You can override the base URL with FABRIC_META_BASE_URL (default: https://meta.fabricmc.net), for example when using a mirror or custom meta endpoint.
Note
See the Working with mods and plugins section to set up Fabric mods and configuration.
Fabric API¶
As mentioned on the Fabric download page, most mods will require the Fabric API mod to be installed. That can be easily done by utilizing the Modrinth downloads feature, such as adding this to the environment of a compose file service:
Alternate launcher¶
If you wish to use an alternative launcher you can:
- Provide the path to a custom launcher jar available to the container with
FABRIC_LAUNCHER, relative to/data(such as-e FABRIC_LAUNCHER=fabric-server-custom.jar) - Provide the URL to a custom launcher jar with
FABRIC_LAUNCHER_URL(such as-e FABRIC_LAUNCHER_URL=http://HOST/fabric-server-custom.jar)
Force re-install¶
If the Fabric launcher jar becomes corrupted you can temporarily set FABRIC_FORCE_REINSTALL to "true" to have it re-installed on next startup.