Will It Host? / iPhone
Can you run a Minecraft server on an iPhone?
Yes. The process listening on port 25565 is an app on the phone, with no Mac in the middle and no jailbreak. Press Start and the phone answers Minecraft. The server list entry reads the model, the iOS version and the battery level off the device, so from the multiplayer menu you can watch the phone's battery drop. Getting a client to reach it at all took far longer than the protocol did, and in the end the connection ran over a VPN.
How it works
A SwiftUI app using NWListener from Apple's Network framework, speaking the Minecraft 1.8.9 protocol from the phone. The server class is main actor isolated and every callback hops on to it, so there is no locking anywhere, and appending a log line is what redraws the UI. A text field in the app types in to the game chat as [phone].
The part that nearly stopped it
The first connection. A phone is not built to be reached, and getting a Minecraft client from another machine through to a listener on it was the part that nearly stopped the build. iOS piles on more: background the app and the listener goes down with everyone on it, and declining the local network prompt once leaves the server invisible.
What got it over the line
Running the connection over a VPN, which is what finally got the networking right. The rest was keeping the server small: everything the client sends in play except chat is dropped, one flat chunk column is built once and posted 49 times with different coordinates, and the app keeps the screen awake so the server stays in the foreground.
What it cannot do
Minecraft 1.8.9, the same target as the rest of the series. The world is a prop: breaking a block only changes your own screen and it is back when you rejoin. Two people can join and chat but cannot see each other, and there are no mobs, no survival and no saving.
Why this is possible at all
A Minecraft Java server is a smaller thing than its reputation suggests. It is a socket, a packet codec and a game loop. The client opens one TCP connection, sends a handshake naming its protocol version, moves through login into the play state, and from then on both sides exchange length-prefixed packets describing chunks, entities and movement. None of that needs a game engine. It needs something that can hold a socket open and put the right bytes on it in the right order, which is why iPhone can be made to do it. In every episode the host is the hard part.
Every build in this series targets Minecraft 1.8.9 for one specific reason. In 1.8 a chunk is a flat byte array you can send uncompressed. From 1.9 onward chunk data is palette-encoded into bit-packed longs and the connection expects zlib, which is not something you can hand-write in VBA. 1.8.9 is the last release where the whole protocol is within reach of a scripting runtime that was never meant for it.
We have written both halves of that up properly: how the Minecraft server protocol works covers the wire format, and what a Minecraft server actually needs to run covers the four things a real one cannot do without.
Questions
Can an iPhone run a Minecraft server?
Yes. iOS gives apps NWListener, so an ordinary app can listen on port 25565 and speak the Minecraft 1.8.9 protocol from the phone. It needs Xcode to install, runs on iPhone 11 and newer, and has to stay in the foreground. The full source is on GitHub.
Why did it need a VPN?
Because the listener was the easy half. Getting a Minecraft client on another machine to reach the phone was the hard one, and the networking only came right once the connection went over a VPN.
The rest of the series
Or just host it properly
iPhone is not where your survival world should live. AMD Ryzen 9700X, hard-reserved RAM, NVMe, online in under a minute with a free address, DDoS protection and a 7-day money-back guarantee.