You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If your network is dual-stack (IPv4 and IPv6), also map the IPv6 port:
16
+
> **NOTE**: if you plan on running a server for a longer amount of time it is highly recommended using a management layer such as [Docker Compose](#deploying-with-docker-compose) or [Kubernetes](#deploying-with-kubernetes) to allow for incremental reconfiguration and image upgrades.
17
17
18
-
```bash
19
-
-p 19132:19132/udp -p 19133:19133/udp
20
-
```
18
+
If your network is dual-stack (IPv4 and IPv6), also map the IPv6 port: `-p 19132:19132/udp -p 19133:19133/udp`
21
19
22
-
> **NOTE**: if you plan on running a server for a longer amount of time it is highly recommended using a management layer such as [Docker Compose](#deploying-with-docker-compose) or [Kubernetes](#deploying-with-kubernetes) to allow for incremental reconfiguration and image upgrades.
20
+
Alternatively, enable `ENABLE_BDS_V6BIND_FIX=true` to serve both from the same port number - see [IPv6 same-port fix](#ipv6-same-port-fix).
23
21
24
22
## Upgrading to the latest Bedrock server version
25
23
@@ -72,6 +70,7 @@ For Minecraft Java Edition you'll need to use this image instead:
72
70
-`DIRECT_DOWNLOAD_URL` (no default): This environment variable can be used to provide a **direct download URL** for the Minecraft Bedrock server `.zip` file. When set, this URL will be used instead of attempting to automatically look up the download link from `minecraft.net`. This is particularly useful for CI/CD environments or when the automatic version lookup is temporarily broken due to website changes. Ensure the URL points directly to the `bedrock-server-VERSION.zip` file.
73
71
-`DOWNLOAD_PROGRESS` (default is `false`) : When set to `true`, displays a progress bar during the Bedrock server download instead of running silently.
74
72
-`ENABLE_SSH` (default is `false`) : Enable remote console over SSH on port 2222 if this environment variable is set to `true`.
73
+
-`ENABLE_BDS_V6BIND_FIX` (default is `false`) : allows `SERVER_PORT` and `SERVER_PORT_V6` to be set to the same port. See [IPv6 same-port fix](#ipv6-same-port-fix). Enabling it should mitigate connectivity issues in dual-stack setups.
75
74
-`MC_PACK` (no default): Path inside the container to a single archive file (e.g. `.mcpack`, `.mcworld`, `.mctemplate`, `.mcaddon`, or any zip) or to a directory with the same layout. At startup the archive is unpacked (or the directory is read): top-level `behavior_packs/` is merged into `behavior_packs/`, top-level `resource_packs/` into `resource_packs/`, and all other content (when `level.dat` is present) into `worlds/{LEVEL_NAME}`. For `.mcaddon` archives, which use root-level `data/` (behavior) and `resources/` (resource) folders instead of `behavior_packs/` and `resource_packs/`, these are detected and installed automatically using the pack UUID from each manifest as the folder name.
76
75
-`FORCE_WORLD_COPY` (default `false`): When `MC_PACK` contains a world (`level.dat`), set to `true` to remove and replace the existing `worlds/{LEVEL_NAME}` on every startup; otherwise the world is copied only when it does not exist.
77
76
-`FORCE_PACK_COPY` (default `false`): When `MC_PACK` contains `behavior_packs/` or `resource_packs/`, set to `true` to remove and replace existing pack folders with the same name on every startup; otherwise each pack is copied only when it does not already exist.
-**UDP** 19132 : the Bedrock server port for IPv4 clients, set by `SERVER_PORT`
158
-
-**UDP** 19133 : the Bedrock server port for IPv6 clients, set by `SERVER_PORT_V6`
157
+
-**UDP** 19133 : the default Bedrock server port for IPv6 clients, set by `SERVER_PORT_V6`
158
+
159
+
> **NOTE**: with `ENABLE_BDS_V6BIND_FIX=true`, both ports can be set to the same value (e.g. 19132), exposing the same port number for both address families - this is recommended for dual-stack environments to avoid connectivity problems.
160
+
161
+
## IPv6 same-port fix
162
+
163
+
BDS binds IPv4 and IPv6 on separate ports by default (19132 and 19133).
164
+
Bedrock clients do not implement Happy Eyeballs, so a player whose device
165
+
resolves the hostname to IPv6 connects to port 19132 over IPv6 and times out
166
+
-- the server only accepts IPv6 on 19133. Set `ENABLE_BDS_V6BIND_FIX=true`
167
+
to enable a runtime shim ([bds-ipv6fix](https://github.com/poeggi/bds-ipv6fix))
168
+
that patches BDS to allow both address families on the same port number, then
169
+
set both properties to the same value:
170
+
171
+
```yaml
172
+
environment:
173
+
EULA: "TRUE"
174
+
ENABLE_BDS_V6BIND_FIX: "true"
175
+
SERVER_PORT: 19132
176
+
SERVER_PORT_V6: 19132
177
+
ports:
178
+
- "19132:19132/udp"
179
+
```
159
180
160
-
**NOTE** that you must append `/udp` when exposing the ports, such as `-p 19132:19132/udp -p 19133:19133/udp`.
181
+
> **NOTE**: `SERVER_PORT_V6` equal to `SERVER_PORT` requires `ENABLE_BDS_V6BIND_FIX=true`;
182
+
> without it BDS will crash. Always set the IPv6 port via `SERVER_PORT_V6`,
0 commit comments