Initial commit: minecraft server setup
Tracks docker-compose config, server scripts, and server properties. Runtime data (world, libraries, versions, logs, jar), credentials, and backup snapshots are gitignored.
This commit is contained in:
22
.gitignore
vendored
Normal file
22
.gitignore
vendored
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
# Runtime / generated data
|
||||||
|
data/world/
|
||||||
|
data/libraries/
|
||||||
|
data/versions/
|
||||||
|
data/logs/
|
||||||
|
data/.cache/
|
||||||
|
data/minecraft_server.*.jar
|
||||||
|
|
||||||
|
# Secrets
|
||||||
|
data/.rcon-cli.env
|
||||||
|
data/.rcon-cli.yaml
|
||||||
|
|
||||||
|
# Backup snapshots
|
||||||
|
data.*.bak/
|
||||||
|
*.bak/
|
||||||
|
|
||||||
|
# Port-forward runtime state
|
||||||
|
portforward.log
|
||||||
|
portforward.pid
|
||||||
|
|
||||||
|
# Local Claude Code state
|
||||||
|
.claude/settings.local.json
|
||||||
1
data/banned-ips.json
Normal file
1
data/banned-ips.json
Normal file
@@ -0,0 +1 @@
|
|||||||
|
[]
|
||||||
1
data/banned-players.json
Normal file
1
data/banned-players.json
Normal file
@@ -0,0 +1 @@
|
|||||||
|
[]
|
||||||
4
data/eula.txt
Normal file
4
data/eula.txt
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
# Generated via Docker
|
||||||
|
# Mon Apr 13 10:50:49 AM UTC 2026
|
||||||
|
eula=true
|
||||||
|
|
||||||
1
data/ops.json
Normal file
1
data/ops.json
Normal file
@@ -0,0 +1 @@
|
|||||||
|
[]
|
||||||
69
data/server.properties
Normal file
69
data/server.properties
Normal file
@@ -0,0 +1,69 @@
|
|||||||
|
#Minecraft server properties
|
||||||
|
#Mon Apr 13 16:37:31 UTC 2026
|
||||||
|
accepts-transfers=false
|
||||||
|
allow-flight=false
|
||||||
|
broadcast-console-to-ops=true
|
||||||
|
broadcast-rcon-to-ops=true
|
||||||
|
bug-report-link=
|
||||||
|
difficulty=easy
|
||||||
|
enable-code-of-conduct=false
|
||||||
|
enable-jmx-monitoring=false
|
||||||
|
enable-query=false
|
||||||
|
enable-rcon=true
|
||||||
|
enable-status=true
|
||||||
|
enforce-secure-profile=true
|
||||||
|
enforce-whitelist=false
|
||||||
|
entity-broadcast-range-percentage=100
|
||||||
|
force-gamemode=false
|
||||||
|
function-permission-level=2
|
||||||
|
gamemode=survival
|
||||||
|
generate-structures=true
|
||||||
|
generator-settings={}
|
||||||
|
hardcore=false
|
||||||
|
hide-online-players=false
|
||||||
|
initial-disabled-packs=
|
||||||
|
initial-enabled-packs=vanilla
|
||||||
|
level-name=world
|
||||||
|
level-seed=
|
||||||
|
level-type=minecraft\:normal
|
||||||
|
log-ips=true
|
||||||
|
management-server-allowed-origins=
|
||||||
|
management-server-enabled=false
|
||||||
|
management-server-host=localhost
|
||||||
|
management-server-port=0
|
||||||
|
management-server-secret=wTbdByrMWdVFA1byxANEKf95vrjSMiO4IemUXCf3
|
||||||
|
management-server-tls-enabled=true
|
||||||
|
management-server-tls-keystore=
|
||||||
|
management-server-tls-keystore-password=
|
||||||
|
max-chained-neighbor-updates=1000000
|
||||||
|
max-players=20
|
||||||
|
max-tick-time=60000
|
||||||
|
max-world-size=29999984
|
||||||
|
motd=A Minecraft Server
|
||||||
|
network-compression-threshold=256
|
||||||
|
online-mode=false
|
||||||
|
op-permission-level=4
|
||||||
|
pause-when-empty-seconds=60
|
||||||
|
player-idle-timeout=0
|
||||||
|
prevent-proxy-connections=false
|
||||||
|
query.port=25565
|
||||||
|
rate-limit=0
|
||||||
|
rcon.password=1539e45bbdd3cee797c79a51
|
||||||
|
rcon.port=25575
|
||||||
|
region-file-compression=deflate
|
||||||
|
require-resource-pack=false
|
||||||
|
resource-pack=
|
||||||
|
resource-pack-id=
|
||||||
|
resource-pack-prompt=
|
||||||
|
resource-pack-sha1=
|
||||||
|
server-ip=
|
||||||
|
server-port=25565
|
||||||
|
simulation-distance=10
|
||||||
|
spawn-protection=16
|
||||||
|
status-heartbeat-interval=0
|
||||||
|
sync-chunk-writes=true
|
||||||
|
text-filtering-config=
|
||||||
|
text-filtering-version=0
|
||||||
|
use-native-transport=true
|
||||||
|
view-distance=10
|
||||||
|
white-list=false
|
||||||
1
data/usercache.json
Normal file
1
data/usercache.json
Normal file
@@ -0,0 +1 @@
|
|||||||
|
[{"uuid":"e84e6487-5f30-3493-b553-5359d8267873","name":"Hertz333","expiresOn":"2026-05-13 19:09:05 +0000"},{"uuid":"c7691bb7-41cd-3372-82cd-ef0e9b9033bf","name":"codehac","expiresOn":"2026-05-13 18:39:42 +0000"},{"uuid":"aa22ac3b-3014-306f-a390-8acb9ecd602a","name":"Goudvis_1","expiresOn":"2026-05-13 18:32:04 +0000"},{"uuid":"dd86f659-b0fd-3d49-96ea-38c6923a9049","name":"Wietsche","expiresOn":"2026-05-13 16:38:08 +0000"}]
|
||||||
1
data/whitelist.json
Normal file
1
data/whitelist.json
Normal file
@@ -0,0 +1 @@
|
|||||||
|
[]
|
||||||
17
docker-compose.yml
Normal file
17
docker-compose.yml
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
services:
|
||||||
|
minecraft:
|
||||||
|
image: itzg/minecraft-server:latest
|
||||||
|
container_name: minecraft
|
||||||
|
ports:
|
||||||
|
- "25565:25565"
|
||||||
|
environment:
|
||||||
|
EULA: "TRUE"
|
||||||
|
ONLINE_MODE: "FALSE"
|
||||||
|
TYPE: "VANILLA"
|
||||||
|
VERSION: "26.1.2"
|
||||||
|
MEMORY: "4G"
|
||||||
|
volumes:
|
||||||
|
- ./data:/data
|
||||||
|
restart: unless-stopped
|
||||||
|
stdin_open: true
|
||||||
|
tty: true
|
||||||
24
portforward
Executable file
24
portforward
Executable file
@@ -0,0 +1,24 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Get the first parameter as LOCAL_PORT (default to 25565 for Minecraft)
|
||||||
|
LOCAL_PORT=${1:-25565}
|
||||||
|
|
||||||
|
# Get the second parameter as OFFSET (default to 0 so public port == local port)
|
||||||
|
OFFSET=${2:-0}
|
||||||
|
|
||||||
|
# Calculate the PUBLICPORT by adding the OFFSET to the LOCAL_PORT
|
||||||
|
PUBLICPORT=$(($LOCAL_PORT + OFFSET))
|
||||||
|
|
||||||
|
# SSH host alias (defined in ~/.ssh/config)
|
||||||
|
SSH_HOST="spotbot"
|
||||||
|
|
||||||
|
echo " $SSH_HOST:$PUBLICPORT --> localhost : $LOCAL_PORT "
|
||||||
|
|
||||||
|
# Run SSH command to create a reverse tunnel from the server
|
||||||
|
while true; do
|
||||||
|
autossh -M 0 -N \
|
||||||
|
-R 0.0.0.0:$PUBLICPORT:localhost:$LOCAL_PORT \
|
||||||
|
-o "ServerAliveInterval 20" -o "ServerAliveCountMax 3" \
|
||||||
|
$SSH_HOST
|
||||||
|
sleep 5
|
||||||
|
done
|
||||||
Reference in New Issue
Block a user