<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Scalable Game on LEl_FENG Blog</title><link>https://blog.xpdbk.com/en/tags/scalable-game/</link><description>Recent content in Scalable Game on LEl_FENG Blog</description><generator>Hugo -- gohugo.io</generator><language>en</language><copyright>LEl_FENG Copyright</copyright><lastBuildDate>Fri, 10 Feb 2023 00:00:00 +0700</lastBuildDate><atom:link href="https://blog.xpdbk.com/en/tags/scalable-game/index.xml" rel="self" type="application/rss+xml"/><item><title>How to Set Up a Vanilla Minecraft Java Server on a VPS</title><link>https://blog.xpdbk.com/en/posts/mc-server/</link><pubDate>Fri, 10 Feb 2023 00:00:00 +0700</pubDate><guid>https://blog.xpdbk.com/en/posts/mc-server/</guid><description>&lt;img src="https://blog.xpdbk.com/en/posts/mc-server/game.webp" alt="Featured image of post How to Set Up a Vanilla Minecraft Java Server on a VPS" />&lt;blockquote>
&lt;p>&lt;strong>TL;DR / Geek Summary:&lt;/strong>&lt;/p>
&lt;ul>
&lt;li>Server Deployment: Step-by-step guide to hosting a Minecraft Java server on Ubuntu 22.04.&lt;/li>
&lt;li>Infrastructure: JDK versioning logic (v8 for &amp;lt;1.16, v17 for &amp;gt;1.18) and &lt;code>screen&lt;/code> session management for 24/7 uptime.&lt;/li>
&lt;li>Optimization: Custom &lt;code>start.sh&lt;/code> loop with G1GC garbage collection and memory allocation (Xmx/Xms) tuning for scalability.&lt;/li>
&lt;/ul>
&lt;/blockquote>
&lt;h2 id="setting-up-a-minecraft-server-on-a-vps-linux">
&lt;a href="#setting-up-a-minecraft-server-on-a-vps-linux" class="heading-anchor" aria-label="Anchor for Setting Up a Minecraft Server on a VPS (Linux)">#&lt;/a>
Setting Up a Minecraft Server on a VPS (Linux)
&lt;/h2>
&lt;h2 id="i-why-set-it-up">
&lt;a href="#i-why-set-it-up" class="heading-anchor" aria-label="Anchor for I. Why Set It Up?">#&lt;/a>
I. Why Set It Up?
&lt;/h2>
&lt;p>When playing &lt;code>Minecraft&lt;/code>, we often want to play multiplayer. However, &lt;code>Minecraft Java&lt;/code> natively only supports &lt;code>LAN&lt;/code> multiplayer for local networks. This is when we need to set up a server so players from different regions can play online together.&lt;/p>
&lt;blockquote>
&lt;p>The English version is currently in progress.&lt;/p>
&lt;/blockquote>
&lt;h2 id="ii-installation-environment">
&lt;a href="#ii-installation-environment" class="heading-anchor" aria-label="Anchor for II. Installation Environment">#&lt;/a>
II. Installation Environment
&lt;/h2>
&lt;ul>
&lt;li>Virtual Private Server (VPS) OS version: &lt;code>Ubuntu 22.04&lt;/code> 64-bit&lt;/li>
&lt;li>Minecraft International Edition version: &lt;code>1.12.2&lt;/code> &lt;code>Java&lt;/code> Edition&lt;/li>
&lt;/ul>
&lt;h2 id="iii-setup-steps">
&lt;a href="#iii-setup-steps" class="heading-anchor" aria-label="Anchor for III. Setup Steps">#&lt;/a>
III. Setup Steps
&lt;/h2>
&lt;ol>
&lt;li>
&lt;p>Connect to your server via SSH.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>Enter the following commands to install the JDK environment.&lt;/p>
&lt;/li>
&lt;/ol>
&lt;blockquote>
&lt;p>If you don&amp;rsquo;t know how to use SSH, you can search for a guide on Baidu or Bing.&lt;/p>
&lt;/blockquote>
&lt;h3 id="jdk-environment">
&lt;a href="#jdk-environment" class="heading-anchor" aria-label="Anchor for JDK Environment">#&lt;/a>
JDK Environment
&lt;/h3>
&lt;p>For &lt;code>1.16&lt;/code> and earlier versions, you need to install &lt;code>JDK 8&lt;/code>.&lt;/p>
&lt;div class="highlight">&lt;div class="chroma">
&lt;table class="lntable">&lt;tr>&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code>&lt;span class="lnt">1
&lt;/span>&lt;/code>&lt;/pre>&lt;/td>
&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code class="language-Bash" data-lang="Bash">&lt;span class="line">&lt;span class="cl">sudo apt install openjdk-8-jdk
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/td>&lt;/tr>&lt;/table>
&lt;/div>
&lt;/div>&lt;p>For &lt;code>1.17&lt;/code>, you need to install &lt;code>JDK 16&lt;/code>.&lt;/p>
&lt;div class="highlight">&lt;div class="chroma">
&lt;table class="lntable">&lt;tr>&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code>&lt;span class="lnt">1
&lt;/span>&lt;/code>&lt;/pre>&lt;/td>
&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code class="language-Bash" data-lang="Bash">&lt;span class="line">&lt;span class="cl">sudo apt install openjdk-16-jdk
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/td>&lt;/tr>&lt;/table>
&lt;/div>
&lt;/div>&lt;p>For &lt;code>1.18&lt;/code> and above, &lt;code>JDK 17&lt;/code> is required.&lt;/p>
&lt;div class="highlight">&lt;div class="chroma">
&lt;table class="lntable">&lt;tr>&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code>&lt;span class="lnt">1
&lt;/span>&lt;/code>&lt;/pre>&lt;/td>
&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code class="language-Bash" data-lang="Bash">&lt;span class="line">&lt;span class="cl">sudo apt install openjdk-17-jdk
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/td>&lt;/tr>&lt;/table>
&lt;/div>
&lt;/div>&lt;h3 id="server-software-download">
&lt;a href="#server-software-download" class="heading-anchor" aria-label="Anchor for Server Software Download">#&lt;/a>
Server Software Download
&lt;/h3>
&lt;ol>
&lt;li>
&lt;p>Go to &lt;a class="link" href="https://mcversions.net/" target="_blank" rel="noopener"
>https://mcversions.net/&lt;/a>
&lt;span style="white-space: nowrap;">&lt;svg width=".7em"
height=".7em" viewBox="0 0 21 21" xmlns="http://www.w3.org/2000/svg">
&lt;path d="m13 3l3.293 3.293l-7 7l1.414 1.414l7-7L21 11V3z" fill="currentColor" />
&lt;path d="M19 19H5V5h7l-2-2H5c-1.103 0-2 .897-2 2v14c0 1.103.897 2 2 2h14c1.103 0 2-.897 2-2v-5l-2-2v7z"
fill="currentColor">
&lt;/svg>&lt;/span>
and find the server version you want to download.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>Copy the link for &lt;code>server.jar&lt;/code>.&lt;/p>
&lt;/li>
&lt;/ol>
&lt;p>For example, on the following page:&lt;/p>
&lt;p>&lt;a class="link" href="https://mcversions.net/download/1.12.2" target="_blank" rel="noopener"
>1.12.2&lt;/a>
&lt;span style="white-space: nowrap;">&lt;svg width=".7em"
height=".7em" viewBox="0 0 21 21" xmlns="http://www.w3.org/2000/svg">
&lt;path d="m13 3l3.293 3.293l-7 7l1.414 1.414l7-7L21 11V3z" fill="currentColor" />
&lt;path d="M19 19H5V5h7l-2-2H5c-1.103 0-2 .897-2 2v14c0 1.103.897 2 2 2h14c1.103 0 2-.897 2-2v-5l-2-2v7z"
fill="currentColor">
&lt;/svg>&lt;/span>
&lt;/p>
&lt;p>&lt;img src="https://blog.xpdbk.com/en/posts/mc-server/666.webp"
width="1365"
height="695"
srcset="https://blog.xpdbk.com/en/posts/mc-server/666_hu2bbd2ccde6b843650c3d8bd2cbe5dcf3_72574_480x0_resize_q75_h2_box_2.webp 480w, https://blog.xpdbk.com/en/posts/mc-server/666_hu2bbd2ccde6b843650c3d8bd2cbe5dcf3_72574_1024x0_resize_q75_h2_box_2.webp 1024w"
loading="lazy"
alt="Download Server"
class="gallery-image"
data-flex-grow="196"
data-flex-basis="471px"
>&lt;/p>
&lt;p>Enter the following command to download the Minecraft server software:&lt;/p>
&lt;div class="highlight">&lt;div class="chroma">
&lt;table class="lntable">&lt;tr>&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code>&lt;span class="lnt">1
&lt;/span>&lt;/code>&lt;/pre>&lt;/td>
&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code class="language-Bash" data-lang="Bash">&lt;span class="line">&lt;span class="cl">wget -N &lt;span class="o">[&lt;/span>paste your copied link here&lt;span class="o">]&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/td>&lt;/tr>&lt;/table>
&lt;/div>
&lt;/div>&lt;p>Enter the following command to start the server:&lt;/p>
&lt;div class="highlight">&lt;div class="chroma">
&lt;table class="lntable">&lt;tr>&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code>&lt;span class="lnt">1
&lt;/span>&lt;/code>&lt;/pre>&lt;/td>
&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code class="language-Bash" data-lang="Bash">&lt;span class="line">&lt;span class="cl">java -server -XX:+UseG1GC -Xmx2048M -Xms1024M -jar server.jar nogui
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/td>&lt;/tr>&lt;/table>
&lt;/div>
&lt;/div>&lt;p>Open &lt;code>eula.txt&lt;/code> and change the part in the red box to &lt;code>eula=true&lt;/code>.&lt;/p>
&lt;p>&lt;img src="https://blog.xpdbk.com/en/posts/mc-server/awda.webp"
width="1059"
height="364"
srcset="https://blog.xpdbk.com/en/posts/mc-server/awda_hu4dc607e55e7c9e68bb96435168389937_19942_480x0_resize_q75_h2_box_2.webp 480w, https://blog.xpdbk.com/en/posts/mc-server/awda_hu4dc607e55e7c9e68bb96435168389937_19942_1024x0_resize_q75_h2_box_2.webp 1024w"
loading="lazy"
alt="Modify the content in the red box"
class="gallery-image"
data-flex-grow="290"
data-flex-basis="698px"
>&lt;/p>
&lt;p>Edit the &lt;code>server.properties&lt;/code> file and modify the following sections:&lt;/p>
&lt;pre>&lt;code>view-distance=10
max-build-height=256
server-ip=
level-seed=
gamemode=0 # 1 is Creative, 2 is Spectator
server-port=25565 # Server port, it is recommended to change this
enable-command-block=false
allow-nether=true
enable-rcon=false
op-permission-level=4
enable-query=false
generator-settings=
resource-pack=
player-idle-timeout=0
level-name=world
motd=A Minecraft Server # Server description (Message of the Day)
announce-player-achievements=true
force-gamemode=false
hardcore=false
white-list=false
pvp=true
spawn-npcs=true
generate-structures=true
spawn-animals=true
snooper-enabled=true
difficulty=1
network-compression-threshold=256
level-type=DEFAULT
spawn-monsters=true
max-tick-time=60000
max-players=20 # Maximum number of players the server can handle
use-native-transport=true
online-mode=true # Change to false to disable premium authentication (allow cracked accounts)
allow-flight=false
resource-pack-hash=
max-world-size=29999984
&lt;/code>&lt;/pre>
&lt;p>Create a &lt;code>screen&lt;/code> session, and then write a startup script.&lt;/p>
&lt;p>Create the script file:&lt;/p>
&lt;div class="highlight">&lt;div class="chroma">
&lt;table class="lntable">&lt;tr>&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code>&lt;span class="lnt">1
&lt;/span>&lt;/code>&lt;/pre>&lt;/td>
&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code class="language-Bash" data-lang="Bash">&lt;span class="line">&lt;span class="cl">nano start.sh
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/td>&lt;/tr>&lt;/table>
&lt;/div>
&lt;/div>&lt;p>Fill in the script content:&lt;/p>
&lt;div class="highlight">&lt;div class="chroma">
&lt;table class="lntable">&lt;tr>&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code>&lt;span class="lnt">1
&lt;/span>&lt;span class="lnt">2
&lt;/span>&lt;span class="lnt">3
&lt;/span>&lt;span class="lnt">4
&lt;/span>&lt;span class="lnt">5
&lt;/span>&lt;span class="lnt">6
&lt;/span>&lt;/code>&lt;/pre>&lt;/td>
&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code class="language-Bash" data-lang="Bash">&lt;span class="line">&lt;span class="cl">&lt;span class="cp">#!/bin/sh
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="cp">&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="k">for&lt;/span> &lt;span class="o">((&lt;/span>&lt;span class="nv">i&lt;/span>&lt;span class="o">=&lt;/span>0&lt;span class="p">;&lt;/span> i&amp;lt;10&lt;span class="p">;&lt;/span> i ++&lt;span class="o">))&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="k">do&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> java -server -XX:+UseG1GC -Xms1024M -Xmx2048M -jar server.jar nogui -noverify -XX:+AggressiveOpts -XX:+UseCompressedOops
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="k">done&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/td>&lt;/tr>&lt;/table>
&lt;/div>
&lt;/div>&lt;p>&lt;strong>Press &lt;code>Ctrl+X&lt;/code> to save.&lt;/strong>&lt;/p>
&lt;p>Grant execution permissions:&lt;/p>
&lt;div class="highlight">&lt;div class="chroma">
&lt;table class="lntable">&lt;tr>&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code>&lt;span class="lnt">1
&lt;/span>&lt;/code>&lt;/pre>&lt;/td>
&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code class="language-Bash" data-lang="Bash">&lt;span class="line">&lt;span class="cl">chmod &lt;span class="m">777&lt;/span> start.sh
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/td>&lt;/tr>&lt;/table>
&lt;/div>
&lt;/div>&lt;div class="highlight">&lt;div class="chroma">
&lt;table class="lntable">&lt;tr>&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code>&lt;span class="lnt">1
&lt;/span>&lt;/code>&lt;/pre>&lt;/td>
&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code class="language-Bash" data-lang="Bash">&lt;span class="line">&lt;span class="cl">./start.sh
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/td>&lt;/tr>&lt;/table>
&lt;/div>
&lt;/div>&lt;h2 id="note">
&lt;a href="#note" class="heading-anchor" aria-label="Anchor for Note">#&lt;/a>
Note
&lt;/h2>
&lt;p>If you need to stop the server, please enter the &lt;code>screen&lt;/code> session and type the &lt;code>/stop&lt;/code> command to gracefully shut down the server program.&lt;/p>
&lt;p>You can use the following command to check if &lt;code>screen&lt;/code> is already installed on your server:&lt;/p>
&lt;div class="highlight">&lt;div class="chroma">
&lt;table class="lntable">&lt;tr>&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code>&lt;span class="lnt">1
&lt;/span>&lt;/code>&lt;/pre>&lt;/td>
&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code class="language-Bash" data-lang="Bash">&lt;span class="line">&lt;span class="cl">screen -v
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/td>&lt;/tr>&lt;/table>
&lt;/div>
&lt;/div>&lt;div class="highlight">&lt;div class="chroma">
&lt;table class="lntable">&lt;tr>&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code>&lt;span class="lnt">1
&lt;/span>&lt;/code>&lt;/pre>&lt;/td>
&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code class="language-Bash" data-lang="Bash">&lt;span class="line">&lt;span class="cl">apt-get -y install screen
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/td>&lt;/tr>&lt;/table>
&lt;/div>
&lt;/div>&lt;h3 id="how-to-start-a-screen-session">
&lt;a href="#how-to-start-a-screen-session" class="heading-anchor" aria-label="Anchor for How to start a screen session">#&lt;/a>
How to start a screen session
&lt;/h3>
&lt;div class="highlight">&lt;div class="chroma">
&lt;table class="lntable">&lt;tr>&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code>&lt;span class="lnt">1
&lt;/span>&lt;/code>&lt;/pre>&lt;/td>
&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code class="language-Bash" data-lang="Bash">&lt;span class="line">&lt;span class="cl">screen -S name
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/td>&lt;/tr>&lt;/table>
&lt;/div>
&lt;/div>&lt;p>Replace &amp;ldquo;&lt;code>name&lt;/code>&amp;rdquo; with a meaningful name for your session (e.g., mc).&lt;/p>
&lt;h3 id="detaching-from-a-screen-session">
&lt;a href="#detaching-from-a-screen-session" class="heading-anchor" aria-label="Anchor for Detaching from a screen session">#&lt;/a>
Detaching from a screen session
&lt;/h3>
&lt;p>To detach from the current screen session, you can press &lt;code>Ctrl-A&lt;/code> followed by &lt;code>d&lt;/code>. All screen sessions will remain active in the background, and you can reattach to them at any time later.&lt;/p>
&lt;h3 id="reattaching-to-a-screen-session">
&lt;a href="#reattaching-to-a-screen-session" class="heading-anchor" aria-label="Anchor for Reattaching to a screen session">#&lt;/a>
Reattaching to a screen session
&lt;/h3>
&lt;p>If you detached from a session, or if your connection was interrupted for some reason, you can reconnect using the following command:&lt;/p>
&lt;div class="highlight">&lt;div class="chroma">
&lt;table class="lntable">&lt;tr>&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code>&lt;span class="lnt">1
&lt;/span>&lt;/code>&lt;/pre>&lt;/td>
&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code class="language-Bash" data-lang="Bash">&lt;span class="line">&lt;span class="cl">screen -r mc
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/td>&lt;/tr>&lt;/table>
&lt;/div>
&lt;/div>&lt;p>If you have multiple screen sessions, you can list them using the &lt;code>ls&lt;/code> parameter.&lt;/p>
&lt;div class="highlight">&lt;div class="chroma">
&lt;table class="lntable">&lt;tr>&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code>&lt;span class="lnt"> 1
&lt;/span>&lt;span class="lnt"> 2
&lt;/span>&lt;span class="lnt"> 3
&lt;/span>&lt;span class="lnt"> 4
&lt;/span>&lt;span class="lnt"> 5
&lt;/span>&lt;span class="lnt"> 6
&lt;/span>&lt;span class="lnt"> 7
&lt;/span>&lt;span class="lnt"> 8
&lt;/span>&lt;span class="lnt"> 9
&lt;/span>&lt;span class="lnt">10
&lt;/span>&lt;span class="lnt">11
&lt;/span>&lt;span class="lnt">12
&lt;/span>&lt;/code>&lt;/pre>&lt;/td>
&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code class="language-Bash" data-lang="Bash">&lt;span class="line">&lt;span class="cl">&lt;span class="c1"># Enter &lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">screen -ls
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="c1"># List sessions&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">There are screens on
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="c1"># 114514 is the session ID&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">114514.session &lt;span class="o">(&lt;/span>Detached&lt;span class="o">)&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">1919810.homo &lt;span class="o">(&lt;/span>Detached&lt;span class="o">)&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">514441.session1 &lt;span class="o">(&lt;/span>Detached&lt;span class="o">)&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="m">3&lt;/span> Sockets in /var/run/screen/S-root
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/td>&lt;/tr>&lt;/table>
&lt;/div>
&lt;/div>&lt;p>In our example, we have three active &lt;code>screen&lt;/code> sessions. Therefore, if you want to restore a specific session, you can execute:&lt;/p>
&lt;div class="highlight">&lt;div class="chroma">
&lt;table class="lntable">&lt;tr>&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code>&lt;span class="lnt">1
&lt;/span>&lt;/code>&lt;/pre>&lt;/td>
&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code class="language-Bash" data-lang="Bash">&lt;span class="line">&lt;span class="cl">screen -r &lt;span class="m">1919810&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/td>&lt;/tr>&lt;/table>
&lt;/div>
&lt;/div>&lt;div class="highlight">&lt;div class="chroma">
&lt;table class="lntable">&lt;tr>&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code>&lt;span class="lnt">1
&lt;/span>&lt;span class="lnt">2
&lt;/span>&lt;/code>&lt;/pre>&lt;/td>
&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code class="language-Bash" data-lang="Bash">&lt;span class="line">&lt;span class="cl">&lt;span class="c1"># Or use the session name&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">screen -r -S homo
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/td>&lt;/tr>&lt;/table>
&lt;/div>
&lt;/div>&lt;h3 id="deleting-a-screen">
&lt;a href="#deleting-a-screen" class="heading-anchor" aria-label="Anchor for Deleting a Screen">#&lt;/a>
Deleting a Screen
&lt;/h3>
&lt;p>While inside the current &lt;strong>screen&lt;/strong>, press &lt;code>Ctrl+D&lt;/code> to &lt;strong>delete&lt;/strong> that &lt;strong>screen&lt;/strong>.&lt;/p>
&lt;h2 id="what-it-looks-like-after-the-server-is-up">
&lt;a href="#what-it-looks-like-after-the-server-is-up" class="heading-anchor" aria-label="Anchor for What it looks like after the server is up">#&lt;/a>
What it looks like after the server is up
&lt;/h2>
&lt;p>&lt;img src="https://blog.xpdbk.com/en/posts/mc-server/dfwerf.webp"
width="1060"
height="365"
srcset="https://blog.xpdbk.com/en/posts/mc-server/dfwerf_huff4d15e65c72e7b93d5a19f7e1e13d06_60768_480x0_resize_q75_h2_box_2.webp 480w, https://blog.xpdbk.com/en/posts/mc-server/dfwerf_huff4d15e65c72e7b93d5a19f7e1e13d06_60768_1024x0_resize_q75_h2_box_2.webp 1024w"
loading="lazy"
alt="Running Server"
class="gallery-image"
data-flex-grow="290"
data-flex-basis="696px"
>&lt;/p>
&lt;p>Press &lt;code>Ctrl+c&lt;/code> to exit. Re-do the &lt;code>screen&lt;/code> process mentioned above.&lt;/p>
&lt;p>Then, type in your server&amp;rsquo;s public IP in the game client (for some servers, you need to turn off the firewall or open the ports in your security group first).&lt;/p>
&lt;p>Enter the game and enjoy!&lt;/p></description></item></channel></rss>