Hope all is well!
Recently tried to set up itzg/mc-router as a separate container alongside a minecraft server I host for friends. While I'm able to successfully get routes in assuming the initial server container is up and running, it is unable to be woken up when it goes to sleep, unless I directly bypass the router and connect to the container itself.
Here's a minimally reproducible config (please note the domain name <insert domain name here>). Domain & SRV records work fine, and I'm able to reach the router itself. Additionally, I can reach the server from the router assuming the server is awake. However, the server itself cannot be woken up by the router.
Server Compose File
networks:
mc-router-network:
external: "true"
services:
mc:
image: itzg/minecraft-server
container_name: mc-test
tty: true
stdin_open: true
ports:
- "21070:25565" #bypass port in the event the router doesn't wake this up
networks:
- mc-router-network
labels:
mc-router.host: "mc.<insert domain name here>.com"
mc-router.network: "mc-router-network"
environment:
VERSION: "1.21.11"
EULA: "TRUE"
TYPE: "FABRIC"
SNOOPER_ENABLED: false # disable data collection
# Server Info Settings
MAX_PLAYERS: 32
# Memory Settings
INIT_MEMORY: 1G
MAX_MEMORY: 3G
# Auto Pause Settings
ENABLE_AUTOPAUSE: "TRUE"
MAX_TICK_TIME: "-1"
AUTOPAUSE_TIMEOUT_INIT: "600" # the time between server start and the pausing
AUTOPAUSE_TIMEOUT_EST: "3600" # the time between the last client disconnect and the pausing
# Logging Params
LOG_TIMESTAMP: "true"
healthcheck:
test: mc-health
start_period: 1m
interval: 30s
retries: 5
volumes:
- ./data:/data
restart: unless-stopped
Router Compose File
services:
router:
image: itzg/mc-router
container_name: mc-router
ports:
- "25565:25565"
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
environment:
EULA: true
IN_DOCKER: true
AUTO_SCALE_UP: true
DEBUG: true
networks:
- mc-router-network
restart: unless-stopped
networks:
mc-router-network:
name: mc-router-network
Is this an issue with the Docker container connections themselves, or is it potentially the autosleep on the server itself preventing it from working properly? Running a docker network inspect command shows both of the containers are on the network itself, but waking it from sleep remains an issue.
Hope all is well!
Recently tried to set up
itzg/mc-routeras a separate container alongside a minecraft server I host for friends. While I'm able to successfully get routes in assuming the initial server container is up and running, it is unable to be woken up when it goes to sleep, unless I directly bypass the router and connect to the container itself.Here's a minimally reproducible config (please note the domain name
<insert domain name here>). Domain & SRV records work fine, and I'm able to reach the router itself. Additionally, I can reach the server from the router assuming the server is awake. However, the server itself cannot be woken up by the router.Server Compose File
Router Compose File
Is this an issue with the Docker container connections themselves, or is it potentially the autosleep on the server itself preventing it from working properly? Running a docker network inspect command shows both of the containers are on the network itself, but waking it from sleep remains an issue.