How to host a Minecraft instance using Docker and AWS
Hello everyone, this is a quick tutorial on how to get set up with a Minecraft instance using Docker and Amazon Web Services (AWS).
By the end of this article, you should:
Have a publically accessible Minecraft server
Know how to start and stop the Minecraft server
Understand the basics of Docker and AWS
Before we start...
Why are we doing this? I know you clicked on this article because you wish to host Minecraft on the cloud (using AWS and Docker), but why are we using these technologies?
Firstly, AWS. The main draw for AWS is that its cloud platform ecosystem is very mature and supported very well. Everyone and their mother uses it so you could ask just about anybody for help and you can find a solution/workaround in no time.
- The reason why I'm picking AWS is to get myself comfortable using it, and as a jumping-off point for something more ambitious.
(Subscribe and stick around for another Blog coming shortly)
Secondly, Docker. This is relatively self-explanatory, its ability to be so portable will be invaluable when you want consistent behavior between a local dev environment and the production cloud environment.
- This is just one of the benefits of Docker, other benefits include easily saving configuration as code, easier to implement high availability if the server makes it big, and standardization of runtime environments.
Step #0: Prerequisites
To take the first step, you have to tie your laces. Take time to make sure that these things are set up. If these things are not set up, you are going to have a bad time.
AWS Account
Make sure you have an AWS account. All you need to do is to have either a working Credit Card or a Debit Card and you should be good as gold.
If you see AWS charge you a dollar without doing anything, don't worry. They should refund you the amount back shortly after. They want to make sure that you can pay your bills if you decide to go for paid options.
Access to Github
If you are reading this, you should be good to go. Just make sure that you have the Git link to my docker-minecraft-server repo ready:
If you somehow cannot access my Github, you can try the repo that I forked.
The main difference between choosing me over itzg (cool and above average human) is that I may have more quality-of-life additions to my repo, and it makes me feel better about myself knowing that my work is useful to someone else in this cold and empty world. No pressure ๐.
Money (Around ~$20 USD)
This project WILL require money, but the good thing is that the bill is based on how much you use the service.
Under unoptimal circumstances, you can expect ~$40 USD per month.
You will see this if you pick high performance OR neglect to stop it when the server is not being used.
Realistically speaking, you should expect around $10 USD per month.
Just make sure to treat the server like the lights, turn it on when you need it, and turn it off if you don't.
Don't worry about getting USD currency to pay. AWS should be able to convert the bill into your local currency. Just make sure you have the equivalent of $20 USD in your account.
Step #1: Instance Creation
This is a stub (for now)
Subscribe to my newsletter
Read articles from Henry Lam directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by