Skip to content

craftorio/docker-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

19 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿš€ Docker Minecraft Server

Build Multi-Arch Images GitHub Container Registry License Docker

๐Ÿณ Multi-architecture Docker images for Minecraft servers with Forge and Arclight support


โœจ Features

  • ๐Ÿ—๏ธ Multi-platform support: AMD64 & ARM64
  • โšก Optimized performance with built-in caching
  • ๐Ÿ”ง Multiple Minecraft versions (Forge + Arclight)
  • ๐Ÿ”„ Automatic builds via GitHub Actions
  • ๐Ÿ“ฆ Published to GitHub Container Registry
  • ๐Ÿ›ก๏ธ Production-ready configurations
  • ๐ŸŽฏ Resource packs & Data packs: Built-in support for Minecraft resource packs, data packs, and mod-specific packs (Flan's Mod & TaCZ)

๐ŸŽฎ Supported Versions

Version Type Java Minecraft Forge Arclight
1.12.2-forge-14.23.5.2860 Forge 8 1.12.2 14.23.5.2860 -
1.18.2-arclight-1.0.12-forge-40.2.14 Arclight 17 1.18.2 40.2.14 1.0.12
1.19.2-arclight-1.0.6-forge-43.4.4 Arclight 17 1.19.2 43.4.4 1.0.6
1.19.4-arclight-1.0.8-forge-45.2.6 Arclight 17 1.19.4 45.2.6 1.0.8

๐Ÿš€ Quick Start

1. ๐Ÿ“ Prepare Server Directory

# Create server directory
mkdir ~/my-minecraft-server && cd ~/my-minecraft-server

# Create required directories
mkdir -p worlds dynmap mods logs plugins config config-server Flan tacz resourcepacks datapacks

# Set permissions (Linux/macOS)
chown -R 1000:1000 .

2. ๐ŸŽฏ Run Server

docker run -d \
  --name minecraft-server \
  --restart unless-stopped \
  -e JVM_MEMORY_MAX=4096M \
  -p 25565:25565 \
  -v ${PWD}/worlds:/opt/craftorio/worlds \
  -v ${PWD}/mods:/opt/craftorio/mods \
  -v ${PWD}/logs:/opt/craftorio/logs \
  -v ${PWD}/plugins:/opt/craftorio/plugins \
  -v ${PWD}/config:/opt/craftorio/config \
  -v ${PWD}/config-server:/opt/craftorio/config-server \
  -v ${PWD}/Flan:/opt/craftorio/Flan \
  -v ${PWD}/tacz:/opt/craftorio/tacz \
  -v ${PWD}/resourcepacks:/opt/craftorio/resourcepacks \
  -v ${PWD}/datapacks:/opt/craftorio/datapacks \
  ghcr.io/craftorio/docker-server-minecraft:1.19.4-arclight-1.0.8-forge-45.2.6

3. ๐Ÿ“Š Monitor Server

# View logs
docker logs -f minecraft-server

# Connect to Minecraft console (recommended)
docker exec -it minecraft-server screen -r

# Access server bash shell
docker exec -it minecraft-server bash

# Stop server
docker stop minecraft-server

๐Ÿ’ก Tip: Use docker exec -it minecraft-server screen -r to connect directly to the Minecraft server console where you can run server commands like /op, /whitelist, /say, etc. Press Ctrl+A then Ctrl+D to detach from console without stopping the server.

๐ŸŽจ Resource Packs & Data Packs

๐Ÿ“ฆ Resource Packs

Place your custom resource packs in the resourcepacks/ folder to:

  • Change textures, sounds, and models
  • Customize UI elements and fonts
  • Add custom music and sound effects

๐Ÿ“Š Data Packs

Place your data packs in the datapacks/ folder to:

  • Add custom recipes and loot tables
  • Create custom dimensions and biomes
  • Implement custom game mechanics
  • Add new structures and features

๐Ÿ”ง Mod-Specific Packs

  • Flan/: Resource packs for Flan's Mod vehicles and weapons
  • tacz/: Resource packs for TaCZ (Timeless and Classics Zero) mod

๐Ÿ’ก Tip: Resource packs are applied client-side, while data packs affect server-side gameplay. Both are automatically loaded when placed in their respective folders.

๐Ÿ”ง Environment Variables

Variable Default Description
JVM_MEMORY_MAX 2048M Maximum JVM heap size
JVM_MEMORY_MIN 1024M Minimum JVM heap size
MC_AUTH_SERVER auth.craftorio.com Authentication server
MC_AUTH_SESSION_SERVER sessionserver.craftorio.com Session server

๐Ÿณ Docker Compose

Create docker-compose.yml:

version: '3.8'

services:
  minecraft:
    image: ghcr.io/craftorio/docker-server-minecraft:1.19.4-arclight-1.0.8-forge-45.2.6
    container_name: minecraft-server
    restart: unless-stopped
    ports:
      - "25565:25565"
    environment:
      - JVM_MEMORY_MAX=4096M
      - JVM_MEMORY_MIN=2048M
    volumes:
      - ./worlds:/opt/craftorio/worlds
      - ./mods:/opt/craftorio/mods
      - ./logs:/opt/craftorio/logs
      - ./plugins:/opt/craftorio/plugins
      - ./config:/opt/craftorio/config
      - ./config-server:/opt/craftorio/config-server
      - ./Flan:/opt/craftorio/Flan
      - ./tacz:/opt/craftorio/tacz
      - ./resourcepacks:/opt/craftorio/resourcepacks
      - ./datapacks:/opt/craftorio/datapacks
    stdin_open: true
    tty: true

Run with:

docker-compose up -d

๐Ÿ› ๏ธ Building Images Locally

Prerequisites

  • Docker with Buildx support
  • Multi-platform build capability

Build specific version:

./build.sh 1.19.4-arclight-1.0.8-forge-45.2.6

Build all versions:

./build.sh

Push to registry:

PUSH=1 ./build.sh

๐Ÿ” Troubleshooting

Server won't start

  • Check memory allocation: docker logs minecraft-server
  • Verify port availability: netstat -tulpn | grep 25565
  • Ensure proper file permissions

Performance issues

  • Increase memory: -e JVM_MEMORY_MAX=8192M
  • Use SSD storage for volumes
  • Monitor with: docker stats minecraft-server

Connection problems

  • Check firewall settings
  • Verify port mapping: -p 25565:25565
  • Test with: telnet localhost 25565

๐Ÿ“ Volume Structure

๐Ÿ“‚ Server Directory/
โ”œโ”€โ”€ ๐ŸŒ worlds/         # World saves
โ”œโ”€โ”€ ๐Ÿ—บ๏ธ dynmap/         # Dynmap web files
โ”œโ”€โ”€ ๐Ÿ“ฆ mods/           # Forge mods
โ”œโ”€โ”€ ๐Ÿ“ logs/           # Server logs
โ”œโ”€โ”€ ๐Ÿ”Œ plugins/        # Bukkit/Spigot plugins
โ”œโ”€โ”€ โš™๏ธ config/         # Configuration files
โ”œโ”€โ”€ ๐Ÿ”ง config-server/  # Server-specific configs
โ”œโ”€โ”€ ๐ŸŽฏ Flan/           # Flan's Mod resource packs
โ”œโ”€โ”€ ๐Ÿ”ซ tacz/           # TaCZ mod resource packs
โ”œโ”€โ”€ ๐ŸŽจ resourcepacks/  # Minecraft resource packs
โ””โ”€โ”€ ๐Ÿ“Š datapacks/      # Minecraft data packs

๐Ÿค Contributing

  1. Fork the repository
  2. Create feature branch: git checkout -b feature/amazing-feature
  3. Commit changes: git commit -m 'Add amazing feature'
  4. Push to branch: git push origin feature/amazing-feature
  5. Open Pull Request

๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

๐Ÿ”— Links


Made with โค๏ธ by Craftorio

Happy Mining! โ›๏ธ

About

Craftorio MC Server

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages