Hello everyone!
To learn Github Actions, Nix Flakes, and Distroless Docker, I used my favorite hosting provider (Fly.io) to deploy a Minecraft server in a Docker container!
My project is open source and reasonably well-documented on GitHub at mboyea/nixflymc.
You probably don’t want to use this.
I don’t recommend that anyone else actually use this unless you want to learn these tools.
To host a Minecraft server on Fly, I would suggest you take a look at this other repository instead that makes use of this Docker image.
Some current known issues with my project:
- Technically the project isn’t “true distroless” because I use the Busybox base Docker image.
- The
nix run .#uploadWorld
script is only functional when manually input line-by-line on the CLI; I couldn’t quickly getssh
working through Nix (thoughscp
does work, so it’s a scripting issue not an authentication issue). - The server isn’t configured by Fly to automatically shut off or turn on when it isn’t receiving traffic, but those would be quick changes to Fly.toml.
- The setup process is fairly involved. At least it’s documented!
Hopefully someone else out there can get something out of this
Have a great day