Build a Minecraft server on AWS

Create a Minecraft server. There is nothing new because various people have already written articles. Confirmation that it worked with this combination.

What is a Minecraft server?

Minecraft can communicate over the network and play multiplayer. There are two ways to do multiplayer, one is to publish one machine playing Minecraft in the network and connect it to another player, and the other is to create a host that runs a server-only service in the network and use it as a server. is there.

To play multiplayer in Minecraft, you need to match the version with the Minecraft lineage.

Minecraft lineage

When playing multiplayer, you have to match the system. There are two main lines now

--Java version --Integrated Edition (Bedrock Edition)

The lineage must match everyone who plays and the server itself. The currently released server software is Java version. An integrated version of the server is also available (https://help.minecraft.net/hc/en-us/articles/360035131651-Dedicated-Servers-for-Minecraft-on-Bedrock-), but the alpha version.

By the way, there are systems other than the above. The server software is not open to the public, but it can be multiplayer in a peer-to-peer manner. In that case, multiplayer can only be performed between each system.

--Browser version

――There is another Minecraft China, Nanda? https://minecraft-ja.gamepedia.com/Minecraft_China

version

You need to match the version of the server with the version of Minecraft for the multiplayer participants. The Java version is the Java version, and as of May 29, 2020, the latest two are as follows.

--1.15.2 (Official version) --20w21a (Snapshot of development version 1.16)

However, download it from here

https://www.minecraft.net/ja-jp/download/server/

The available server version is 1.15.2, which is the latest version of the official version.

Click here for other old versions and development versions.

https://mcversions.net/

Server operating environment

It works on java, so it works on Windows / Mac / Linux. Of course, Raspsberry Pi too!

Is it difficult to run a server?

https://minecraft.gamepedia.com/Tutorials/Setting_up_a_server according to,

Setting up a server takes some time, and some technical knowledge. Don't try to set up a server unless you have some basic computer and networking abilities.

However, when I tried it, it worked easily.

Start AWS server

First, start Ubuntu 20.04 using the TOKYO region, t2.midium.

After logging in


$ sudo apt update
$ sudo apt upgrade 

After doing, install only Java. For the time being, I installed the latest JRE on Ubuntu 20.04.


$ sudo apt install openjdk-14-jre

https://www.minecraft.net/ja-jp/download/server/ Download the server from.

image.png

Right-click the link with the mouse to get the address and paste it below with ssh.


$ wget https://launcher.mojang.com/v1/objects/bb2b6b1aefcd70dfd1892149ac3a215f6c636b07/server.jar

Try to start


$ java -Xmx1024M -Xms1024M -jar server.jar nogui
[08:18:47] [main/ERROR]: Failed to load properties from file: server.properties
[08:18:47] [main/WARN]: Failed to load eula.txt
[08:18:47] [main/INFO]: You need to agree to the EULA in order to run the server. Go to eula.txt for more info.

The result was that.


$ ls -alh

If you try


total 35M
drwxr-xr-x 5 ubuntu ubuntu 4.0K May 28 08:18 .
drwxr-xr-x 3 root   root   4.0K May 28 07:51 ..
-rw-r--r-- 1 ubuntu ubuntu  220 Feb 25 12:03 .bash_logout
-rw-r--r-- 1 ubuntu ubuntu 3.7K Feb 25 12:03 .bashrc
drwx------ 2 ubuntu ubuntu 4.0K May 28 07:56 .cache
-rw-r--r-- 1 ubuntu ubuntu  807 Feb 25 12:03 .profile
drwx------ 2 ubuntu ubuntu 4.0K May 28 07:51 .ssh
-rw-r--r-- 1 ubuntu ubuntu    0 May 28 08:01 .sudo_as_admin_successful
-rw-rw-r-- 1 ubuntu ubuntu  181 May 28 08:18 eula.txt
drwxrwxr-x 2 ubuntu ubuntu 4.0K May 28 08:18 logs
-rw-rw-r-- 1 ubuntu ubuntu  35M Jan 17 10:06 server.jar
-rw-rw-r-- 1 ubuntu ubuntu  940 May 28 08:18 server.properties

So, it seems that eula.txt is created.


$ vim eula.txt 

As the contents


#By changing the setting below to TRUE you are indicating your agreement to our EULA (https://account.mojang.com/documents/minecraft_eula).
#Fri May 29 19:21:06 JST 2020
eula=false

Rewrite false to true and save.

Start again


$ java -Xmx1024M -Xms1024M -jar server.jar nogui
[08:20:14] [main/WARN]: Ambiguity between arguments [teleport, destination] and [teleport, targets] with inputs: [Player, 0123, @e, dd12be42-52a9-4a91-a8a1-11c01849e498]
[08:20:14] [main/WARN]: Ambiguity between arguments [teleport, location] and [teleport, destination] with inputs: [0.1 -0.5 .9, 0 0 0]
[08:20:14] [main/WARN]: Ambiguity between arguments [teleport, location] and [teleport, targets] with inputs: [0.1 -0.5 .9, 0 0 0]
[08:20:14] [main/WARN]: Ambiguity between arguments [teleport, targets] and [teleport, destination] with inputs: [Player, 0123, dd12be42-52a9-4a91-a8a1-11c01849e498]
[08:20:14] [main/WARN]: Ambiguity between arguments [teleport, targets, location] and [teleport, targets, destination] with inputs: [0.1 -0.5 .9, 0 0 0]
[08:20:14] [Server thread/INFO]: Starting minecraft server version 1.15.2
[08:20:14] [Server thread/INFO]: Loading properties
[08:20:14] [Server thread/INFO]: Default game type: SURVIVAL
[08:20:14] [Server thread/INFO]: Generating keypair
[08:20:15] [Server thread/INFO]: Starting Minecraft server on *:25565
[08:20:15] [Server thread/INFO]: Using epoll channel type
[08:20:15] [Server thread/INFO]: Preparing level "world"
[08:20:15] [Server thread/INFO]: Found new data pack vanilla, loading it automatically
[08:20:15] [Server thread/INFO]: Reloading ResourceManager: Default
[08:20:47] [Server thread/INFO]: Loaded 6 recipes
[08:20:47] [Server thread/INFO]: Loaded 825 advancements
[08:20:53] [Server thread/INFO]: Preparing start region for dimension minecraft:overworld
[08:20:53] [Server-Worker-1/INFO]: Preparing spawn area: 0%
[08:20:53] [Server-Worker-1/INFO]: Preparing spawn area: 0%
[08:20:54] [Server-Worker-1/INFO]: Preparing spawn area: 0%
[08:20:54] [Server-Worker-1/INFO]: Preparing spawn area: 0%
[08:20:55] [Server-Worker-1/INFO]: Preparing spawn area: 1%
[08:20:55] [Server-Worker-1/INFO]: Preparing spawn area: 2%
[08:20:56] [Server-Worker-1/INFO]: Preparing spawn area: 4%
[08:20:56] [Server-Worker-1/INFO]: Preparing spawn area: 5%
[08:20:57] [Server-Worker-1/INFO]: Preparing spawn area: 7%
[08:20:57] [Server-Worker-1/INFO]: Preparing spawn area: 10%
[08:20:58] [Server-Worker-1/INFO]: Preparing spawn area: 12%
[08:20:58] [Server-Worker-1/INFO]: Preparing spawn area: 14%
[08:20:59] [Server-Worker-1/INFO]: Preparing spawn area: 17%
[08:20:59] [Server-Worker-1/INFO]: Preparing spawn area: 19%
[08:21:00] [Server-Worker-1/INFO]: Preparing spawn area: 22%
[08:21:00] [Server-Worker-1/INFO]: Preparing spawn area: 24%
[08:21:01] [Server-Worker-1/INFO]: Preparing spawn area: 26%
[08:21:01] [Server-Worker-1/INFO]: Preparing spawn area: 29%
[08:21:02] [Server-Worker-1/INFO]: Preparing spawn area: 32%
[08:21:02] [Server-Worker-1/INFO]: Preparing spawn area: 33%
[08:21:03] [Server-Worker-1/INFO]: Preparing spawn area: 36%
[08:21:03] [Server-Worker-1/INFO]: Preparing spawn area: 38%
[08:21:04] [Server-Worker-1/INFO]: Preparing spawn area: 41%
.
.
.

It seems to have started.

Port disclosure

After releasing TCP25565 and UDP25565, I was able to connect and play from the outside.

image.png

Recommended Posts

Build a Minecraft server on AWS
Build a Maven repository on AWS S3
Build a streaming server on your iOS app
Build a Laravel environment on an AWS instance
Build VNC Server on Ubuntu 20.04
Minecraft server on Raspberry Pi 4
Memo to build a Servlet environment on AWS EC2
Build a Ruby on Rails development environment on AWS Cloud9
Build a XAMPP environment on Ubuntu
Set up a MineCraft Paper server on Ubuntu 20.04.1 LTS ② Update
Easily set up a Jenkins server on AWS using Bitnami's AMI
How to create a web server on an EC2 instance on AWS
Build a container version of Minecraft server and use https-enabled Dynmap
Build Maven repository on AWS S3 service
Build a Java development environment on Mac
Build Java 8 development environment on AWS Cloud9
Build an environment with Docker on AWS
Build a JMeter environment on your Mac
Build Web Application Server (Java) on VPS
Build a development environment on AWS EC2 with CentOS7 + Nginx + pm2 + Nuxt.js
Build a test flow on CircleCI using Jib
How to deploy a container on AWS Lambda
Build a DHCP and NAT router on Ubuntu 16.04
Yes, let's make a Minecraft server (Ubuntu 20.04 + Bedrock Server)
Build a Java runtime environment on Sakura VPS
How to build a Pytorch environment on Ubuntu
Install docker-compose on a Graviton 2 instance of AWS EC2
Build SPARQL endpoints without AWS server (Apache Jena edition)
Build a docker container for a python simple web server
java build a triangle
I tried using Log4j2 on a Java EE server
Build a Maven in-house repository on Google Cloud Storage
Steps to set up a VNC server on CentOS 8.3
A high bill from AWS during development on rails ...
Build Zabbix on Ubuntu 20.04
Creating a docker host on AWS using Docker Machine (personal memorandum)
[Amateur remarks] Build multiple WordPress on AWS using Docker Compose
[Docker] Build a site on Hugo and publish it on GitHub
How to create an application server on an EC2 instance on AWS
How to get inside a container running on AWS Fargate
Try launching a webAP server on the micro using Helidon
How to deploy a kotlin (java) app on AWS fargate
A memo to build Jitsi Meet on Azure with docker-compose
Build a CentOS 8 virtual environment on your Mac with VirtualBox
I tried running a Docker container on AWS IoT Greengrass 2.0
How to deploy a Rails application on AWS (article summary)
Launch a terminal on VScode
Install Docker on Ubuntu Server 20.04
Manually build OpenJDK on Windows
With [AWS] CodeStar, you can build a Spring (Java) project running on Lambda in just 3 minutes! !!
Ubuntu on Windows build speed
Post a video on rails
Update RVM on AWS Cloud9
Install docker on AWS EC2
Build AWS Lambda with Quarkus
Ruby ① Build a Windows environment
Install Ubuntu Server 20.04 on Btrfs
How to run a mock server on Swagger-ui using stoplight/prism (using AWS/EC2/Docker)
Build a development environment where Ruby on Rails breakpoints work on Windows
[Introduction] Build a virtual environment of Vagrant + VirtualBox on Window10 [Environment construction]
Steps to build a Ruby on Rails development environment with Vagrant