How to Create a Minecraft Server in the Cloud?

Source: Internet
Author: User
Keywords how to create a minecraft server how to setup a minecraft server setting up a minecraft server

Setting up the minecraft server on Alibaba Cloud. The 5-person server has the lowest server configuration (single core + 1G memory + 1M bandwidth).

As we all know, MC is written in JAVA, both the client and server are directly a jar package, so the prerequisite is the need for a jre. My MC suit is completely built manually. Let me tell you the steps to build manually. Create a Linux container, ubuntu, debian, centos to see what you like, I use debian to install jre or jdk to install basic tools, tmux, vim, etc. to download Minecraft server files. Use tmux to run Minecraft server files for basic Server configuration Why use tmux here? Because we open a game server, we have to perform some operations without stopping the server, such as adding an op, ban a certain ip, etc., and then let it continue to run in the background. Tmux just meets this need, of course, other tools are also available, but I am used to using tmux. You can see that manual operation is still troublesome. Is there an easier way?

  
The answer is that the times are developing, so the office model is constantly being updated. More and more people will use the remote desktop connection tool. Today I will introduce you to IIS7 remote desktop management to make it easier for everyone to work and study.
1. The latest version of IIS7 remote desktop management in Chinese is a professional remote desktop management tool, which updates the original 09 network remote desktop management. Compared with the previous version, the operation is more convenient, it can remote multiple servers at the same time, and freedom among multiple servers Switching, completely stress-free. IIS7 Remote Desktop Management can save, edit and delete your remote server information.
   2. The IIS7 remote desktop management has an intuitive interface designed for all types of users. It is easy to deploy and use in an enterprise environment. One-click import of server information, without much gossip, go directly to the Dockerfile.

Dockerfile# 1FROM hub.c.163.com/nce2/jdk:1.7.0_03
  RUN apt-get install -y wget tmux
  # 2RUN mkdir -p /home/minecraftServer/1.8.9WORKDIR /home/minecraftServer/1.8.9
  RUN wget https://git.oschina.net/EchoDemos/MinecraftServer/raw/master/minecraft_server.1.8.9.jar
  # 3RUN echo eula=true> eula.txt

# 4ENTRYPOINT tmux new-session -d -s server'java -jar minecraft_server.1.8.9.jar' & /usr/sbin/sshd -D 

Introduce this Dockerfile, because NetEase cloud computing basic service has jdk mirror, so directly Use it as a base image, and then install some basic tools. The second part is to create a directory to be used as a working directory and download the server files to this directory. The third part is to create and set up the files needed for the MC server. Part 4 represents the entry point when the container starts, using tmux to make the server run in the background and enable ssh login at the same time. Because you are not sure about the specifications you used when creating the container, when starting the server, no jvm parameters were specified. In the second step, in order to facilitate the demonstration, I uploaded the server file to oschina's git repository. Of course, you can replace it with the address of the server file you want to download. If there is already a downloaded file locally, you can upload it directly to the container. Let's talk about the files needed by the MC server. 

In fact, the names of these files clearly tell you their role. The first file is eula.txt, which literally means the end user license agreement. You must agree to the agreement (eula=true in the file) to start the server normally. When you do not create this file, the server will automatically create eula.txt when it runs for the first time, and also tells you that you must agree to the agreement before you can continue to start. Another very important file is server.properties, which stores various parameter configurations related to the server. You can go directly to the wiki to check the meaning of each parameter. Only one parameter related to login is online-mode=true. This parameter indicates whether to enable online authentication. What does it mean? When starting online authentication, the server will verify the Minecraft account system for each login account Whether the account is legal, if not, it will be refused to log in. If you want to turn off online verification when the server starts, you can add RUN echo online-mode=false> server.properties in Part 3, but when online verification is turned off, any logged in account will not be verified , Directly logged in, which means that you can log in directly to someone else's account as long as you know someone else's username, so it is recommended that you turn on online verification. Other files, such as ip blacklist banned-ips.json, account blacklist banned-players.json, op list ops.json, etc., will not be described in detail here. Interested students can go to the wiki and see the file structure. Very simple. 

Start the MC journey to use Dockerfile to build a custom image, and use the built image to create a container. The specific method will not be expanded here. You can refer to the official help document of the hive https://c.163.com/wiki/index.php ?title=Create a custom image and https://c.163.com/wiki/index.php?title=Create a container. After the container is created, open the Minecraft client, enter the container IP you just created, and start your Minecraft journey. Friendly reminder: As we all know, Minecraft eats memory very much, so it is recommended to use more than 1G of memory.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.