I’ve been trying to get Minecraft bedrock server running on fly without much luck. I’ve seen other people have tried over the years but any tips in other forum posts are either inconclusive or out-of-date.
As best I can tell the server runs OK as logs shows it starting up, but I can’t get any traffic to hit it - I’m assuming due to UDP routing issues. I have a dedicated IPv4 address assigned.
My toml is as follows (app and data names changed here!)…
Hi… First of all, I’d suggest posting the output of fly ips list. You mentioned having a dedicated IPv4 address, but there are other subtleties that people bump into.
There is no max_machines_running field, , and auto-stop/auto-start won’t work with UDP, unfortunately. This may not be the source of the problem that you’re seeing, but it would be wise to remove these four lines.
The maximum number of running Machines is the number of Machines you’ve created for your app using fly scale count or fly machine clone.
% fly ips list
VERSION IP TYPE REGION CREATED AT
v4 <REDACTED> public (dedicated, $2/mo) lhr Jun 21 2025 13:26
v6 <REDACTED> public (dedicated) global Jun 21 2025 12:15
When the server starts up I do see stuff like…
[2025-06-22 14:41:51:754 INFO] IPv4 supported, port: 25565: Used for gameplay.
Unfortunately it doesn’t log anything about the address it is using.
I can SSH in but the image its using doesn’t have ss available.
I think you actually want that to say global (under REGION). Due to…
Also, I’d release the IPv6 address, since UDP won’t be available over that. (Unless Minecraft can make do with TCP-only.)
If it’s a Debian-based image then you can apt-get update followed by apt-get install --no-install-recommends iproute2, which is a package of general IP networking goodies.
ss -unap will show all process that are listening on UDP at the moment. You need Local Address to match the entry for fly-global-services in /etc/hosts.
…which looks wrong as it using 0.0.0.0 and * rather than the address for fly-global-services. So I’m now trying to see why setting the server address for the bedrock server seems to be getting ignored. I can see the address in /etc/hosts for fly-global-services.
I’ve not got it working yet… but this feels like progress
#!/bin/bash
socat UDP4-LISTEN:23191,fork,reuseaddr,bind=fly-global-services UDP4:127.0.0.1:19132 &
/opt/bedrock-entry.sh &
# Wait for any process to exit
wait -n
# Exit with status of process that exited first
exit $?
Dockerfile
FROM itzg/minecraft-bedrock-server:2025.6.0
RUN apt update
RUN apt -y install socat
# The base image uses /bedrock-server as the working directory
WORKDIR /bedrock-server
COPY ./run.sh ./run.sh
RUN chmod +x ./run.sh
ENTRYPOINT ["./run.sh"]
fly.toml (with proper app and data name swapped in):
# fly.toml app configuration file generated for goofberts-world on 2025-06-21T10:54:10+01:00
#
# See https://fly.io/docs/reference/configuration/ for information about how to use this file.
#
app = 'APP_NAME_HERE'
primary_region = 'lhr'
kill_signal = 'SIGINT'
kill_timeout = '5s'
[build]
dockerfile = "Dockerfile"
[env]
EULA = "TRUE"
GAMEMODE = "survival"
MAX_PLAYERS = "5"
[[services]]
internal_port = 19132
protocol = "udp"
[[services.ports]]
port = 19132
[[vm]]
memory = '2gb'
cpu_kind = 'shared'
cpus = 2
[[mounts]]
source = 'DATA_NAME_HERE'
destination = '/data'
initial_size = '5'
processes = ['app']
In Minecraft (on iOS for me) I connect to the IP address I allocated and use port 23191.