HUB
Sign inSign up
mc-bridge logo

joyki/mc-bridge

By joyki

•Updated 18 days ago

Minecraft Bridge

Image
0

779

joyki/mc-bridge repository overview

⁠mc_bridge — Minecraft Bedrock LAN über zwei Heimnetze hinweg

Brings Minecraft: Bedrock Edition's "Join LAN game" across home networks: two players in different Wi-Fi networks play together via their switch's normal LAN mode — no Realm, no server host. Works since Bedrock 26.60 (NetherNet network stack) and requires a small relay (server) plus a node container in each player's Wi-Fi.

Switch A (LAN host) ⇄ Node A (Docker, host net) ⇄ Relay (your VPS) ⇄ Node B (Docker, host net) ⇄ Switch B

⁠Tags

TagZweckArchitekturen
joyki/mc-bridge:server / :server-latestRelay für den VPSlinux/amd64, linux/arm64
joyki/mc-bridge:client / :client-latestNode je WLANlinux/amd64, linux/arm64
joyki/mc-bridge:client-arm / :client-arm-latestNode, aarch64-nativ (Raspberry Pi)linux/arm64

⁠Quickstart — Relay (VPS)

docker run -d --name mcbridge-relay \
  --restart unless-stopped \
  -p 7001:7001 \
  -e MC_LISTEN=":7001" \
  -e MC_TOKEN="a-long-shared-secret" \
  joyki/mc-bridge:server

⁠Quickstart — Node (je Wi-Fi, z. B. Raspberry Pi aarch64)

docker run -d --name mcbridge-node \
  --restart unless-stopped \
  --network host \
  -e MC_RELAY="tcp://your.relays.host:7001" \
  -e MC_ROOM="room-alice-bob" \
  -e MCBRIDGE_TOKEN="a-long-shared-secret" \
  -e MC_NODE_ID="pi-alice" \
  joyki/mc-bridge:client-arm

--network host is required for the node: LAN discovery uses UDP broadcast (255.255.255.255:7551), which cannot cross Docker bridge networks. Linux intended (Raspberry Pi in the same Wi-Fi as the Nintendo Switch).

Then: one player starts a world, the other picks Play → Worlds and joins the world named "… [Bridge]".

⁠docker compose

⁠Relay
services:
  mcbridge-relay:
    image: joyki/mc-bridge:server
    container_name: mcbridge-relay
    restart: unless-stopped
    ports:
      - "7001:7001/tcp"
    environment:
      MC_LISTEN: ":7001"
      MC_TOKEN: "a-long-shared-secret"
⁠Node (in each Wi-Fi)
services:
  mcbridge-node:
    image: joyki/mc-bridge:client-arm
    container_name: mcbridge-node
    restart: unless-stopped
    network_mode: host
    environment:
      MC_RELAY: "tcp://your.relays.host:7001"
      MC_ROOM: "room-alice-bob"
      MCBRIDGE_TOKEN: "a-long-shared-secret"
      MC_NODE_ID: "pi-alice"

Managing:

docker compose -f compose.server.yml up -d
docker compose -f compose.client.yml up -d
docker compose -f compose.client.yml logs -f

⁠Environment variables

VariableBinaryDefaultPurpose
MC_LISTENserver:7001TCP listen address
MC_TOKENserver(empty)shared secret nodes must present
MC_RELAYclient(empty)relay address: tcp://host:port or tls://host:port (TLS accepts self-signed certs)
MC_ROOMclient(empty)room code; nodes in the same room share worlds
MCBRIDGE_TOKENclient(empty)secret matching the relay's MC_TOKEN
MC_NODE_IDclienthostnameunique ID of the node inside its room
MC_DISCOVERY_ADDRclient:7551UDP address of the local NetherNet LAN host
MC_WORLD_SUFFIXclient [Bridge]suffix appended to announced remote world names (must not be empty)

CLI flags (same names lowercase, -token, -room, …) override env vars.

⁠Ports & firewall

ComponentPortDirection
Server (relay)TCP 7001 inboundnodes connect out
Client (node)UDP 7551 local LANdiscovery + NetherNet signaling (host network, no mapping)
NodesTCP outbound to relay—
⁠Release-Build (Multi-Arch pushen)
docker run --privileged --rm tonistiigi/binfmt --install all   # einmalig
PUSH=1 REPOSITORY=joyki/mc-bridge docker/build.sh

PUSH=1 erzeugt mit dem docker-container-Builder: server(+latest) und client(+) für linux/amd64 + linux/arm64, client-arm(+) nur für linux/arm64 und pusht alle Tags nach Docker Hub.

⁠Notes

  • Not affiliated with Mojang/Microsoft/Nintendo. Based on publicly reverse-engineered protocol documentation (df-mc/nethernet-spec⁠ and df-mc/go-nethernet⁠).
  • Bare-metal (non-Docker) deployment incl. systemd units: see the GitHub repository.
  • MIT licensed.

Tag summary

Content type

Image

Digest

sha256:2eb110c58…

Size

7.1 MB

Last updated

18 days ago

docker pull joyki/mc-bridge:client-arm_v2