Skip to content

Instantly share code, notes, and snippets.

@carlochess
Last active August 23, 2021 16:43
Show Gist options
  • Save carlochess/de46b9dac42cd116aa80ba6cd1ad3a36 to your computer and use it in GitHub Desktop.
Save carlochess/de46b9dac42cd116aa80ba6cd1ad3a36 to your computer and use it in GitHub Desktop.
minecraft server
#!/bin/bash
mkdir -p $(pwd)/minecraft-data
### other ops
# docker exec -i mc rcon-cli
# -e MEMORY=2G
# -e TYPE=SPIGOT
# -e OVERRIDE_SERVER_PROPERTIES=true ...
# -e SERVER_NAME=MyServer ...
# -e ICON=http://..../some/image.png ...
# -e MOTD="My Server"
# -e ENABLE_JMX=true
# -e JMX_HOST=$HOSTNAME
# -p 7091:7091
docker run -d --restart=always -it -p 25565:25565 \
-e EULA=TRUE -e ONLINE_MODE=FALSE \
-e VERSION=1.17.1 \
-v $(pwd)/minecraft-data:/data \
itzg/minecraft-server
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment