{"id":26172685,"url":"https://github.com/epiresdasilva/aws-minecraft-server","last_synced_at":"2025-04-06T06:06:56.446Z","repository":{"id":215604527,"uuid":"739337989","full_name":"epiresdasilva/aws-minecraft-server","owner":"epiresdasilva","description":"An easy and fast way to create your own Minecraft Server.","archived":false,"fork":false,"pushed_at":"2024-02-03T20:38:07.000Z","size":11,"stargazers_count":373,"open_issues_count":1,"forks_count":61,"subscribers_count":9,"default_branch":"main","last_synced_at":"2025-03-30T05:03:50.327Z","etag":null,"topics":["aws","aws-cloudformation","aws-ec2","cloudformation","ec2","minecraft","minecraft-server"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/epiresdasilva.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2024-01-05T10:24:07.000Z","updated_at":"2025-03-29T17:55:34.000Z","dependencies_parsed_at":"2024-01-05T12:24:48.344Z","dependency_job_id":"fa9094bd-fe60-4857-8f9f-8a959057605a","html_url":"https://github.com/epiresdasilva/aws-minecraft-server","commit_stats":null,"previous_names":["epiresdasilva/aws-minecraft-server"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/epiresdasilva%2Faws-minecraft-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/epiresdasilva%2Faws-minecraft-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/epiresdasilva%2Faws-minecraft-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/epiresdasilva%2Faws-minecraft-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/epiresdasilva","download_url":"https://codeload.github.com/epiresdasilva/aws-minecraft-server/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247441044,"owners_count":20939239,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aws","aws-cloudformation","aws-ec2","cloudformation","ec2","minecraft","minecraft-server"],"created_at":"2025-03-11T19:58:14.433Z","updated_at":"2025-04-06T06:06:56.429Z","avatar_url":"https://github.com/epiresdasilva.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Minecraft Server on AWS\n\nMy 7 years old son is a fan of Minecraft. He started playing last year (2023) and just talk about that. Now, he want to play with us, me and my wife, as well with some cousins.\n\nIt's available lots of servers on the internet, both paid or free, but those server don't have the security I want to my kid.\n\nThat's because I had the idea of creating my own Minecraft Server on AWS. A server it will be used only by us.\n\nI'm creating this repository to share how I did that and maybe can help other parents (or not) with the same necessity.\n\n## Steps\n\nIt's very simple to create. To do this faster and reproduceble, I create a CloudFormation code for that.\n\nYou'll find a file called `minecraft-server.yaml`.\n\nBasically, in this file I create a Security Groud to allow only few ports I want to expose to the internet, like SSH and the port 25565 that is the port Minecraft Launcher connects.\n\n```yaml\n  MinecraftSecurityGroup:\n    Type: 'AWS::EC2::SecurityGroup'\n    Properties:\n      GroupDescription: 'Enable SSH and Minecraft server port'\n      SecurityGroupIngress:\n        - IpProtocol: tcp\n          FromPort: 22\n          ToPort: 22\n          CidrIp: 0.0.0.0/0\n        - IpProtocol: tcp\n          FromPort: 25565\n          ToPort: 25565\n          CidrIp: 0.0.0.0/0\n```\n\nAnother important part is creating the EC2 instance. Basically, you need to choose the Linux image you want, as well the instance type. I choose a `t4g.small` and it's running very well. I just need to understand if can be a smaller instance yet.\n\n```yaml\n      InstanceType: t4g.small\n      ImageId: ami-02cd6549baea35b55\n      KeyName: Minecraft Server\n```\n\nThe instance type you can find in the EC2 page or using the AWS Calculator, so doing that it's easier to understand how much it will costs.\n\nThe image ID you'll find on the AMI Marketplace on the EC2 section on your AWS Management Console.\n\nYou need to create a KeyPair also on the EC2 section. After creating, just put the name in the \"KeyName\" on the YAML file.\n\nFinally, you just need to run the following command:\n`aws cloudformation create-stack --stack-name MinecraftServerStack --template-body file://minecraft-server.yaml --region us-east-1`\n\n## Security\n\nRemember, DO NOT create that stack using your root user. Create an especific one to that. On doing that, remember to give only the necessary permissions you need. For instance, I used `AmazonEC2FullAccess` and `AWSCloudFormationFullAccess` and worked fine, but maybe can be more restricted yet.\n\nThis template doesn't create an advanced security for that server, so if you need to improve security it's important working on new layers of security in that template.\n\n## Reboot\n\nNow, the Minecraft server have a service to make easier to maintan when a reboot is needed. \nFollowing some useful commands.\n\n1. Start the service:\n\n```bash\nsudo systemctl start minecraft.service\n```\n\n2. Check the service status:\n\n```bash\nsudo systemctl status minecraft.service\n```\n\n3. Service logs:\n\n```bash\nsudo journalctl -u minecraft.service\n```\n\n## Playing Minecraft\n\nNow, you have your own Minecraft Server and you are able to play with your friends and family.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fepiresdasilva%2Faws-minecraft-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fepiresdasilva%2Faws-minecraft-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fepiresdasilva%2Faws-minecraft-server/lists"}