Minecraft Server
Docker image that provides a Minecraft Server for Java Edition that automatically installs/upgrades versions, modloaders, modpacks and more at startup.
Setting up
Section titled “Setting up”minecraft_server_enabled: trueThis will set up a Vanialla server with default settings. To install mods, see the configuration options below.
By default, Minecraft Server can be accessed at http://[your_server_ip]:25565 or https://minecraft_server.[your_domain].com if you have DNS access configured.
Configuration
Section titled “Configuration”This docker container supports running many different kinds of minecraft servers including modded servers using Forge, Fabric, Spigot, Paper, and more. See the documentation for all kinds of configuration options:
- https://docker-minecraft-server.readthedocs.io/en/latest/variables/
- https://docker-minecraft-server.readthedocs.io/en/latest/configuration/auto-rcon-commands/
- https://docker-minecraft-server.readthedocs.io/en/latest/mods-and-plugins/ Also look at the examples configurations: https://github.com/itzg/docker-minecraft-server/tree/master/examples
For example, to run a Fabric server ready to be modded, you can set the following options:
minecraft_server_enabled: trueminecraft_server_type: FABRICminecraft_server_version: 1.21.4minecraft_server_extra_env_vars: MODRINTH_PROJECTS: | # `fabric-api` is required for most Fabric mods fabric-apiOr, to run a Feed The Beast (FTB) modpack server:
minecraft_server_enabled: trueminecraft_server_type: FTBAminecraft_server_extra_env_vars: FTB_MODPACK_ID: "119" # Use Pack ID from https://www.feed-the-beast.com/modpacks/119-ftb-presents-direwolf20-120?tab=about # FTB_MODPACK_VERSION_ID: "" MOTD: | An FTB server running %MODPACK_NAME% version %MODPACK_VERSION%See the default configuration options for Minecraft Server at roles/minecraft_server/defaults/main.yml.
Add any overrides to your inventories/[your_inventory]/group_vars/homelab.yml file.
Interacting with the server
Section titled “Interacting with the server”RCON is enabled by default. You can connect to the server console through the docker container:
docker exec -i minecraft_server rcon-cli