diff options
Diffstat (limited to '')
| -rw-r--r-- | .gitignore | 32 | ||||
| -rw-r--r-- | LICENSE | 7 | ||||
| -rw-r--r-- | README.md | 103 | ||||
| -rw-r--r-- | compose.yml | 109 | ||||
| -rw-r--r-- | data/bukkit.yml | 32 | ||||
| -rw-r--r-- | data/commands.yml | 15 | ||||
| -rw-r--r-- | data/config/paper-global.yml | 133 | ||||
| -rw-r--r-- | data/config/paper-world-defaults.yml | 305 | ||||
| -rw-r--r-- | data/spigot.yml | 170 | ||||
| -rw-r--r-- | mc-cmd.sh | 35 |
10 files changed, 941 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b4c30e9 --- /dev/null +++ b/.gitignore | |||
| @@ -0,0 +1,32 @@ | |||
| 1 | # === Minecraft runtime === | ||
| 2 | data/world*/ | ||
| 3 | data/logs/ | ||
| 4 | data/plugins/ | ||
| 5 | data/libraries/ | ||
| 6 | data/versions/ | ||
| 7 | data/help.yml | ||
| 8 | data/version_history.json | ||
| 9 | |||
| 10 | data/server.properties | ||
| 11 | backups/ | ||
| 12 | |||
| 13 | # === Player / admin PII === | ||
| 14 | data/ops.json | ||
| 15 | data/whitelist.json | ||
| 16 | data/banned-players.json | ||
| 17 | data/banned-ips.json | ||
| 18 | data/usercache.json | ||
| 19 | |||
| 20 | data/help.json | ||
| 21 | data/permissions.yml | ||
| 22 | |||
| 23 | # === Generated metadata === | ||
| 24 | data/.papermc-manifest.json | ||
| 25 | data/eula.txt | ||
| 26 | commands.log | ||
| 27 | |||
| 28 | # === Secrets === | ||
| 29 | *.env | ||
| 30 | |||
| 31 | # === Executables === | ||
| 32 | *.jar | ||
| @@ -0,0 +1,7 @@ | |||
| 1 | Copyright (c) 2026 Filip Wandzio <contact@philw.dev> | ||
| 2 | |||
| 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | ||
| 4 | |||
| 5 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | ||
| 6 | |||
| 7 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
diff --git a/README.md b/README.md new file mode 100644 index 0000000..79a883a --- /dev/null +++ b/README.md | |||
| @@ -0,0 +1,103 @@ | |||
| 1 | # Minecraft Multi-Server Docker Setup | ||
| 2 | |||
| 3 | ## Overview | ||
| 4 | |||
| 5 | This setup allows you to run one or more vanilla Minecraft servers on a single VPS using Docker Compose. Features include: | ||
| 6 | |||
| 7 | * Fully `.env`-driven configuration. | ||
| 8 | * Automated backups with timestamped filenames and retention. | ||
| 9 | * Server-specific logs. | ||
| 10 | * Resource limits (CPU/memory) per server. | ||
| 11 | * Security hardening: non-root execution, read-only root filesystem, dropped capabilities. | ||
| 12 | * Internal-only RCON. | ||
| 13 | * Multi-server friendly. | ||
| 14 | |||
| 15 | ## Folder Structure | ||
| 16 | |||
| 17 | ``` | ||
| 18 | /opt/docker/minecraft/ | ||
| 19 | ├─ server1/ | ||
| 20 | │ ├─ docker-compose.yml | ||
| 21 | │ └─ .env | ||
| 22 | ├─ server2/ | ||
| 23 | │ ├─ docker-compose.yml | ||
| 24 | │ └─ .env | ||
| 25 | └─ shared/ | ||
| 26 | └─ (optional shared resources) | ||
| 27 | ``` | ||
| 28 | |||
| 29 | ## .env Configuration Example | ||
| 30 | |||
| 31 | ``` | ||
| 32 | # Server identity | ||
| 33 | SERVER_NAME=server1 | ||
| 34 | MC_IMAGE=itzg/minecraft-server | ||
| 35 | BACKUP_IMAGE=alpine:latest | ||
| 36 | |||
| 37 | # Ports | ||
| 38 | SERVER_PORT=25565 | ||
| 39 | MC_INTERNAL_PORT=25565 | ||
| 40 | RCON_PORT=25575 | ||
| 41 | |||
| 42 | # Paths | ||
| 43 | DATA_PATH=/opt/docker/minecraft/server1/data | ||
| 44 | BACKUP_PATH=/opt/docker/minecraft/server1/backups | ||
| 45 | TMPFS_PATH=/tmp | ||
| 46 | |||
| 47 | # Minecraft settings | ||
| 48 | MC_VERSION=latest | ||
| 49 | MC_MEMORY=2G | ||
| 50 | MC_EULA=TRUE | ||
| 51 | ENABLE_RCON=true | ||
| 52 | RCON_PASSWORD=StrongPasswordHere | ||
| 53 | MC_UID=1000 | ||
| 54 | MC_GID=1000 | ||
| 55 | |||
| 56 | # Backup settings | ||
| 57 | BACKUP_INTERVAL=86400 | ||
| 58 | MAX_BACKUPS=3 | ||
| 59 | BACKUP_LOG_PREFIX=server1 | ||
| 60 | |||
| 61 | # Security options | ||
| 62 | READ_ONLY=true | ||
| 63 | CAP_DROP=ALL | ||
| 64 | CAP_ADD=CHOWN,SETUID,SETGID | ||
| 65 | SECURITY_OPT=no-new-privileges:true | ||
| 66 | |||
| 67 | # Resource limits | ||
| 68 | MC_CPUS=1.5 | ||
| 69 | MC_MAX_MEMORY=3G | ||
| 70 | |||
| 71 | # Logging | ||
| 72 | LOG_DRIVER=json-file | ||
| 73 | LOG_MAX_SIZE=10m | ||
| 74 | LOG_MAX_FILE=5 | ||
| 75 | BACKUP_LOG_DRIVER=json-file | ||
| 76 | BACKUP_LOG_MAX_SIZE=5m | ||
| 77 | BACKUP_LOG_MAX_FILE=3 | ||
| 78 | |||
| 79 | # Network | ||
| 80 | NETWORK_NAME=mc_net | ||
| 81 | NETWORK_DRIVER=bridge | ||
| 82 | ``` | ||
| 83 | |||
| 84 | ## Backup Logging Example | ||
| 85 | |||
| 86 | ``` | ||
| 87 | [server1] Backup completed: /backups/server1_20251030_153045.tar.gz | ||
| 88 | [server2] Backup completed: /backups/server2_20251030_153046.tar.gz | ||
| 89 | ``` | ||
| 90 | |||
| 91 | ## Running Multiple Servers | ||
| 92 | |||
| 93 | ``` | ||
| 94 | cd /opt/docker/minecraft/sv1 | ||
| 95 | docker compose up -d | ||
| 96 | |||
| 97 | cd /opt/docker/minecraft/sv2 | ||
| 98 | docker compose up -d | ||
| 99 | ``` | ||
| 100 | |||
| 101 | ## References | ||
| 102 | |||
| 103 | * [Docker Minecraft image](https://hub.docker.com/r/itzg/minecraft-server) | ||
diff --git a/compose.yml b/compose.yml new file mode 100644 index 0000000..2aea7b0 --- /dev/null +++ b/compose.yml | |||
| @@ -0,0 +1,109 @@ | |||
| 1 | services: | ||
| 2 | init-dirs: | ||
| 3 | image: alpine:latest | ||
| 4 | container_name: "${SERVER_NAME}_init" | ||
| 5 | command: > | ||
| 6 | /bin/sh -c " | ||
| 7 | mkdir -p /data /backups && | ||
| 8 | chown -R ${MC_UID}:${MC_GID} /data /backups" | ||
| 9 | volumes: | ||
| 10 | - "${PWD}/${DATA_PATH}:/data" | ||
| 11 | - "${PWD}/${BACKUP_PATH}:/backups" | ||
| 12 | restart: "no" | ||
| 13 | |||
| 14 | minecraft: | ||
| 15 | image: "${MC_IMAGE}" | ||
| 16 | container_name: "${SERVER_NAME}_minecraft" | ||
| 17 | ports: | ||
| 18 | - "${SERVER_PORT}:${MC_INTERNAL_PORT}" | ||
| 19 | environment: | ||
| 20 | EULA: "${MC_EULA}" | ||
| 21 | TYPE: "${TYPE}" | ||
| 22 | ENABLE_WHITELIST: "${ENABLE_WHITELIST}" | ||
| 23 | ICON: "${ICON}" | ||
| 24 | OVERRIDE_ICON: "true" | ||
| 25 | USE_AIKAR_FLAGS: "true" | ||
| 26 | USE_MEOWICE_FLAGS: "true" | ||
| 27 | ENFORCE_WHITELIST: "${ENFORCE_WHITELIST}" | ||
| 28 | MEMORY: "${MC_MEMORY}" | ||
| 29 | VERSION: "${VERSION}" | ||
| 30 | PAPER_CHANNEL: "${PAPER_CHANNEL}" | ||
| 31 | ENABLE_RCON: "${ENABLE_RCON}" | ||
| 32 | RCON_PASSWORD: "${RCON_PASSWORD}" | ||
| 33 | RCON_PORT: "${RCON_PORT}" | ||
| 34 | UID: "${MC_UID}" | ||
| 35 | GID: "${MC_GID}" | ||
| 36 | NETTY_NATIVE_WORKDIR: /data/tmp | ||
| 37 | volumes: | ||
| 38 | - "${PWD}/${DATA_PATH}:/data" | ||
| 39 | restart: "${RESTART_POLICY}" | ||
| 40 | tmpfs: | ||
| 41 | - /tmp:exec | ||
| 42 | cap_drop: | ||
| 43 | - ALL | ||
| 44 | cap_add: | ||
| 45 | - CHOWN | ||
| 46 | - SETUID | ||
| 47 | - SETGID | ||
| 48 | security_opt: | ||
| 49 | - ${SECURITY_OPT} | ||
| 50 | networks: | ||
| 51 | - mc_net | ||
| 52 | logging: | ||
| 53 | driver: "${LOG_DRIVER}" | ||
| 54 | options: | ||
| 55 | max-size: "${LOG_MAX_SIZE}" | ||
| 56 | max-file: "${LOG_MAX_FILE}" | ||
| 57 | depends_on: | ||
| 58 | - init-dirs | ||
| 59 | |||
| 60 | backup: | ||
| 61 | image: "${BACKUP_IMAGE}" | ||
| 62 | container_name: "${SERVER_NAME}_backup" | ||
| 63 | depends_on: | ||
| 64 | - minecraft | ||
| 65 | - init-dirs | ||
| 66 | volumes: | ||
| 67 | - "${PWD}/${DATA_PATH}:/data" | ||
| 68 | - "${PWD}/${BACKUP_PATH}:/backups" | ||
| 69 | environment: | ||
| 70 | BACKUP_INTERVAL: "${BACKUP_INTERVAL}" | ||
| 71 | SERVER_NAME: "${SERVER_NAME}" | ||
| 72 | MAX_BACKUPS: "${MAX_BACKUPS}" | ||
| 73 | BACKUP_LOG_PREFIX: "${BACKUP_LOG_PREFIX}" | ||
| 74 | entrypoint: | | ||
| 75 | /bin/sh -c ' | ||
| 76 | : "${BACKUP_INTERVAL:?BACKUP_INTERVAL not set}" | ||
| 77 | : "${SERVER_NAME:?SERVER_NAME not set}" | ||
| 78 | : "${MAX_BACKUPS:?MAX_BACKUPS not set}" | ||
| 79 | |||
| 80 | while [ ! -d /data/world ] || [ -z "$(ls -A /data/world)" ]; do | ||
| 81 | echo "[${SERVER_NAME}] Waiting for world generation..." | ||
| 82 | sleep 5 | ||
| 83 | done | ||
| 84 | |||
| 85 | while true; do | ||
| 86 | TIMESTAMP=$$(date +%Y%m%d_%H%M%S) | ||
| 87 | BACKUP_FILE=/backups/${SERVER_NAME}_$$TIMESTAMP.tar.gz | ||
| 88 | if [ -d /data/world ] && [ "$(ls -A /data/world)" ]; then | ||
| 89 | tar -czf $$BACKUP_FILE -C /data . | ||
| 90 | echo "[${BACKUP_LOG_PREFIX:-${SERVER_NAME}}] Backup completed: $$BACKUP_FILE" | ||
| 91 | ls -1tr /backups/${SERVER_NAME}_*.tar.gz | head -n -${MAX_BACKUPS} | xargs -r rm -f | ||
| 92 | else | ||
| 93 | echo "[${SERVER_NAME}] World still empty, skipping backup" | ||
| 94 | fi | ||
| 95 | sleep ${BACKUP_INTERVAL} | ||
| 96 | done | ||
| 97 | ' | ||
| 98 | restart: "${RESTART_POLICY}" | ||
| 99 | networks: | ||
| 100 | - mc_net | ||
| 101 | logging: | ||
| 102 | driver: "${BACKUP_LOG_DRIVER}" | ||
| 103 | options: | ||
| 104 | max-size: "${BACKUP_LOG_MAX_SIZE}" | ||
| 105 | max-file: "${BACKUP_LOG_MAX_FILE}" | ||
| 106 | |||
| 107 | networks: | ||
| 108 | mc_net: | ||
| 109 | driver: bridge | ||
diff --git a/data/bukkit.yml b/data/bukkit.yml new file mode 100644 index 0000000..7693721 --- /dev/null +++ b/data/bukkit.yml | |||
| @@ -0,0 +1,32 @@ | |||
| 1 | settings: | ||
| 2 | allow-end: true | ||
| 3 | warn-on-overload: true | ||
| 4 | permissions-file: permissions.yml | ||
| 5 | update-folder: update | ||
| 6 | plugin-profiling: false | ||
| 7 | connection-throttle: 4000 | ||
| 8 | query-plugins: true | ||
| 9 | deprecated-verbose: default | ||
| 10 | shutdown-message: Server closed | ||
| 11 | minimum-api: none | ||
| 12 | use-map-color-cache: true | ||
| 13 | spawn-limits: | ||
| 14 | monsters: 70 | ||
| 15 | animals: 10 | ||
| 16 | water-animals: 5 | ||
| 17 | water-ambient: 20 | ||
| 18 | water-underground-creature: 5 | ||
| 19 | axolotls: 5 | ||
| 20 | ambient: 15 | ||
| 21 | chunk-gc: | ||
| 22 | period-in-ticks: 600 | ||
| 23 | ticks-per: | ||
| 24 | animal-spawns: 400 | ||
| 25 | monster-spawns: 1 | ||
| 26 | water-spawns: 1 | ||
| 27 | water-ambient-spawns: 1 | ||
| 28 | water-underground-creature-spawns: 1 | ||
| 29 | axolotl-spawns: 1 | ||
| 30 | ambient-spawns: 1 | ||
| 31 | autosave: 6000 | ||
| 32 | aliases: now-in-commands.yml | ||
diff --git a/data/commands.yml b/data/commands.yml new file mode 100644 index 0000000..368bd24 --- /dev/null +++ b/data/commands.yml | |||
| @@ -0,0 +1,15 @@ | |||
| 1 | # This is the Bukkit commands configuration file for Paper. | ||
| 2 | # | ||
| 3 | # If you need help with the configuration or have any questions related to Paper, | ||
| 4 | # join us in our Discord or check the docs page. | ||
| 5 | # | ||
| 6 | # File Reference: https://docs.papermc.io/paper/reference/bukkit-commands-configuration/ | ||
| 7 | # Docs: https://docs.papermc.io/ | ||
| 8 | # Discord: https://discord.gg/papermc | ||
| 9 | # Website: https://papermc.io/ | ||
| 10 | |||
| 11 | command-block-overrides: [] | ||
| 12 | ignore-vanilla-permissions: false | ||
| 13 | aliases: | ||
| 14 | icanhasbukkit: | ||
| 15 | - version $1- | ||
diff --git a/data/config/paper-global.yml b/data/config/paper-global.yml new file mode 100644 index 0000000..bdcce98 --- /dev/null +++ b/data/config/paper-global.yml | |||
| @@ -0,0 +1,133 @@ | |||
| 1 | _version: 31 | ||
| 2 | anticheat: | ||
| 3 | obfuscation: | ||
| 4 | items: | ||
| 5 | all-models: | ||
| 6 | also-obfuscate: [] | ||
| 7 | dont-obfuscate: | ||
| 8 | - minecraft:lodestone_tracker | ||
| 9 | sanitize-count: true | ||
| 10 | enable-item-obfuscation: false | ||
| 11 | model-overrides: | ||
| 12 | minecraft:elytra: | ||
| 13 | also-obfuscate: [] | ||
| 14 | dont-obfuscate: | ||
| 15 | - minecraft:damage | ||
| 16 | sanitize-count: true | ||
| 17 | block-updates: | ||
| 18 | disable-chorus-plant-updates: false | ||
| 19 | disable-mushroom-block-updates: false | ||
| 20 | disable-noteblock-updates: false | ||
| 21 | disable-tripwire-updates: false | ||
| 22 | chunk-loading-advanced: | ||
| 23 | auto-config-send-distance: true | ||
| 24 | player-max-concurrent-chunk-generates: 0 | ||
| 25 | player-max-concurrent-chunk-loads: 0 | ||
| 26 | chunk-loading-basic: | ||
| 27 | player-max-chunk-generate-rate: -1.0 | ||
| 28 | player-max-chunk-load-rate: 100.0 | ||
| 29 | player-max-chunk-send-rate: 75.0 | ||
| 30 | chunk-system: | ||
| 31 | io-threads: -1 | ||
| 32 | worker-threads: -1 | ||
| 33 | collisions: | ||
| 34 | enable-player-collisions: true | ||
| 35 | send-full-pos-for-hard-colliding-entities: true | ||
| 36 | commands: | ||
| 37 | ride-command-allow-player-as-vehicle: false | ||
| 38 | suggest-player-names-when-null-tab-completions: true | ||
| 39 | time-command-affects-all-worlds: false | ||
| 40 | console: | ||
| 41 | enable-brigadier-completions: true | ||
| 42 | enable-brigadier-highlighting: true | ||
| 43 | has-all-permissions: false | ||
| 44 | item-validation: | ||
| 45 | book: | ||
| 46 | author: 8192 | ||
| 47 | page: 16384 | ||
| 48 | title: 8192 | ||
| 49 | book-size: | ||
| 50 | page-max: 2560 | ||
| 51 | total-multiplier: 0.98 | ||
| 52 | display-name: 8192 | ||
| 53 | lore-line: 8192 | ||
| 54 | resolve-selectors-in-books: false | ||
| 55 | logging: | ||
| 56 | deobfuscate-stacktraces: true | ||
| 57 | messages: | ||
| 58 | kick: | ||
| 59 | authentication-servers-down: <lang:multiplayer.disconnect.authservers_down> | ||
| 60 | connection-throttle: Connection throttled! Please wait before reconnecting. | ||
| 61 | flying-player: <lang:multiplayer.disconnect.flying> | ||
| 62 | flying-vehicle: <lang:multiplayer.disconnect.flying> | ||
| 63 | no-permission: <red>I'm sorry, but you do not have permission to perform this command. | ||
| 64 | Please contact the server administrators if you believe that this is in error. | ||
| 65 | use-display-name-in-quit-message: false | ||
| 66 | misc: | ||
| 67 | chat-threads: | ||
| 68 | chat-executor-core-size: -1 | ||
| 69 | chat-executor-max-size: -1 | ||
| 70 | client-interaction-leniency-distance: default | ||
| 71 | compression-level: default | ||
| 72 | enable-nether: true | ||
| 73 | fix-far-end-terrain-generation: true | ||
| 74 | load-permissions-yml-before-plugins: true | ||
| 75 | max-joins-per-tick: 5 | ||
| 76 | prevent-negative-villager-demand: false | ||
| 77 | region-file-cache-size: 256 | ||
| 78 | send-full-pos-for-item-entities: false | ||
| 79 | strict-advancement-dimension-check: false | ||
| 80 | use-alternative-luck-formula: false | ||
| 81 | use-dimension-type-for-custom-spawners: false | ||
| 82 | xp-orb-groups-per-area: default | ||
| 83 | packet-limiter: | ||
| 84 | all-packets: | ||
| 85 | action: KICK | ||
| 86 | interval: 7.0 | ||
| 87 | max-packet-rate: 500.0 | ||
| 88 | kick-message: <red><lang:disconnect.exceeded_packet_rate> | ||
| 89 | overrides: | ||
| 90 | minecraft:place_recipe: | ||
| 91 | action: DROP | ||
| 92 | interval: 4.0 | ||
| 93 | max-packet-rate: 5.0 | ||
| 94 | player-auto-save: | ||
| 95 | max-per-tick: -1 | ||
| 96 | rate: -1 | ||
| 97 | proxies: | ||
| 98 | bungee-cord: | ||
| 99 | online-mode: true | ||
| 100 | proxy-protocol: false | ||
| 101 | velocity: | ||
| 102 | enabled: false | ||
| 103 | online-mode: true | ||
| 104 | secret: '' | ||
| 105 | scoreboards: | ||
| 106 | save-empty-scoreboard-teams: true | ||
| 107 | track-plugin-scoreboards: false | ||
| 108 | spam-limiter: | ||
| 109 | incoming-packet-threshold: 300 | ||
| 110 | recipe-spam-increment: 1 | ||
| 111 | recipe-spam-limit: 20 | ||
| 112 | tab-spam-increment: 1 | ||
| 113 | tab-spam-limit: 500 | ||
| 114 | spark: | ||
| 115 | enable-immediately: false | ||
| 116 | enabled: true | ||
| 117 | unsupported-settings: | ||
| 118 | allow-headless-pistons: false | ||
| 119 | allow-permanent-block-break-exploits: false | ||
| 120 | allow-piston-duplication: false | ||
| 121 | allow-unsafe-end-portal-teleportation: false | ||
| 122 | compression-format: ZLIB | ||
| 123 | oversized-item-component-sanitizer: | ||
| 124 | dont-sanitize: [] | ||
| 125 | perform-username-validation: true | ||
| 126 | skip-tripwire-hook-placement-validation: false | ||
| 127 | skip-vanilla-damage-tick-when-shield-blocked: false | ||
| 128 | update-equipment-on-player-actions: true | ||
| 129 | update-checker: | ||
| 130 | enabled: true | ||
| 131 | watchdog: | ||
| 132 | early-warning-delay: 10000 | ||
| 133 | early-warning-every: 5000 | ||
diff --git a/data/config/paper-world-defaults.yml b/data/config/paper-world-defaults.yml new file mode 100644 index 0000000..5171cf8 --- /dev/null +++ b/data/config/paper-world-defaults.yml | |||
| @@ -0,0 +1,305 @@ | |||
| 1 | _version: 31 | ||
| 2 | anticheat: | ||
| 3 | anti-xray: | ||
| 4 | enabled: false | ||
| 5 | engine-mode: 1 | ||
| 6 | hidden-blocks: | ||
| 7 | - copper_ore | ||
| 8 | - deepslate_copper_ore | ||
| 9 | - raw_copper_block | ||
| 10 | - gold_ore | ||
| 11 | - deepslate_gold_ore | ||
| 12 | - iron_ore | ||
| 13 | - deepslate_iron_ore | ||
| 14 | - raw_iron_block | ||
| 15 | - coal_ore | ||
| 16 | - deepslate_coal_ore | ||
| 17 | - lapis_ore | ||
| 18 | - deepslate_lapis_ore | ||
| 19 | - mossy_cobblestone | ||
| 20 | - obsidian | ||
| 21 | - chest | ||
| 22 | - diamond_ore | ||
| 23 | - deepslate_diamond_ore | ||
| 24 | - redstone_ore | ||
| 25 | - deepslate_redstone_ore | ||
| 26 | - clay | ||
| 27 | - emerald_ore | ||
| 28 | - deepslate_emerald_ore | ||
| 29 | - ender_chest | ||
| 30 | lava-obscures: false | ||
| 31 | max-block-height: 64 | ||
| 32 | replacement-blocks: | ||
| 33 | - stone | ||
| 34 | - oak_planks | ||
| 35 | - deepslate | ||
| 36 | update-radius: 2 | ||
| 37 | use-permission: false | ||
| 38 | chunks: | ||
| 39 | auto-save-interval: default | ||
| 40 | delay-chunk-unloads-by: 10s | ||
| 41 | entity-per-chunk-save-limit: | ||
| 42 | arrow: -1 | ||
| 43 | ender_pearl: -1 | ||
| 44 | experience_orb: -1 | ||
| 45 | fireball: -1 | ||
| 46 | small_fireball: -1 | ||
| 47 | snowball: -1 | ||
| 48 | fixed-chunk-inhabited-time: -1 | ||
| 49 | flush-regions-on-save: false | ||
| 50 | max-auto-save-chunks-per-tick: 24 | ||
| 51 | prevent-moving-into-unloaded-chunks: false | ||
| 52 | collisions: | ||
| 53 | allow-player-cramming-damage: false | ||
| 54 | allow-vehicle-collisions: true | ||
| 55 | fix-climbing-bypassing-cramming-rule: false | ||
| 56 | max-entity-collisions: 8 | ||
| 57 | only-players-collide: false | ||
| 58 | command-blocks: | ||
| 59 | force-follow-perm-level: true | ||
| 60 | permissions-level: 2 | ||
| 61 | entities: | ||
| 62 | armor-stands: | ||
| 63 | do-collision-entity-lookups: true | ||
| 64 | tick: true | ||
| 65 | behavior: | ||
| 66 | allow-spider-world-border-climbing: true | ||
| 67 | baby-zombie-movement-modifier: 0.5 | ||
| 68 | cooldown-failed-beehive-releases: true | ||
| 69 | disable-chest-cat-detection: false | ||
| 70 | disable-creeper-lingering-effect: false | ||
| 71 | disable-player-crits: false | ||
| 72 | door-breaking-difficulty: | ||
| 73 | husk: | ||
| 74 | - HARD | ||
| 75 | vindicator: | ||
| 76 | - NORMAL | ||
| 77 | - HARD | ||
| 78 | zombie: | ||
| 79 | - HARD | ||
| 80 | zombie_villager: | ||
| 81 | - HARD | ||
| 82 | zombified_piglin: | ||
| 83 | - HARD | ||
| 84 | ender-dragons-death-always-places-dragon-egg: false | ||
| 85 | experience-merge-max-value: -1 | ||
| 86 | mobs-can-always-pick-up-loot: | ||
| 87 | skeletons: false | ||
| 88 | zombies: false | ||
| 89 | nerf-pigmen-from-nether-portals: false | ||
| 90 | only-merge-items-horizontally: false | ||
| 91 | parrots-are-unaffected-by-player-movement: false | ||
| 92 | phantoms-do-not-spawn-on-creative-players: true | ||
| 93 | phantoms-only-attack-insomniacs: true | ||
| 94 | phantoms-spawn-attempt-max-seconds: 119 | ||
| 95 | phantoms-spawn-attempt-min-seconds: 60 | ||
| 96 | piglins-guard-chests: true | ||
| 97 | pillager-patrols: | ||
| 98 | disable: false | ||
| 99 | spawn-chance: 0.2 | ||
| 100 | spawn-delay: | ||
| 101 | per-player: false | ||
| 102 | ticks: 12000 | ||
| 103 | start: | ||
| 104 | day: 5 | ||
| 105 | per-player: false | ||
| 106 | player-insomnia-start-ticks: 72000 | ||
| 107 | should-remove-dragon: false | ||
| 108 | spawner-nerfed-mobs-should-jump: false | ||
| 109 | stuck-entity-poi-retry-delay: 200 | ||
| 110 | zombie-villager-infection-chance: default | ||
| 111 | zombies-target-turtle-eggs: true | ||
| 112 | markers: | ||
| 113 | tick: true | ||
| 114 | mob-effects: | ||
| 115 | immune-to-wither-effect: | ||
| 116 | wither: true | ||
| 117 | wither-skeleton: true | ||
| 118 | spiders-immune-to-poison-effect: true | ||
| 119 | sniffer: | ||
| 120 | boosted-hatch-time: default | ||
| 121 | hatch-time: default | ||
| 122 | spawning: | ||
| 123 | all-chunks-are-slime-chunks: false | ||
| 124 | alt-item-despawn-rate: | ||
| 125 | enabled: false | ||
| 126 | items: | ||
| 127 | cobblestone: 300 | ||
| 128 | count-all-mobs-for-spawning: false | ||
| 129 | creative-arrow-despawn-rate: default | ||
| 130 | despawn-range-shape: ELLIPSOID | ||
| 131 | despawn-ranges: | ||
| 132 | ambient: | ||
| 133 | hard: default | ||
| 134 | soft: default | ||
| 135 | axolotls: | ||
| 136 | hard: default | ||
| 137 | soft: default | ||
| 138 | creature: | ||
| 139 | hard: default | ||
| 140 | soft: default | ||
| 141 | misc: | ||
| 142 | hard: default | ||
| 143 | soft: default | ||
| 144 | monster: | ||
| 145 | hard: default | ||
| 146 | soft: default | ||
| 147 | underground_water_creature: | ||
| 148 | hard: default | ||
| 149 | soft: default | ||
| 150 | water_ambient: | ||
| 151 | hard: default | ||
| 152 | soft: default | ||
| 153 | water_creature: | ||
| 154 | hard: default | ||
| 155 | soft: default | ||
| 156 | despawn-time: | ||
| 157 | llama_spit: disabled | ||
| 158 | snowball: disabled | ||
| 159 | disable-mob-spawner-spawn-egg-transformation: false | ||
| 160 | duplicate-uuid: | ||
| 161 | mode: SAFE_REGEN | ||
| 162 | safe-regen-delete-range: 32 | ||
| 163 | filter-bad-tile-entity-nbt-from-falling-blocks: true | ||
| 164 | filtered-entity-tag-nbt-paths: | ||
| 165 | - Pos | ||
| 166 | - Motion | ||
| 167 | - sleeping_pos | ||
| 168 | iron-golems-can-spawn-in-air: false | ||
| 169 | max-arrow-despawn-invulnerability: 200 | ||
| 170 | monster-spawn-max-light-level: default | ||
| 171 | non-player-arrow-despawn-rate: default | ||
| 172 | per-player-mob-spawns: true | ||
| 173 | scan-for-legacy-ender-dragon: true | ||
| 174 | skeleton-horse-thunder-spawn-chance: default | ||
| 175 | slime-spawn-height: | ||
| 176 | slime-chunk: | ||
| 177 | maximum: 40.0 | ||
| 178 | surface-biome: | ||
| 179 | maximum: 70.0 | ||
| 180 | minimum: 50.0 | ||
| 181 | spawn-limits: | ||
| 182 | ambient: -1 | ||
| 183 | axolotls: -1 | ||
| 184 | creature: -1 | ||
| 185 | monster: -1 | ||
| 186 | underground_water_creature: -1 | ||
| 187 | water_ambient: -1 | ||
| 188 | water_creature: -1 | ||
| 189 | ticks-per-spawn: | ||
| 190 | ambient: -1 | ||
| 191 | axolotls: -1 | ||
| 192 | creature: -1 | ||
| 193 | monster: -1 | ||
| 194 | underground_water_creature: -1 | ||
| 195 | water_ambient: -1 | ||
| 196 | water_creature: -1 | ||
| 197 | wandering-trader: | ||
| 198 | spawn-chance-failure-increment: 25 | ||
| 199 | spawn-chance-max: 75 | ||
| 200 | spawn-chance-min: 25 | ||
| 201 | spawn-day-length: 24000 | ||
| 202 | spawn-minute-length: 1200 | ||
| 203 | wateranimal-spawn-height: | ||
| 204 | maximum: default | ||
| 205 | minimum: default | ||
| 206 | tracking-range-y: | ||
| 207 | animal: default | ||
| 208 | display: default | ||
| 209 | enabled: false | ||
| 210 | misc: default | ||
| 211 | monster: default | ||
| 212 | other: default | ||
| 213 | player: default | ||
| 214 | environment: | ||
| 215 | disable-explosion-knockback: false | ||
| 216 | disable-ice-and-snow: false | ||
| 217 | disable-thunder: false | ||
| 218 | fire-tick-delay: 30 | ||
| 219 | frosted-ice: | ||
| 220 | delay: | ||
| 221 | max: 40 | ||
| 222 | min: 20 | ||
| 223 | enabled: true | ||
| 224 | generate-flat-bedrock: false | ||
| 225 | locate-structures-outside-world-border: false | ||
| 226 | max-block-ticks: 65536 | ||
| 227 | max-fluid-ticks: 65536 | ||
| 228 | nether-ceiling-void-damage-height: disabled | ||
| 229 | optimize-explosions: false | ||
| 230 | portal-create-radius: 16 | ||
| 231 | portal-search-radius: 128 | ||
| 232 | portal-search-vanilla-dimension-scaling: true | ||
| 233 | treasure-maps: | ||
| 234 | enabled: true | ||
| 235 | find-already-discovered: | ||
| 236 | loot-tables: default | ||
| 237 | villager-trade: false | ||
| 238 | void-damage-amount: 4.0 | ||
| 239 | void-damage-min-build-height-offset: -64.0 | ||
| 240 | water-over-lava-flow-speed: 5 | ||
| 241 | feature-seeds: | ||
| 242 | generate-random-seeds-for-all: false | ||
| 243 | fishing-time-range: | ||
| 244 | maximum: 600 | ||
| 245 | minimum: 100 | ||
| 246 | fixes: | ||
| 247 | disable-unloaded-chunk-enderpearl-exploit: false | ||
| 248 | falling-block-height-nerf: disabled | ||
| 249 | fix-items-merging-through-walls: false | ||
| 250 | prevent-tnt-from-moving-in-water: false | ||
| 251 | split-overstacked-loot: true | ||
| 252 | tnt-entity-height-nerf: disabled | ||
| 253 | hopper: | ||
| 254 | cooldown-when-full: true | ||
| 255 | disable-move-event: false | ||
| 256 | ignore-occluding-blocks: false | ||
| 257 | lootables: | ||
| 258 | auto-replenish: false | ||
| 259 | max-refills: -1 | ||
| 260 | refresh-max: 2d | ||
| 261 | refresh-min: 12h | ||
| 262 | reset-seed-on-fill: true | ||
| 263 | restrict-player-reloot: true | ||
| 264 | restrict-player-reloot-time: disabled | ||
| 265 | retain-unlooted-shulker-box-loot-table-on-non-player-break: true | ||
| 266 | maps: | ||
| 267 | item-frame-cursor-limit: 128 | ||
| 268 | item-frame-cursor-update-interval: 10 | ||
| 269 | max-growth-height: | ||
| 270 | bamboo: | ||
| 271 | max: 16 | ||
| 272 | min: 11 | ||
| 273 | cactus: 3 | ||
| 274 | reeds: 3 | ||
| 275 | misc: | ||
| 276 | allow-remote-ender-dragon-respawning: false | ||
| 277 | alternate-current-update-order: HORIZONTAL_FIRST_OUTWARD | ||
| 278 | disable-end-credits: false | ||
| 279 | disable-relative-projectile-velocity: false | ||
| 280 | disable-sprint-interruption-on-attack: false | ||
| 281 | legacy-ender-pearl-behavior: false | ||
| 282 | max-leash-distance: default | ||
| 283 | redstone-implementation: VANILLA | ||
| 284 | show-sign-click-command-failure-msgs-to-player: false | ||
| 285 | update-pathfinding-on-block-update: true | ||
| 286 | scoreboards: | ||
| 287 | allow-non-player-entities-on-scoreboards: true | ||
| 288 | use-vanilla-world-scoreboard-name-coloring: false | ||
| 289 | spawn: | ||
| 290 | allow-using-signs-inside-spawn-protection: false | ||
| 291 | tick-rates: | ||
| 292 | behavior: | ||
| 293 | villager: | ||
| 294 | validatenearbypoi: -1 | ||
| 295 | container-update: 1 | ||
| 296 | dry-farmland: 1 | ||
| 297 | grass-spread: 1 | ||
| 298 | mob-spawner: 1 | ||
| 299 | sensor: | ||
| 300 | villager: | ||
| 301 | secondarypoisensor: 40 | ||
| 302 | wet-farmland: 1 | ||
| 303 | unsupported-settings: | ||
| 304 | disable-world-ticking-when-empty: false | ||
| 305 | fix-invulnerable-end-crystal-exploit: true | ||
diff --git a/data/spigot.yml b/data/spigot.yml new file mode 100644 index 0000000..cb83ea0 --- /dev/null +++ b/data/spigot.yml | |||
| @@ -0,0 +1,170 @@ | |||
| 1 | settings: | ||
| 2 | sample-count: 12 | ||
| 3 | player-shuffle: 0 | ||
| 4 | user-cache-size: 1000 | ||
| 5 | save-user-cache-on-stop-only: false | ||
| 6 | moved-wrongly-threshold: 0.0625 | ||
| 7 | moved-too-quickly-multiplier: 10.0 | ||
| 8 | timeout-time: 60 | ||
| 9 | restart-on-crash: true | ||
| 10 | restart-script: ./start.sh | ||
| 11 | netty-threads: 4 | ||
| 12 | attribute: | ||
| 13 | maxAbsorption: | ||
| 14 | max: 2048.0 | ||
| 15 | maxHealth: | ||
| 16 | max: 1024.0 | ||
| 17 | movementSpeed: | ||
| 18 | max: 1024.0 | ||
| 19 | attackDamage: | ||
| 20 | max: 2048.0 | ||
| 21 | log-villager-deaths: true | ||
| 22 | log-named-deaths: true | ||
| 23 | bungeecord: false | ||
| 24 | debug: false | ||
| 25 | players: | ||
| 26 | disable-saving: false | ||
| 27 | messages: | ||
| 28 | restart: Server is restarting | ||
| 29 | whitelist: You are not whitelisted on this server! | ||
| 30 | unknown-command: Unknown command. Type "/help" for help. | ||
| 31 | server-full: The server is full! | ||
| 32 | outdated-client: Outdated client! Please use {0} | ||
| 33 | outdated-server: Outdated server! I'm still on {0} | ||
| 34 | advancements: | ||
| 35 | disable-saving: false | ||
| 36 | disabled: | ||
| 37 | - minecraft:story/disabled | ||
| 38 | world-settings: | ||
| 39 | default: | ||
| 40 | below-zero-generation-in-existing-chunks: true | ||
| 41 | view-distance: default | ||
| 42 | simulation-distance: default | ||
| 43 | merge-radius: | ||
| 44 | item: 0.5 | ||
| 45 | exp: -1.0 | ||
| 46 | mob-spawn-range: 8 | ||
| 47 | item-despawn-rate: 6000 | ||
| 48 | arrow-despawn-rate: 1200 | ||
| 49 | trident-despawn-rate: 1200 | ||
| 50 | zombie-aggressive-towards-villager: true | ||
| 51 | nerf-spawner-mobs: false | ||
| 52 | enable-zombie-pigmen-portal-spawns: true | ||
| 53 | wither-spawn-sound-radius: 0 | ||
| 54 | end-portal-sound-radius: 0 | ||
| 55 | hanging-tick-frequency: 100 | ||
| 56 | thunder-chance: 100000 | ||
| 57 | unload-frozen-chunks: false | ||
| 58 | growth: | ||
| 59 | cactus-modifier: 100 | ||
| 60 | cane-modifier: 100 | ||
| 61 | melon-modifier: 100 | ||
| 62 | mushroom-modifier: 100 | ||
| 63 | pumpkin-modifier: 100 | ||
| 64 | sapling-modifier: 100 | ||
| 65 | beetroot-modifier: 100 | ||
| 66 | carrot-modifier: 100 | ||
| 67 | potato-modifier: 100 | ||
| 68 | torchflower-modifier: 100 | ||
| 69 | wheat-modifier: 100 | ||
| 70 | netherwart-modifier: 100 | ||
| 71 | vine-modifier: 100 | ||
| 72 | cocoa-modifier: 100 | ||
| 73 | bamboo-modifier: 100 | ||
| 74 | sweetberry-modifier: 100 | ||
| 75 | kelp-modifier: 100 | ||
| 76 | twistingvines-modifier: 100 | ||
| 77 | weepingvines-modifier: 100 | ||
| 78 | cavevines-modifier: 100 | ||
| 79 | glowberry-modifier: 100 | ||
| 80 | pitcherplant-modifier: 100 | ||
| 81 | entity-activation-range: | ||
| 82 | animals: 32 | ||
| 83 | monsters: 32 | ||
| 84 | raiders: 64 | ||
| 85 | misc: 16 | ||
| 86 | water: 16 | ||
| 87 | villagers: 32 | ||
| 88 | flying-monsters: 32 | ||
| 89 | wake-up-inactive: | ||
| 90 | animals-max-per-tick: 4 | ||
| 91 | animals-every: 1200 | ||
| 92 | animals-for: 100 | ||
| 93 | monsters-max-per-tick: 8 | ||
| 94 | monsters-every: 400 | ||
| 95 | monsters-for: 100 | ||
| 96 | villagers-max-per-tick: 4 | ||
| 97 | villagers-every: 600 | ||
| 98 | villagers-for: 100 | ||
| 99 | flying-monsters-max-per-tick: 8 | ||
| 100 | flying-monsters-every: 200 | ||
| 101 | flying-monsters-for: 100 | ||
| 102 | villagers-work-immunity-after: 100 | ||
| 103 | villagers-work-immunity-for: 20 | ||
| 104 | villagers-active-for-panic: true | ||
| 105 | tick-inactive-villagers: true | ||
| 106 | ignore-spectators: false | ||
| 107 | entity-tracking-range: | ||
| 108 | players: 128 | ||
| 109 | animals: 96 | ||
| 110 | monsters: 96 | ||
| 111 | misc: 96 | ||
| 112 | display: 128 | ||
| 113 | other: 64 | ||
| 114 | ticks-per: | ||
| 115 | hopper-transfer: 8 | ||
| 116 | hopper-check: 1 | ||
| 117 | hopper-amount: 1 | ||
| 118 | hopper-can-load-chunks: false | ||
| 119 | dragon-death-sound-radius: 0 | ||
| 120 | seed-village: 10387312 | ||
| 121 | seed-desert: 14357617 | ||
| 122 | seed-igloo: 14357618 | ||
| 123 | seed-jungle: 14357619 | ||
| 124 | seed-swamp: 14357620 | ||
| 125 | seed-monument: 10387313 | ||
| 126 | seed-shipwreck: 165745295 | ||
| 127 | seed-ocean: 14357621 | ||
| 128 | seed-outpost: 165745296 | ||
| 129 | seed-endcity: 10387313 | ||
| 130 | seed-slime: 987234911 | ||
| 131 | seed-nether: 30084232 | ||
| 132 | seed-mansion: 10387319 | ||
| 133 | seed-fossil: 14357921 | ||
| 134 | seed-portal: 34222645 | ||
| 135 | seed-ancientcity: 20083232 | ||
| 136 | seed-trailruins: 83469867 | ||
| 137 | seed-trialchambers: 94251327 | ||
| 138 | seed-buriedtreasure: 10387320 | ||
| 139 | seed-mineshaft: default | ||
| 140 | seed-stronghold: default | ||
| 141 | hunger: | ||
| 142 | jump-walk-exhaustion: 0.05 | ||
| 143 | jump-sprint-exhaustion: 0.2 | ||
| 144 | combat-exhaustion: 0.1 | ||
| 145 | regen-exhaustion: 6.0 | ||
| 146 | swim-multiplier: 0.01 | ||
| 147 | sprint-multiplier: 0.1 | ||
| 148 | other-multiplier: 0.0 | ||
| 149 | max-tnt-per-tick: 100 | ||
| 150 | max-tick-time: | ||
| 151 | tile: 50 | ||
| 152 | entity: 50 | ||
| 153 | verbose: false | ||
| 154 | config-version: 12 | ||
| 155 | commands: | ||
| 156 | log: true | ||
| 157 | tab-complete: 0 | ||
| 158 | send-namespaced: true | ||
| 159 | spam-exclusions: | ||
| 160 | - /skill | ||
| 161 | silent-commandblock-console: false | ||
| 162 | replace-commands: | ||
| 163 | - setblock | ||
| 164 | - summon | ||
| 165 | - testforblock | ||
| 166 | - tellraw | ||
| 167 | enable-spam-exclusions: false | ||
| 168 | stats: | ||
| 169 | disable-saving: false | ||
| 170 | forced-stats: {} | ||
diff --git a/mc-cmd.sh b/mc-cmd.sh new file mode 100644 index 0000000..e3c9d6b --- /dev/null +++ b/mc-cmd.sh | |||
| @@ -0,0 +1,35 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | set -e | ||
| 3 | |||
| 4 | ENV_FILE=".env" | ||
| 5 | |||
| 6 | [ -f "$ENV_FILE" ] || { echo "Error: $ENV_FILE not found."; exit 1; } | ||
| 7 | |||
| 8 | while IFS='=' read -r key value; do | ||
| 9 | case "$key" in | ||
| 10 | ''|\#*) continue ;; | ||
| 11 | esac | ||
| 12 | value=$(echo "$value" | sed 's/^"//;s/"$//;s/^'\''//;s/'\''$//') | ||
| 13 | export "$key=$value" | ||
| 14 | done < "$ENV_FILE" | ||
| 15 | |||
| 16 | [ -z "$RCON_PORT" ] && echo "Error: RCON_PORT not set." && exit 1 | ||
| 17 | [ -z "$RCON_PASSWORD" ] && echo "Error: RCON_PASSWORD not set." && exit 1 | ||
| 18 | [ -z "$SERVER_NAME" ] && echo "Error: SERVER_NAME not set." && exit 1 | ||
| 19 | |||
| 20 | COMMAND="$*" | ||
| 21 | |||
| 22 | [ -z "$COMMAND" ] && echo "Error: no command provided." && exit 1 | ||
| 23 | [ "$(printf '%s' "$COMMAND" | wc -c)" -gt 256 ] && echo "Error: command too long." && exit 1 | ||
| 24 | |||
| 25 | LOGFILE="./commands.log" | ||
| 26 | touch "$LOGFILE" | ||
| 27 | |||
| 28 | docker exec -i "${SERVER_NAME}_minecraft" rcon-cli \ | ||
| 29 | --host localhost \ | ||
| 30 | --port "${RCON_PORT}" \ | ||
| 31 | --password "${RCON_PASSWORD}" \ | ||
| 32 | $COMMAND \ | ||
| 33 | && echo "$(date '+%Y-%m-%d %H:%M:%S') | $COMMAND" >> "$LOGFILE" \ | ||
| 34 | && echo "Command sent: $COMMAND" \ | ||
| 35 | || { echo "Error: failed to send command to server."; exit 1; } | ||
