itzg / docker-minecraft-bedrock-server

Containerized Minecraft Bedrock Dedicated Server with selectable version
MIT License
1.19k stars 226 forks source link

Two containers on same host do not appear in Lan Game #147

Open peterm888 opened 3 years ago

peterm888 commented 3 years ago

I found net=host and net=macvlan would only allow one minecraft server to show up in Lan Game, problably because the broadcast packet is not duplicated to both containers? Is there any workaround for this?

Kaiede commented 3 years ago

110 also discusses this issue. The summary is that the ping mechanism in the dedicated server doesn’t work well when it’s not on port 19132. If you can give each container its own external IP and always use 19132 for every container it should just work, at least on paper.

I’ve had good luck using the manymine container to handle rebroadcasting the discovery packets, and giving each container a different external UDP port (the latest tag has the ability to properly map containers that use 19132 internally, but a different external port, despite what the README says).

TheTinkerDad commented 3 years ago

I've managed to make it work some weeks ago and been running multiple instances of this container on the same linux host since then. All of the containers are visible on the Xbox One and Windows machines on the same LAN. I've also made a video tutorial about this a few weeks ago, hope this helps: https://www.youtube.com/watch?v=ds0_ESzjbfs

itzg commented 3 years ago

That's a fantastic video and explanation of macvlan @TheTinkerDad . I would like to add a "Tutorials" section to the README and link to your video, if that would be ok. And/or you're welcome to contribute a PR with that section added.

Kaiede commented 3 years ago

My thanks as well. manymine is simple to setup, but this got me off my butt to try configuring macvlan, and my VM's idle CPU usage when nobody is connected is now half of what it was from not having manymine bouncing pings back and forth (since it seems the bedrock server itself also sends out client pings? What?)

TheTinkerDad commented 3 years ago

Hello,

Sorry for not noticing your comment earlier @itzg ! Sure, feel free to add it - it's just a humble contribution and I'm happy if people find it useful.