To help make the current COVID-19-related social distancing a little less bad for my son, I’ve set up a private minecraft server for him to use with his friends.
I could have just paid Mojang the $7.99/month for Realms, but I decided to use this as a learning exercise.
So, I baked up an AWS CloudFormation template to spin up a minimal viable server.
You can find the full template on its GitHub Project.
In the designer, it looks like this:
There’s just a few moving parts here:
- An EC2 instance to run the server itself
- A Security group to act as a firewall to limit access to it
- An Elastic IP to keep a static IP for the server
- A Route 53 record set, to point to the server (so I have a simple name to give to my son’s friends’ parents)
- A custom record from the AWS Instance Scheduler, so that we can have the server stop automatically at bed time, and start up again the next day (saving cost as well as being a parental control of sorts)
So, this stack has to be deployed along with the Instance Scheduler, and it assumes that you called that stack “instance-scheduler” (should probably parameterize that). But, hopefully this is useful to someone else.
Some tasks to do in the future:
- Get the server to update to the latest minecraft server automatically
- Push some of the configuration into the template: right now, the
template starts the EC2 instance but doesn’t auto-start the server.
It’s expected that you’ll want to customize the server.properties
before starting it the first time. Then, you can enable it with
sudo systemctl enable minecraft-bedrock-server.serviceand start it with
sudo systemctl start minecraft-bedrock-server.service