This is a image to run fabric minecraft server
86
This Docker repository provides a pre-configured environment for creating and managing Minecraft servers using the forge modloader. forge is a lightweight and modular modding toolchain that allows you to customize your Minecraft experience. This Docker setup simplifies the process of setting up a forge server by automating many of the required steps.
First, pull the Docker image from the repository:
docker pull xblaxk/minecraft_forge:minecraft-version
Replace minecraft-version with the desired Minecraft version tag.
To create and run the container with a mounted volume and memory limits, use the following command:
docker run -d \
-p 25565:25565 \
-p 25575:25575 \
-v MyforgeServer:/minecraft_server \
-e JAVA_MIN_HEAP_MB=256 \
-e JAVA_PERCENTAGE_MAX_HEAP=90 \
--memory="8g" \
--name forge-minecraft-server \
xblaxk/minecraft_forge:minecraft-version
-d: Runs the container in detached mode.-p 25565:25565: Maps the Minecraft server port to the host.-p 25575:25575: Maps the RCON port to the host, allowing remote server management.-v MyforgeServer1.20.1:/minecraft_server: Creates a Docker volume named MyforgeServer1.20.1 and mounts it to /minecraft_server inside the container. This volume will store all server data persistently.-e SERVER_NAME="MyforgeServer": Sets the server name.-e JAVA_MIN_HEAP_MB=256: Sets the minimum heap size for the JVM to 256 MB. Default: 256-e JAVA_PERCENTAGE_MAX_HEAP=90: Sets the maximum heap size for the JVM as 90% of the total container memory. You can adjust this value as needed. Default 90%--memory="2g": Limits the maximum amount of RAM the container can use to 2 GB. Adjust this value based on your server's available resources.--name forge-minecraft-server: Names the Docker container.After running the container, your Minecraft server should be accessible via localhost:25565 (or replace localhost with your server's IP address if running on a remote machine). You can manage the server remotely using RCON on localhost:25575.
To add mods to your forge server, simply place the .jar files into the /minecraft_server/mods directory inside the container. If you're working from the host machine:
docker cp /path/to/mods/your-mod.jar forge-minecraft-server:/minecraft_server/mods/
These mods will be automatically loaded the next time you start the server.
To enable RCON, follow these steps:
Locate the server.properties File: The server.properties file is located in the /minecraft_server directory inside the container. You can access it by running:
docker exec -it forge-minecraft-server vi /minecraft_server/server.properties
Edit the server.properties File: Open the file and configure the following settings:
rcon.port=25575
rcon.password=your_secure_password
enable-rcon=true
rcon.port: The port RCON will use (default 25575).rcon.password: Set a secure password for RCON access.enable-rcon: Set this to true to enable RCON.Save and Close the File: After editing, save the file and exit the editor.
Restart the Server: Restart the server for changes to take effect:
docker restart forge-minecraft-server
Connect via RCON: Use an RCON client to connect to your server using the IP address, RCON port (25575), and the password you set.
To stop the server, run:
docker stop forge-minecraft-server
To start the server again:
docker start forge-minecraft-server
To view server logs:
docker logs -f forge-minecraft-server
To update your server to a new Minecraft version, pull the appropriate image and recreate the container:
docker pull xblaxk/minecraft_forge:new-minecraft-version
docker stop forge-minecraft-server
docker rm forge-minecraft-server
docker run -d \
-p 25565:25565 \
-p 25575:25575 \
-v MyforgeServer:/minecraft_server \
-e JAVA_MIN_HEAP_MB=256 \
-e JAVA_PERCENTAGE_MAX_HEAP=90 \
--memory="8g" \
--name forge-minecraft-server \
xblaxk/minecraft_forge:minecraft-version
Contributions are welcome! Please fork the repository and submit a pull request if you have any improvements or bug fixes.
This project is licensed under the MIT License. See the LICENSE file for more details.
Content type
Image
Digest
sha256:f9ad4e210…
Size
259.6 MB
Last updated
over 1 year ago
docker pull xblaxk/minecraft_forge:1.20.1