Skip to content

ultxzero/minecraft-mod-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

Cobbleverse Server

Idioma / Language: Español · English


Español

Servidor de Minecraft Fabric 1.21.1 con el modpack Cobbleverse (Cobblemon). Corre en Docker usando la imagen itzg/minecraft-server, con backups automáticos y acceso remoto vía Playit.

Requisitos

  • Docker con Docker Compose v2

Inicio rápido

  1. Copia el archivo de variables de entorno y rellena los secretos:
cp .env.example .env
  1. Edita .env con tus valores (ver sección Configuración).

  2. Levanta el servidor:

docker compose up -d
  1. Verifica que todo esté corriendo:
docker compose ps
docker compose logs -f minecraft

Configuración

Todas las variables se gestionan desde el archivo .env. Nunca edites docker-compose.yml directamente para cambiar valores.

Secretos (obligatorios)

Variable Descripción
PLAYIT_SECRET Clave secreta del agente de Playit para acceso remoto
RCON_PASSWORD Contraseña de RCON del servidor (debe coincidir con server.properties)

Minecraft

Variable Por defecto Descripción
VERSION 1.21.1 Versión de Minecraft
TYPE MODRINTH Tipo de servidor
MODRINTH_PROJECT cobbleverse ID del modpack en Modrinth
MODRINTH_VERSION 1.7.2 Versión del modpack
MODRINTH_LOADER fabric Loader (fabric/forge/quilt)
MEMORY 6G Memoria mínima de la JVM
MAX_MEMORY 8G Memoria máxima de la JVM
MAX_PLAYERS 4 Límite de jugadores simultáneos
DIFFICULTY normal Dificultad del juego
VIEW_DISTANCE 8 Distancia de renderizado (chunks)
SIMULATION_DISTANCE 6 Distancia de simulación (chunks)
MOTD COBBLEVERSE Server Mensaje del servidor en la lista

Backup

Variable Por defecto Descripción
BACKUP_INTERVAL 24h Frecuencia de backups (ej: 6h, 12h, 24h)
PRUNE_BACKUPS_DAYS 7 Días de retención antes de borrar backups viejos
INITIAL_DELAY 2m Espera antes del primer backup al arrancar
RCON_HOST cobbleverse Nombre del contenedor del servidor (no cambiar)
RCON_PORT 25575 Puerto RCON (no cambiar)

Backups

El servicio cobbleverse-backup hace un save-all vía RCON antes de cada backup para garantizar datos consistentes, luego comprime el mundo en un archivo .tar.gz con timestamp dentro de ./backups/.

Restaurar un backup

  1. Para el servidor:
docker compose down
  1. Reemplaza el directorio del mundo con el backup:
rm -rf data/world
tar -xzf backups/<nombre-del-backup>.tar.gz -C data/
  1. Vuelve a levantar:
docker compose up -d

Usar otro modpack

Este servidor está configurado para Cobbleverse, pero puedes usarlo con cualquier modpack disponible en Modrinth. Solo cambia estas tres variables en tu .env:

MODRINTH_PROJECT=slug-del-modpack
MODRINTH_VERSION=version-del-modpack
MODRINTH_LOADER=fabric

El slug es el identificador del modpack en la URL de Modrinth. Por ejemplo, para https://modrinth.com/modpack/better-mc-fabric el slug es better-mc-fabric.

También verifica que la versión de Minecraft sea compatible y ajusta VERSION si es necesario.

Nota: Al cambiar de modpack el contenido de data/ quedará desactualizado. Es recomendable hacer un backup del mundo antes y limpiar la carpeta data/ para empezar desde cero con el nuevo modpack.

# Backup del mundo actual
cp -r data/world backups/world-$(date +%Y-%m-%d)

# Limpiar datos del servidor anterior
docker compose down
rm -rf data/

# Levantar con el nuevo modpack
docker compose up -d

Acceso remoto

El agente Playit permite conectarse al servidor sin abrir puertos en el router. Requiere una cuenta en playit.gg y la clave secreta configurada en .env.

Comandos útiles

