Will It Host? / Windows File Explorer

Can you run a Minecraft server in File Explorer?

It hosted#5 of 21 by difficulty

Yes. The process listening on port 25565 is explorer.exe, with no helper process and nothing relaying in front of it. The world is a folder under This PC: every block is a file, every chunk is a folder and every player is a file you can delete. Delete a block file and the block goes, rename it to diamond_block and it changes.

verdict
It hosted
A vanilla Minecraft client connected and played on it.
difficulty
#5 of 21
Ranked against everything else in the series, hardest first.
built withC++
protocolMinecraft 1.8.9
read the source on github β†’

How it works

A shell namespace extension, a C++ DLL that Explorer loads when you open the folder. Explorer asks it for the contents through IShellFolder2 and every item is a PIDL carrying its own coordinates and block state. Changes in the game go back out as SHChangeNotify, so an open window updates as you build. The Type column says what a block is, Date modified says when it was placed, Comment says who placed it, and Size is two bytes, because that is what a block costs in a 1.8 chunk.

The part that nearly stopped it

Explorer is not a host you are allowed to crash. It owns the taskbar, and a shell extension runs inside it with no supervision, so throwing out of a COM entry point takes the desktop with it. Windows 11 adds its own problem: most windows open in a separate explorer.exe /factory process that exits about thirty seconds after its last window closes, and it would take the server with it.

What got it over the line

Holding SHGetInstanceExplorer for as long as the server runs, which keeps that process alive after the window closes. Everything after that is defensive: every COM entry point and every thread catches and logs, DllCanUnloadNow says no once the server is up, the server is never destroyed because it cannot be torn down under the loader lock, and a PIDL that does not decode is rejected rather than guessed at.

What it cannot do

Minecraft 1.8.9, the same target as most of the series. Windows 11 only, and Explorer only loads a DLL built for its own architecture. Creative on a 7x7 chunk flat world, no survival and no mobs. Deleting is deleting: nothing reaches the Recycle Bin, there is no undo and it does not ask. A renamed player gets their real name back on reconnect, because that is what their client logs in with.

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 Windows File Explorer can be made to do it. In every episode the host is the hard part.

Almost 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 File Explorer run a Minecraft server?

Yes, as a shell namespace extension. The DLL registers a COM class under HKCU and a folder under This PC, so it needs no admin, and the server starts inside explorer.exe the first time that folder is listed. netstat names the pid holding port 25565 and tasklist tells you it is Explorer. The full source is on GitHub.

Is Herobrine really in it?

Turn on Show hidden items and he appears in the Players folder and in the game at the same moment, standing at the edge of the world facing spawn. He is not in the tab list and his Comment says Removed. Turn hidden items off and he is gone from both. Try to delete him and you need his permission.

The rest of the series

See the full Will It Host? board β†’

Or just host it properly

Windows File Explorer 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.