<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>minecraft Archives - Linux Windows and android Tutorials</title>
	<atom:link href="https://www.osradar.com/tag/minecraft/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.osradar.com</link>
	<description>tutorials and news and Seurity</description>
	<lastBuildDate>Mon, 12 Apr 2021 16:07:47 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=5.8.13</generator>
	<item>
		<title>Install Minecraft Server on Ubuntu 20.04</title>
		<link>https://www.osradar.com/install-minecraft-server-ubuntu-20-04/</link>
					<comments>https://www.osradar.com/install-minecraft-server-ubuntu-20-04/#respond</comments>
		
		<dc:creator><![CDATA[angeloma]]></dc:creator>
		<pubDate>Thu, 15 Apr 2021 00:07:00 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Servers]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[focal]]></category>
		<category><![CDATA[Focal Fossa]]></category>
		<category><![CDATA[minecraft]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[ubuntu]]></category>
		<guid isPermaLink="false">https://www.osradar.com/?p=29453</guid>

					<description><![CDATA[<p>Hello friends. Minecraft is such a popular and versatile game that we can even install our instance. So in this post, you will learn how to install Minecraft server on Ubuntu 20.04 by following a series of steps. Minecraft is one of the most acclaimed games that exist today. Its versatility and ability to reinvent [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/install-minecraft-server-ubuntu-20-04/">Install Minecraft Server on Ubuntu 20.04</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>Hello friends. Minecraft is such a popular and versatile game that we can even install our instance. So in this post, you will learn how to install Minecraft server on Ubuntu 20.04 by following a series of steps.</p>



<p><a href="https://www.minecraft.net/en-us/" target="_blank" rel="noreferrer noopener">Minecraft</a> is one of the most acclaimed games that exist today. Its versatility and ability to reinvent itself as well as the fact that no two games are ever the same make it perfect for our free time. It is also very popular among children because of its content.</p>



<p>This game allows us to deploy a server on our computer which makes it quite versatile. And in this post, we will tell you how.</p>



<h2 id="install-minecraft-server-on-ubuntu-20.04---first-steps"><a href="#install-minecraft-server-on-ubuntu-20.04---first-steps" name="install-minecraft-server-on-ubuntu-20.04---first-steps"></a>Install Minecraft server on Ubuntu 20.04 &#8211; First steps</h2>



<p>As expected, Minecraft is not available in the Ubuntu repositories so we will have to download it and configure it manually.</p>



<p>To do this, open a terminal or connect via <a href="https://www.osradar.com/manages-ssh-connections-from-windows-10-with-putty/" target="_blank" rel="noreferrer noopener">SSH</a> and upgrade Ubuntu</p>



<pre class="wp-block-preformatted">sudo apt update
sudo apt upgrade</pre>



<p>Then download the <code>wget</code> and <code>screen</code> packages needed to complete the tutorial. With the <code>wget</code> command we can perform the download via Terminal and with <code>screen</code> we can run this instance.</p>



<pre class="wp-block-preformatted">sudo apt install wget screen</pre>



<p>Minecraft is created with Java so we have to install it. To do this just install the <code>default-jdk</code> meta package from the official Ubuntu repositories.</p>



<pre class="wp-block-preformatted">sudo apt install default-jdk
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  ca-certificates-java default-jdk-headless default-jre default-jre-headless fontconfig-config fonts-dejavu-core java-common libavahi-client3 libavahi-common-data
  libavahi-common3 libcups2 libdrm-amdgpu1 libdrm-intel1 libdrm-nouveau2 libdrm-radeon1 libfontconfig1 libgif7 libgl1 libgl1-mesa-dri libglapi-mesa libglvnd0
  libglx-mesa0 libglx0 libgraphite2-3 libharfbuzz0b libjpeg-turbo8 libjpeg8 liblcms2-2 libllvm11 libnspr4 libnss3 libpciaccess0 libpcsclite1 libsensors-config
  libsensors5 libvulkan1 libx11-6 libx11-data libx11-xcb1 libxau6 libxcb-dri2-0 libxcb-dri3-0 libxcb-glx0 libxcb-present0 libxcb-sync1 libxcb-xfixes0 libxcb1
  libxdamage1 libxdmcp6 libxext6 libxfixes3 libxi6 libxrender1 libxshmfence1 libxtst6 libxxf86vm1 openjdk-11-jdk openjdk-11-jdk-headless openjdk-11-jre
  openjdk-11-jre-headless x11-common
Suggested packages:
  cups-common liblcms2-utils pcscd lm-sensors openjdk-11-demo openjdk-11-source visualvm libnss-mdns fonts-dejavu-extra fonts-ipafont-gothic fonts-ipafont-mincho
  fonts-wqy-microhei | fonts-wqy-zenhei fonts-indic
Recommended packages:
  mesa-vulkan-drivers | vulkan-icd libxt-dev libatk-wrapper-java-jni fonts-dejavu-extra
The following NEW packages will be installed:
  ca-certificates-java default-jdk default-jdk-headless default-jre default-jre-headless fontconfig-config fonts-dejavu-core java-common libavahi-client3
  libavahi-common-data libavahi-common3 libcups2 libdrm-amdgpu1 libdrm-intel1 libdrm-nouveau2 libdrm-radeon1 libfontconfig1 libgif7 libgl1 libgl1-mesa-dri
  libglapi-mesa libglvnd0 libglx-mesa0 libglx0 libgraphite2-3 libharfbuzz0b libjpeg-turbo8 libjpeg8 liblcms2-2 libllvm11 libnspr4 libnss3 libpciaccess0 libpcsclite1
  libsensors-config libsensors5 libvulkan1 libx11-6 libx11-data libx11-xcb1 libxau6 libxcb-dri2-0 libxcb-dri3-0 libxcb-glx0 libxcb-present0 libxcb-sync1 libxcb-xfixes0
  libxcb1 libxdamage1 libxdmcp6 libxext6 libxfixes3 libxi6 libxrender1 libxshmfence1 libxtst6 libxxf86vm1 openjdk-11-jdk openjdk-11-jdk-headless openjdk-11-jre
  openjdk-11-jre-headless x11-common
0 upgraded, 62 newly installed, 0 to remove and 38 not upgraded.
Need to get 296 MB of archives.
After this operation, 805 MB of additional disk space will be used.
Do you want to continue? [Y/n]</pre>



<h3 id="download-the-minecraft-server-package"><a href="#download-the-minecraft-server-package" name="download-the-minecraft-server-package"></a>Download the Minecraft server package</h3>



<p>So with this single command, all Java will be installed on the system.</p>



<p>The next step is to create a new user along with a home directory in <code>/opt/minecraft/</code> to run minecraft. <strong>This step, although optional, is highly recommended.</strong></p>



<pre class="wp-block-preformatted">sudo useradd -m -r -d /opt/minecraft minecraft minecraft</pre>



<p>And inside the folder we have set for the user, create a folder with the name of the instance. In this case, I have chosen <code>test</code> because it is demonstrative.</p>



<pre class="wp-block-preformatted">sudo mkdir /opt/minecraft/test</pre>



<p>Navigate to the instance folder and from there download the server.</p>



<pre class="wp-block-preformatted">cd /opt/minecraft/test
sudo wget -c https://launcher.mojang.com/v1/objects/1b557e7b033b583cd9f66746b7a9ab1ec1673ced/server.jar
--2021-04-10 18:34:16--  https://launcher.mojang.com/v1/objects/1b557e7b033b583cd9f66746b7a9ab1ec1673ced/server.jar
Resolving launcher.mojang.com (launcher.mojang.com)... 65.9.64.20
Connecting to launcher.mojang.com (launcher.mojang.com)|65.9.64.20|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 37962360 (36M) [application/octet-stream]
Saving to: ‘server.jar’

server.jar                                 100%[=====================================================================================>]  36.20M   107MB/s    in 0.3s    

2021-04-10 18:34:17 (107 MB/s) - ‘server.jar’ saved [37962360/37962360]</pre>



<p><strong>Note: the download link will change according to the stable version. To do so, visit this link and get the link and modify the command</strong>.</p>



<p>Accept the license terms:</p>



<pre class="wp-block-preformatted">sudo bash -c "echo eula=true > /opt/minecraft/test/eula.txt"</pre>



<p>Make the instance folder owned by the minecraft user we created.</p>



<pre class="wp-block-preformatted">sudo chown -R minecraft /opt/minecraft/test/</pre>



<p>It would be best to handle the instance as a system service, so we need to create a new service file for Minecraft</p>



<pre class="wp-block-preformatted">sudo nano /etc/systemd/system/minecraft@.service</pre>



<p>And add the following content:</p>



<pre class="wp-block-preformatted">[Unit]
Description=Minecraft Server: %i
After=network.target

[Service]
WorkingDirectory=/opt/minecraft/%i

User=minecraft
Group=minecraft

Restart=always

ExecStart=/usr/bin/screen -DmS mc-%i /usr/bin/java -Xmx2G -jar server.jar nogui

ExecStop=/usr/bin/screen -p 0 -S mc-%i -X eval 'stuff "say SERVER SHUTTING DOWN IN 10 SECONDS. SAVING ALL MAPS... "010'
ExecStop=/bin/sleep 10
ExecStop=/usr/bin/screen -p 0 -S mc-%i -X eval 'stuff "save-all"010'
ExecStop=/usr/bin/screen -p 0 -S mc-%i -X eval 'stuff "stop"010'


[Install]
WantedBy=multi-user.target</pre>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="445" src="https://www.osradar.com/wp-content/uploads/2021/04/1-6-1024x445.png" alt="1.- Install Minecraft server on Ubuntu 20.04" class="wp-image-29511" srcset="https://www.osradar.com/wp-content/uploads/2021/04/1-6-1024x445.png 1024w, https://www.osradar.com/wp-content/uploads/2021/04/1-6-300x130.png 300w, https://www.osradar.com/wp-content/uploads/2021/04/1-6-768x334.png 768w, https://www.osradar.com/wp-content/uploads/2021/04/1-6-696x303.png 696w, https://www.osradar.com/wp-content/uploads/2021/04/1-6.png 1035w" sizes="(max-width: 1024px) 100vw, 1024px" /><figcaption>1.- Install Minecraft server on Ubuntu 20.04</figcaption></figure>



<p>Pay close attention to the <code>ExecStart</code> line because in the <code>-Xmx</code> option is where we will be able to define the amount of RAM we will allocate to the instance. This will depend on the computer. In this case, I have assigned 2Gb.</p>



<p>Then, save the changes and close the editor.</p>



<p>For the system to recognize the new service you have to refresh the service list.</p>



<pre class="wp-block-preformatted">sudo systemctl daemon-reload</pre>



<p>Now you can start your instance</p>



<pre class="wp-block-preformatted">sudo systemctl start minecraft@test</pre>



<p>And check the status of it:</p>



<pre class="wp-block-preformatted">sudo systemctl status minecraft@test
● minecraft@test.service - Minecraft Server: test
     Loaded: loaded (/etc/systemd/system/minecraft@.service; disabled; vendor preset: enabled)
     Active: active (running) since Sat 2021-04-10 18:47:06 CEST; 8s ago
   Main PID: 5177 (screen)
      Tasks: 24 (limit: 4566)
     Memory: 417.2M
     CGroup: /system.slice/system-minecraft.slice/minecraft@test.service
             ├─5177 /usr/bin/SCREEN -DmS mc-test /usr/bin/java -Xmx2G -jar server.jar nogui
             └─5178 /usr/bin/java -Xmx2G -jar server.jar nogui

Apr 10 18:47:06 osradar systemd[1]: Started Minecraft Server: test.</pre>



<p>To finally check if everything is OK you can monitor port <code>25565</code> which is where Minecraft works. To do this you can use the <code>nmap</code> tool.</p>



<pre class="wp-block-preformatted">sudo apt install nmap
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  libblas3 liblinear4 liblua5.3-0 lua-lpeg nmap-common
Suggested packages:
  liblinear-tools liblinear-dev ncat ndiff zenmap
The following NEW packages will be installed:
  libblas3 liblinear4 liblua5.3-0 lua-lpeg nmap nmap-common
0 upgraded, 6 newly installed, 0 to remove and 38 not upgraded.
Need to get 5,669 kB of archives.
After this operation, 26.8 MB of additional disk space will be used.
Do you want to continue? [Y/n]</pre>



<p>Then run:</p>



<pre class="wp-block-preformatted">nmap -p 25565 localhost</pre>



<p>And you will get an output like this</p>



<pre class="wp-block-preformatted">Starting Nmap 7.80 ( https://nmap.org ) at 2021-04-10 18:50 CEST
Nmap scan report for localhost (127.0.0.1)
Host is up (0.00016s latency).

PORT      STATE SERVICE
25565/tcp open  minecraft

Nmap done: 1 IP address (1 host up) scanned in 0.05 seconds</pre>



<p>This indicates that the instance is running and can be accessed.</p>



<h2 id="conclusion"><a href="#conclusion" name="conclusion"></a>Conclusion</h2>



<p>Minecraft is a revolution and we can have our instance as easy as that. Thanks to these steps a newbie can have his own server where he can have hours of fun.</p>



<p></p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/install-minecraft-server-ubuntu-20-04/">Install Minecraft Server on Ubuntu 20.04</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.osradar.com/install-minecraft-server-ubuntu-20-04/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
