April 30, 2021

Docker Minecraft Java CurseForge RLCraft

I'm running 4 docker instances now and it needs alot of resources




---------------- curseforge/all-the-mods-6

docker run -d -it -v atm-volume:/data --name curseforge-atm \
      -p 192.168.1.11:25565:25565 \ 
      -e EULA=true \
      curseforge/all-the-mods-6
---------------- curseforge/rlcraft:2.8.2
docker run -d -it -v rlc-volume:/data --name curseforge-rlc \
      -p 192.168.1.99:25565:25565 \ 
      -e EULA=true \
      curseforge/rlcraft:2.8.2

Set them to autostart

  docker update --restart unless-stopped curseforge-atm

  docker update --restart unless-stopped curseforge-rlc

References

GitHub - curseforge-docker/modpack-servers: Project for building CurseForge minecraft modpack servers as docker images

---------------- Trying and failing using itgz/minecraft-server

PARAMETERS:  From what I was able to test, the default 1GB of RAM that is allocated won't be enough.  Recommend allocating 3 to 4GB's of RAM.  You can do this by going to Launch Options, enabling JVM Arguments, and changing "-Xmx1G" to "-Xmx4G".  My JVM Arguments looks like this:

-Xmx4G -XX:+UseConcMarkSweepGC -XX:+CMSIncrementalMode -XX:-UseAdaptiveSizePolicy -Xmn128M

apt install openjdk-8-jre-headless

docker run -d -it -v cf-volume:/data \
    -p 192.168.1.11:25565:25565 \
    -e EULA=TRUE \
    -e VERSION=1.12.2 \
    -e MEMORY=2G \
    -e TYPE=CURSEFORGE \
    -e CF_SERVER_MOD=RLCraft_Server.zip \
    --name minecraft-cf itzg/minecraft-server:java8-multiarch
    -e MANIFEST=/data/FeedTheBeast/manifest.json \
java8-multiarch

in folder /cf-volume/_data/FeedTheBeast

wget https://raw.githubusercontent.com/AllTheMods/Server-Scripts/master/ServerStart.sh 

wget https://raw.githubusercontent.com/AllTheMods/Server-Scripts/master/settings.cfg 

 

references

https://www.curseforge.com/minecraft/modpacks/rlcraft

https://www.curseforge.com/minecraft/modpacks/rlcraft/files/2935316

https://github.com/itzg/docker-minecraft-server/issues/392



April 29, 2021

Docker IPTABLES Rules

Really hard to lockdown docker instances, this is the easiest way I have found.

Permit access from LAN networks and individual IP's externally

ipset -N minecraft iphash

ipset -A minecraft 192.168.1.0/24

ipset -A minecraft 172.16.0.0/24

ipset -A minecraft 125.238.106.4 # Daniel

iptables -I DOCKER-USER -p tcp --dport 25565 -m set ! --match-set minecraft src -j DROP

iptables -I DOCKER-USER -p udp --dport 19132 -m set ! --match-set minecraft src -j DROP

This is all added to a script that runs when the interfaces come up.

iptables -L DOCKER-USER

ipset list minecraft

References:

    https://wiki.archlinux.org/index.php/Ipset
    https://vmalli.com/managing-custom-iptables-rules-on-a-debian-docker-host/

April 25, 2021

Proxmox setup notes, VM Import from ESXi6.7U2

 

Enable jumbo frames.

    Edit /etc/network/interfaces

        add "mtu 9000" to each interface


Configure APT to use the "No-Subscription" repository

    https://pve.proxmox.com/wiki/Package_Repositories#sysadmin_no_subscription_repo

Import VMWare VM's:

    https://pve.proxmox.com/wiki/Migration_of_servers_to_Proxmox_VE#VMware_Converter

    download ovftool from vmware.com

    https://my.vmware.com/group/vmware/downloads/get-download?downloadGroup=OVFTOOL440

    shutdown the VM on esx

    run the following command to create the OVF package in the current directory

        ovftool "vi://esxdell.wjw.local/Windows 10 - Minecraft" .

    wait for a while.... 1:45-

Import the OVF into ProxMox

qm importovf 200 Windows\ 10\ -\ Minecraft/Windows\ 10\ -\ Minecraft.ovf PVE-NFS15


Docker Minecraft Servers Java & Bedrock

Bedrock Edition

https://hub.docker.com/r/itzg/minecraft-bedrock-server 

docker run -d -it --name minecraft-sa -e EULA=TRUE -p 192.168.1.68:19132:19132/udp -v sa-volume:/data itzg/minecraft-bedrock-server

Java Edition

https://github.com/itzg/docker-minecraft-server/blob/master/README.md

docker run -d -it --name minecraft-jv -e EULA=TRUE -p 192.168.1.68:25565:25565 -v mj-volume:/data itzg/minecraft-server:java16

Docker Commands

Access Console

  • docker attach minecraft-jv
  • - Control-p Control-q to detach

Check network ports in use in container

    • docker inspect -f '{{.State.Pid}}' minecraft-jv
    • nsenter -t 5549 -n netstat

Servers

  • Aidan - Java - 192.168.1.68:25565
  • Aidan - Bedrock - Survival - 192.168.1.68:19132


Backup Script

# Stop the Minecraft Server nicely
echo 'stop' | socat EXEC:"docker attach minecraft-sa",pty STDIN
# Backup the minecraft data
/media/nas-backup/scripts/backup-folder -n minecraft-sa-weekly -f "/var/snap/docker/common/var-lib-docker/volumes/sa-volume"
# Restart the container
docker start minecraft-sa