Docker Companion

Docker Companion

Server and Docker are best friends now!

by
48 Downloads
fabricneoforgemanagementutility
Rent Server with this Mod

About this Mod

This mod makes dedicated server more friendly for docker usecases, allowing easily create isolated server setup within seconds without using bloated third-party images and pieces of software.

It can:

  • auto-op players from SERVER_OPERATORS env varibale
  • handles process signals correctly and gracefully shut-down server process
example Dockerfile

Note, entrypoint must exec java binary in order to handle signals properly and have nice graceful shutdown.

FROM eclipse-temurin:25-jre-alpine-3.23 AS server-build
RUN mkdir /server && apk update && apk add wget
WORKDIR /server
RUN wget -O /installer.jar https://maven.neoforged.net/releases/net/neoforged/neoforge/21.1.217/neoforge-21.1.217-installer.jar
RUN java -jar /installer.jar --installServer
RUN echo "eula=true" > eula.txt

FROM eclipse-temurin:25-jre-alpine-3.23
COPY --from=server-build /server /server

RUN cat <<'EOF' > /server/entrypoint.sh
#/usr/bin/env sh
set -e

USER_ID=${USER_ID:-1000}
GROUP_ID=${GROUP_ID:-1000}
USERNAME=${USERNAME:-appuser}

if ! getent group "$GROUP_ID" >/dev/null 2>&1; then
    addgroup -g "$GROUP_ID" "$USERNAME"
fi

if ! id -u "$USER_ID" >/dev/null 2>&1; then
    adduser -D -u "$USER_ID" -G "$USERNAME" -s /bin/bash "$USERNAME"
fi

echo "$SERVER_JAVA_OPTS" > user_jvm_args.txt
chown -R "$USER_ID":"$GROUP_ID" .
exec su-exec "$USERNAME" sh -c 'exec java @user_jvm_args.txt @libraries/net/neoforged/neoforge/21.1.217/unix_args.txt'
EOF

RUN chmod +x /server/entrypoint.sh
RUN apk add --no-cache su-exec
WORKDIR /server
CMD ["/server/entrypoint.sh"]
example docker-compose.yml
services:
  minecraft-server:
    build: ./container
    container_name: minecraft-server
    stdin_open: true
    tty: true
    ports:
      - "25565:25565"
    volumes:
      - ./data/mods:/server/mods
      - ./data/world:/server/world
    environment:
      SERVER_JAVA_OPTS: |2
        -Xms2G
        -Xmx10G
        -XX:+UseZGC
        -XX:+ZGenerational 
        -XX:+AlwaysPreTouch 
        -XX:+UseStringDeduplication
      SERVER_OPERATORS: |2
        op-player-uuid
        another-op-player-uuid
      SERVER_PROPERTIES: |2
        max-players=20
        motd=Welcome to the Minecraft Server!
        online-mode=false
        difficulty=normal
        gamemode=survival
        spawn-monsters=true
        view-distance=10
        white-list=false
        pvp=true
        generate-structures=true
        max-world-size=29999984
        enable-query=false
        enable-rcon=false
        enable-status=false
    restart: unless-stopped

Available Versions

1.1.1release
MC 1.21.1neoforge
January 8, 2026
1.1.1release
MC 1.21.1fabric
January 8, 2026

How to Install Docker Companion on Your Server

1

Order Server

Order a Minecraft Java server with at least 3 GB RAM (4 GB recommended).

2

Set fabric Loader

In the panel under "Egg", select the fabric loader and matching Minecraft version (1.21.1).

3

Install Mod

Open the mod browser in the dashboard and search for "Docker Companion". Click "Install" – done! Alternatively, upload the .jar via SFTP to the /mods folder.

Compatibility

Mod Loaders

fabricneoforge

Minecraft Versions

1.21.1

Server-side

Required

Recommended RAM

4 GB(min. 3 GB)

Frequently Asked Questions

Docker Companion server crashes on startup – what to do?

Most common cause: wrong fabric version or insufficient RAM. Check the server log (latest.log) for "OutOfMemoryError" or "Mixin" errors. With Mado Hosting: ensure at least 3 GB RAM is allocated and the loader matches the mod version (1.21.1). You can switch loaders with one click in the panel.

Is Docker Companion compatible with fabric and neoforge?

Docker Companion officially supports fabric, neoforge for Minecraft 1.21.1. The Mado dashboard automatically detects incompatible loader combinations.

Server lagging with Docker Companion – how to optimize performance?

Recommended RAM: 4 GB (per 8 players). Use /spark profiler to check if Docker Companion consumes the most tick time. Common fixes: reduce server view-distance to 8-10, install "performant" or "starlight" as supplementary mods on Forge. With Mado Hosting, your server runs on NVMe SSDs with dedicated CPU cores for minimal latency.

Rent Modded Server

Install Docker Companion with just one click on your server.

Recommended RAM
4 GBab €8/mo
Min. 3 GB | +1 GB pro 8 Spieler
Create Server Now
1-Click Mod Install
NVMe SSD Storage
DDoS Protection included

Details

License
MIT License
Server-side
Required

Supported Versions

1.21.1