Skip to content

Docker Configuration

Mark Metcalfe edited this page Mar 30, 2024 · 6 revisions

sleepingSettings.yml values

You will need to set the following values in your sleepingSettings.yml for your docker container to work correctly:

minecraftWorkingDirectory: /minecraft
serverPort: 25565 # must be the same port that you exposed in the compose / cli options
bedrockPort: 19132 # specify only if you want bedrock - must be the same port that you exposed in the compose / cli options
webPort: 8080 # specify only if you want the Web GUI - must be the same port that you exposed in the compose / cli options

Docker Usage

docker compose (recommended)

version: '3.5'
services:
  mcsleepingserverstarter:
    image: ghcr.io/vincss/mcsleepingserverstarter:latest
    container_name: mcsleepingserverstarter 
    restart: unless-stopped
    tty: true
    stdin_open: true
    ports:
      - 19132:19132/udp # Bedrock port (udp must be specified!)
      - 25565:25565 # Java port
      - 8080:8080 # Web GUI port
    environment:
      - TZ=Etc/UTC # Change to your timezone so that the log timestamps are correct
      - DISABLE_FILE_LOGS=true # Disable the file logger
    volumes:
      - "/path/to/minecraft/server:/minecraft"
      - "/path/to/sleepingSettings.yml:/sleepingSettings.yml"

Once the container is started via docker compose up -d, you can view the logs and execute commands within the server (when online) by running: CONTAINER=$(docker compose ps -q mcsleepingserverstarter); docker logs $CONTAINER; docker attach --sig-proxy=false $CONTAINER

docker cli

docker run -d \
  --name=mcsleepingserverstarter \
  -p 19132:19132 \
  -p 25565:25565 \
  -p 8080:8080 \
  -e TZ=Etc/UTC \
  -v /path/to/minecraft/server:/minecraft \
  -v /path/to/sleepingSettings.yml:/sleepingSettings.yml \
  --restart unless-stopped \
  ghcr.io/vincss/mcsleepingserverstarter:latest