Give your amazon user permissions to run docker-compose: sudo chmod +x /usr/local/bin/docker-compose Give your amazon user permissions to run docker commands: sudo usermod -a -G docker ec2-user Start the docker service: sudo service docker start Install docker-compose: sudo curl -L $(uname -s)-$(uname -m) -o /usr/local/bin/docker-compose Install the software we will need to run this minecraft server: sudo yum install java-1.8.0-openjdk-headless docker -y It sometimes takes a minute for the instance to come back up. Then reboot the instance with sudo rebootĬonnect to the machine again. Downloading dependencies and Docker #įirst we will update all installed packages and delete old ones with sudo yum update -y Once you are connected, we can start issuing commands. Since there are many different ways to connect and different OS’s to connect from, and Amazon has already done a great job of explaining how to connect to your instance, follow the official AWS instructions on how to get connected using an SSH client here. Here is where that key file you downloaded before will come in handy. In order to set up the server, we need to connect to the instance. Once downloaded, select “Launch Instances” and your computer in the cloud will be up and running in a couple of minutes! Grab a cup of coffee while AWS gets it set up. Before you launch the instance click on “Download key pair” and keep track of its location, since you will need this to connect to the instance. When prompted to select or create a key pair, select “Create a new key pair” and give it a name. Leave the settings as they are, and ignore the security warnings, we will address them with the next step. Once selected, click review and launch on the bottom right corner. Granted, you could use any other instance type, most of the tutorial will still apply. Note that AWS only provides one core and one gigabyte of memory (it’s free so I won’t complain) which might not be enough if you are planning on installing plugins or mods in the future, but is plenty to host a vanilla server with 2-3 friends. The instance type I left as t2.micro, since it is free tier eligible. Keep in mind that some of the commands will change if you decide to go for another distro (sudo apt install vs sudo yum install for example). Creating the instance #įirstly, find and click on EC2 in the AWS management console.įor this tutorial I used amazon linux, however most other linux distros should work. Once you have the account set up, we need to create an instance. Amazon does this to check that the card does indeed exist. The easiest way to do this is to make a new account to use for the server.ĭisclaimer: When you set up an AWS account, you will be charged 1$ up front that will then be returned at a later date. It is important to note that if you want to take advantage of the free tier advantages that I will use in this tutorial, your account needs to be less than a year old and you will have to check your usage limits. Without further ado, lets get to it! Setup #įirstly, you will need an AWS account. This installation will be pretty bare-bones, but allow you to access the world and configuration files that will be configured to be outside of the docker container, so if you decide you want to delete the image and re install it, or swap it out for another one, the hassle should be minimal. The part I like the most is that with a simple server restart, it will update the Minecraft server to run on the latest version. Thanks to the author and the contributors to this github repository, I can use this image to set up a no frills super easy and maintainable Minecraft server. The secret sauce of this tutorial is the fact that we are going to use docker with this docker image. Granted, self hosting has its own benefits, and I am currently working on something using that approach which I will write about on another article. jar file every time Minecraft updated, and especially having a computer running in my home, even if it was a raspberry pi, consuming power 24/7 when perhaps I only played on the server with my friends a couple of days a week. This all started when I was looking to host my own Minecraft server, but I did not want to run it from my own network for a couple of reasons.įirstly, I did not want to open ports on my router since this is always a security concern, but most importantly, I was tired of having to go through all the set up every time I wanted to set up a new server, manually updating the.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |