How to install a Minecraft Bedrock Server on AWS
Server software download
Download the .zip from Minecraft website.
Expand the zip and put contents into a code S3 bucket.
Security Group
Create a new security group with the following inbound rules,
Type | Protocol | Port Range | Source |
---|---|---|---|
SSH | TCP | 22 | Your laptop's IP address |
Custom UDP Rule | UDP | 19132 | 0.0.0.0/0 |
Role
Create a new role for the Minecraft server. Attach the policy AmazonS3ReadOnlyAccess to it.
EC2 Instance to run the Bedrock server
Launch an EC2 instance with the following configuration,
Attribute | Value |
---|---|
AMI | Ubuntu Server 20.04 LTS |
EC2 Instance Type | t2.medium |
IAM Role | Role you created above |
Security Group | Security Group you created above |
Name Tag | minecraft-server |
Setting up the server
SSH onto the EC2 instance. Run the following commands to install Minecraft Bedrock server on it.
sudo apt-get update
sudo snap install aws-cli --classic
mkdir minecraft
cd minecraft
aws s3 cp --recursive s3://<your code bucket and prefix> .
LD_LIBRARY_PATH=.
export LD_LIBRARY_PATH
chmod +rwx bedrock_server
Using 'screen' so that CLI continues after logging off
After you've started your Bedrock server, you'll probably want to be able to keep it running even after your SSH session ends. To do this use the Linux screen
command.
It is described here, https://linuxize.com/post/how-to-use-linux-screen/
To get it started,
screen
To detach,
Ctrl+a d
To reattach,
screen -r
Start the Bedrock server
./bedrock_server
Useful links