crafting a game server for omg.lol
For those who don't know, we have a lovely omg.lol Minecraft server. @Vincent ran it for a while before having to relocate it, and I offered to take it over. He was able to send me a .tar.gz archive of the server folder, and the fun began from there.
Just looking for how to play? You'll need to be whitelisted - email firstname.lastname@example.org or ask in Discord, IRC or Matrix. Once you're added to the whitelist you can point your game at mc.omg.lol, minecraft.omg.lol, or omg.cropp.games. You can also point your browser to those URLs - stay tuned to find out why!
introducing my server
My server, affectionately named Gallus(current naming theme is Roman emperors) is located in the colo of a local ISP. I'm not using it for much, but it has 96GB RAM, 24 cores, and a 1TB boot drive with a 6TB data array, running Fedora Server. It was going out in the recycle from an old job of mine, and they were kind enough to let me have it. Reuse is a fantastic thing that meant one less server in the landfill. Gallus happily serves my offsite backup, and a handful of things that I need running 24x7 with better internet than I have at home. I'm not really using more than 10% of the capacity, though, so I'm more than happy to donate a server for the community.
building a container image
Now, I love me some Podman, so I logged into my Cockpit interface and created a new Podman container. If you don't know, Podman is essentially a drop-in replacement for Docker that is FOSS(as far as I know) and rootless.
I assigned it ports 25665 and 8123, mapped a data volume to a folder on the machine, and set some variables. Whitelist is enabled, set an RCON password that was nice and secure, and agreed to the EULA. I unpacked and copied Vincent's data folder to the folder I set, set permissions, and let the container rip using the itzg/minecraft-server image and the PaperMC server. We're in business!
reverse proxying a map interface
Now, the curious among you probably want to know what port 8123 is for. We're running a plugin called Dynmap that renders the entire world on a web interface. I added an entry to my Caddyfile to reverse-proxy that port to the mc.omg.lol and minecraft.omg.lol addresses, as well as my own domain I set for this natively, omg.cropp.games.
setting up the DNS
In order to actually get people into the server, I logged in to Adam's delicious dns.kitchen and added a subdomain which was mapped to the minimap, omg.cropp.games. I also added the classic Minecraft SRV record to enable port 25665 for automatic game connections. Adam was kind enough to move the mc and minecraft omg.lol addresses to me and I set up DNS on those as well.
monitoring the server
I use Netdata for monitoring on all my servers. For those who are curious, you can see how Gallus is operating at netdata.lol. In order to track our Minecraft server's performance, Netdata automatically watches Podman containers, but I also added their SpigotMC config file and set up some RCON, so we have a live feed of users online. Perhaps I'll find a site to embed that on, for fun.
whitelisting our users
Now, for the sake of keeping the server sane, we whitelist all users on the server. Any omg.lol users are welcome to join, but as of now, you have to join our Discord and ask a Minecraft admin to add you. You can also email email@example.com with your Minecraft Java username and I'll get you looked after.
However, Adam's a bloody genius when it comes to APIs and such, and we determined that you can actually whitelist people over RCON, which is enabled on our server. This will probably happen at some point in the future, but Adam reckons we can add a section to the omg.lol dashboard where you can enter your username and it will whitelist you automagically. Stay tuned for the progress on that!
That's all for now - come build with us!