Affordable, AWS-hosted Minecraft server that is booted up through a Heroku web app and automatically shuts down when idle
MIT License
Reimagine The Good Place (or The Bad Place) in Minecraft. Become your own architect and manifest a world where it's your way or the highway. Design a server for who you want no matter what Chidi says is 'ethical' or not.
An AWS-hosted Minecraft server that you only pay for when it's being used. Minecraft Architect utilizes AWS EC2 and Heroku to start the server at will and automatically shut it down when idle. This project is based on/adapted from trevor/OnDemandMinecraft and utilizes alternative methods of server startup and cron jobs.
IAM Management Console
, select Users
on the left and Add user
Programmatic Access
boxAmazonEC2FullAccess
Access key ID
and Secret access key
- these will be used laterEC2 Management Console
, select Key Pairs
under Network & Security
in the left sidebarCreate Key Pair
and name it as desired.pem
file - this should prompt you automaticallyCloudFormation
, select Create stack
and continue with the with new resources (standard)
optionUpload a template file
option and upload the instance/infrastructure.yaml
file in this respositoryus-east-2 amd64 hvm:ebs
will help narrow down your options (note you must change the region)t3.small
size with a 20 person server but have not yet reached capacity. See instance specs here https://aws.amazon.com/ec2/instance-types/t3/
192.168.1.1
(this will never be your IP), put 192.168.1.1/1
Resources
tab and take note of the EC2 instance Physical ID
. We will need this later.pem
file to. Then, SSH into the EC2 instance with ssh ubuntu@{PUBLIC_IP_ADDRESS} -i ./path/to/pem/file
chmod 400 ./path/to/pem/file
to fix thissudo apt-get update
Java
and Ubuntu should give you a list of available packages. Install openjdk version 8 or above. For example, sudo apt-get install openjdk-8-jre-headless
mkdir /opt
adduser --system --shell /bin/bash --home /opt/minecraft --group minecraft
and create a server
directory in its home mkdir /opt/minecraft/server
Copy Link Address
. In your EC2 instance, run wget LINK_ADDRESS -P /opt/minecraft/server
. In my case, this is wget https://launcher.mojang.com/v1/objects/4d1826eebac84847c71a77f9349cc22afd0cf0a1/server.jar -P /opt/minecraft/server
. You should now have a server.jar
file in your server folder.eula.txt
file with eula=true
as its contents. echo "eula=true" >> /opt/minecraft/server/eula.txt
/instance/minecraft.service
by touch /etc/systemd/system/minecraft.service
and editing its contentssystemctl enable minecraft.service
instance/autoshutdown.py
and instance/crontab
to your sudo home directory and run sudo crontab /home/ubuntu/crontab -u ubuntu
. This will enable periodic player count checks and shutdown the server if it is idle for 5 minutestail /opt/minecraft/server/logs/latest.log
heroku create PROJECT_NAME
heroku config:set \
AWS_ACCESS_KEY_ID=awsaccesskey \
AWS_SECRET_ACCESS_KEY=awssecretaccesskey \
INSTANCE_ID=instanceid \
REGION_NAME=regionname \
SERVER_PASSWORD=serverpassword
git push heroku master