Our Minecraft server is spun up only when we play, with a simple bespoke front-end that allows any Cognito-authenticated user to start or stop the AWS instance. The dashboard also shows an auto-updated leaderboard with some in-game stats (death count, miles traveled, last login and so on), stored in DynamoDB and periodically updated by a cron job on the server. I also planned to add a map of the spawn, but not sure if that’ll happen.
We have not played since MS started effectively requiring a phone number from every Minecraft player.
Thanks for the interest, I might publish the thing after auditing and documenting. There are hard-coded insensitive credentials like Cognito pool ID and player UUIDs, which I should make nicely configurable. If I do it soon enough I’ll reply here. It’s very basic-looking though (and without dynamic registration, intended for small infrequently changing groups with memberships managed by an admin).
As I have already been using AWS and this was not at all business-critical, I did not care about vendor lock-in and thought of it as an exercise in how much I could delegate (neither letting random visitors access our dashboard, nor spending time implementing custom auth). Their JS SDK documentation wasn’t great, but after some digging it was somewhat straightforward to make a fully static SPA (hosted on S3) access specified AWS resources (per IAM policy) on behalf of authenticated Cognito user.
The app also “integrates” with Discord to ping a channel on each instance start/stop, but that is merely posting to a webhook URL.
I wrote it in React and TypeScript with a bare-minimal Babel + Webpack configuration but it could just as well be written in vanilla JS.
As to the server, it is plain Ubuntu with a cron job that periodically tries to launch MC server if it’s not already running (or something silly like that). Another cron job publishes stats to DynamoDB (IAM policy allowing the instance access the table), and I wanted to add yet another job to generate a PNG with a pretty map of the spawn.
Fancy! At first look it’s a no-brainer to go with, so either our setup existed before yours was public or I did a shoddy job at researching options.
Part of my idea was an actual web home for the server (leaderboard, map, etc.) so if we play MC again I will see if that is possible with your project.
What's the latency like with that? When a user causes a wake event, how long until the server is live and ready to play? What sort of wait system do you use? This sounds really cool.
In my setup it is instance start + cron job timer + MC server initialization. AWS instance wakes up pretty quickly, cron job is configurable (I set it to 15 seconds or so), MC may depend on the size of the world and any mods I suppose (we played vanilla). All in all took between 40–100 seconds I think.
We have not played since MS started effectively requiring a phone number from every Minecraft player.