I built a Minecraft server panel in Python: here's what broke along the way
I remember years and years ago when I initially got interested in servers, when I tried to set up a Minecraft server, I had to download the official Minecraft server jar file, manually update Java, write batch files and manually port forward, which as a 13 year old at the time was such a headache. FalkMC is a downloadable desktop application for Windows 10 & 11 that lets you quickly set up and…
In 2019, writer was captivated by the world of servers when they attempted to create a Minecraft server. Back then, the process entailed downloading the official Minecraft server jar file, manually updating Java, writing batch files, and manually port forwarding – an overwhelming task for a 13-year-old. Enter FalkMC, a desktop application that simplifies the process of setting up and self-hosting a Minecraft server for friends on Windows 10 and 11.
However, the author felt the need for a more beginner-friendly, privately self-hosted, and fully free solution to quickly spin up a Minecraft server. Thus, they decided to create FalkMC Panel, built with Python and CustomTkinter, to give back to the community where their tech interest originated from.
The author chose Python due to their recent interest in the language and wanted a challenging project to elevate their skills. The packaging was done using Nuitka, as PyInstaller caused issues. A fun bug they encountered was the server starting but no world folder being generated. It turned out that the stdout/stderr were piped to subprocess.PIPE, and the OS buffer filled up, blocking the JVM on the next write. Redirecting the output to a log file solved the issue.
Another problem was the panel freezing on tab switches due to scanning folders, process lists, and network calls on the same thread. Moving these tasks to background threads and scheduling UI updates using self.after(0, ...) resolved the issue.
When trying to set up the Paper server, the author received "version not found" errors, which were caused by outdated URLs and Paper's deprecation of v2. Switching to Paper's v3 API fixed the issue.
Packaging with PyInstaller proved problematic due to the "Tcl data directory ‘_tcl_data’ not found" error. Nuitka handled it without any issues, but it had a new problem – the executable wrote settings.json and the servers folder to a temporary location that Windows deleted when the app closed, causing all data to disappear upon reopening. To fix this, all data was stored in Documents\FalkMC instead.
The next milestone for FalkMC Panel is backups, with upcoming features including UPnP port forwarding and an auto mod downloader for modded servers. The author emphasizes the importance of not blocking the main thread, redirecting subprocess.PIPE output to a file, and packaging early to catch bugs before they become exe-related.
Always remember to learn with AI but ensure you fully understand its capabilities. FalkMC Panel is free and open source, and you can access it at their website: https://falkmc.com/, view their documentation at https://falkmc.com/docs/, or check their source code at https://github.com/FalkMC.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.