User description

To detach from the Tmux session press Ctrl+b then press d.To reopen the Tmux session, type:tmux attach -t 0 Setting up Minecraft on Ubuntu SSH to your Minecraft server using ubuntu as a hostname. Before installing any new packages, it is good to update package repositories: Now, install the Java on Ubuntu by running the command:sudo apt-get -y install default-jdk Check the Java version:java -version Create a directory minecraft and jump there.minecraft hunger games servers Copy and paste the command below to download Minecraft server files: Use the following command to run Minecraft server:java -Xmx1024M -Xms1024M -jar server.jar nogui During the first run command will exit with the following errors:- [main/ERROR]: Failed to load properties from file: server.properties- [main/WARN]: Failed to load eula.txt- [main/INFO]: You need to agree to the EULA in order to run the server. Go to eula.txt for more info. But at the same time it will create all required files. Use the nano editor to accept the Minecraft EULA agreement:nano eula.txt Change eula value to true: The easiest way to run Minecraft server in the background is by using Tmux (for more information about Tmux, check our article How To Start Using Tmux Like A Pro In 5 Minutes).To run Minecraft server in the background, you need to run the tmux command first:tmux Now, run the Minecraft server:java -Xmx1024M -Xms1024M -jar server.jar nogui It will take up to a couple of minutes to launch the server completely. To detach from the Tmux session press Ctrl+b then press d.To reopen the Tmux session, type:tmux attach -t 0 Install Minecraft server on Windows Use RDP to connect to you Windows 2019 EC2 instance, launch PowerShell and install Chocolatey:Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1')) Install Java using the following command. Open Windows Command Line interface by typing cmd and check installed Java version: Install Google Chrome browser: Now, open the Google Chrome browser and download Minecraft Server Download In the Windows Command Line go to C:\minecraft folder and launch the server:cd C:\minecraft java -Xmx1024M -Xms1024M -jar server.jar nogui In File Explorer open C:\minecraft folder and edit eula.txt file. Change eula value to true. Now, run the Minecraft server in Windows Command Line interface once more again:java -Xmx1024 -Xms1024M -jar srver.jar nogui Wait a couple of minutes while server is starting.Windows Firewall configuration By default, Windows EC2 instance has Windows Defender (firewall) enabled, which will prevent connections to your Minecraft server.To enable connections to the server, launch wf.msc: Click to Incoming Rules and then New Rule action.minecraft hunger games servers Choose Port configuration. Specify port TCP/25565. Choose Allow the connection from the list. Enable the following networks:DomainPrivatePublic Add the rule Name, for example, Minecraft server. Now you'll be able to connect to your Windows Minecraft server.Testing Minecraft server Install Minecraft client or use already existing one.Now, add Minecraft server IP-address by clicking on the "Multiplayer" button. Then, click "Add server" button add server.minecraft hunger games servers Enter your Minecraft server name and Server IP address and click Done button to connect to the server. Wait a couple of moments to connect with the server: Once the server is connected, you are ready to play the game: Potential issues Lack of server resources If you're facing the following errors:- [Server thread/WARN]: Can't keep up! Is the server overloaded? Running 11361ms or 227 ticks behind- [Server Watchdog/FATAL]: A single server tick took 64.97 seconds (should be max 0.05)- [Server Watchdog/FATAL]: Considering it to be crashed, server will forcibly shutdown. You need to increase Minecraft server CPU and RAM resources by switching to a bigger instance type.Conclusion Minecraft is a sandbox video game that allows you to explore randomly generated landscapes and construct magnificent structures ranging from modest houses to massive castles. It was created by Mojang Studios and eventually purchased by Microsoft. Minecraft runs on different operating systems. In this write-up, we have demonstrated how to set up a Minecraft server on Ubuntu, CentOS, and Ubuntu.