# Levantar todo
docker compose up -d

# Ver logs en tiempo real
docker compose logs -f minecraft

# Ver logs del servicio de backup
docker compose logs -f backup

# Consola del servidor (salir con Ctrl+P, Ctrl+Q)
docker attach cobbleverse

# Detener todo
docker compose down

# Actualizar modpack (cambia MODRINTH_VERSION en .env y ejecuta)
docker compose up -d --force-recreate minecraft

English

Minecraft Fabric 1.21.1 server running the Cobbleverse modpack (Cobblemon). Runs in Docker using the itzg/minecraft-server image, with automatic backups and remote access via Playit.

Requirements

  • Docker with Docker Compose v2

Quick start

  1. Copy the environment file and fill in your secrets:
cp .env.example .env
  1. Edit .env with your values (see Configuration).

  2. Start the server:

docker compose up -d
  1. Verify everything is running:
docker compose ps
docker compose logs -f minecraft

Configuration

All variables are managed from the .env file. Never edit docker-compose.yml directly to change values.

Secrets (required)

Variable Description
PLAYIT_SECRET Secret key for the Playit agent (remote access)
RCON_PASSWORD RCON password (must match server.properties)

Minecraft

Variable Default Description
VERSION 1.21.1 Minecraft version
TYPE MODRINTH Server type
MODRINTH_PROJECT cobbleverse Modrinth modpack slug
MODRINTH_VERSION 1.7.2 Modpack version
MODRINTH_LOADER fabric Loader (fabric/forge/quilt)
MEMORY 6G Minimum JVM memory
MAX_MEMORY 8G Maximum JVM memory
MAX_PLAYERS 4 Maximum simultaneous players
DIFFICULTY normal Game difficulty
VIEW_DISTANCE 8 Render distance (chunks)
SIMULATION_DISTANCE 6 Simulation distance (chunks)
MOTD COBBLEVERSE Server Server list message

Backup

Variable Default Description
BACKUP_INTERVAL 24h Backup frequency (e.g. 6h, 12h, 24h)
PRUNE_BACKUPS_DAYS 7 Retention period before old backups are deleted
INITIAL_DELAY 2m Wait time before first backup on startup
RCON_HOST cobbleverse Server container name (do not change)
RCON_PORT 25575 RCON port (do not change)

Backups

The cobbleverse-backup service sends a save-all command via RCON before each backup to ensure data consistency, then compresses the world into a timestamped .tar.gz file inside ./backups/.

Restoring a backup

  1. Stop the server:
docker compose down
  1. Replace the world directory with the backup:
rm -rf data/world
tar -xzf backups/<backup-name>.tar.gz -C data/
  1. Start again:
docker compose up -d

Using a different modpack

This server is configured for Cobbleverse, but it works with any modpack available on Modrinth. Just change these three variables in your .env:

MODRINTH_PROJECT=modpack-slug
MODRINTH_VERSION=modpack-version
MODRINTH_LOADER=fabric

The slug is the modpack identifier in the Modrinth URL. For example, for https://modrinth.com/modpack/better-mc-fabric the slug is better-mc-fabric.

Also make sure the Minecraft version is compatible and adjust VERSION if needed.

Note: Switching modpacks will leave the data/ folder outdated. It is recommended to back up your world first and clear the data/ folder to start fresh with the new modpack.

# Back up the current world
cp -r data/world backups/world-$(date +%Y-%m-%d)

# Clear the previous server data
docker compose down
rm -rf data/

# Start with the new modpack
docker compose up -d

Remote access

The Playit agent allows players to connect without opening ports on the router. Requires a playit.gg account and the secret key set in .env.

Useful commands

# Start everything
docker compose up -d

# Stream logs in real time
docker compose logs -f minecraft

# Stream backup service logs
docker compose logs -f backup

# Server console (exit with Ctrl+P, Ctrl+Q)
docker attach cobbleverse

# Stop everything
docker compose down

# Update modpack (change MODRINTH_VERSION in .env, then run)
docker compose up -d --force-recreate minecraft

About

minecraft java server with docker and mods

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors