Difference between revisions of "How To Host A DIY Minecraft Server At Home With Docker"

From World History
Jump to: navigation, search
m
m
Line 1: Line 1:
<p> My oldest child discovered Minecraft recently. While his peers play Bedrock Edition on an iPad or game console, my son plays the venerable Java Edition on an old computer. (And he launches it from the terminal! ) To play together I decided to run a Dockerized Minecraft server on my home server, and it was much more straightforward than I anticipated.</p><br /><br /><p> Operating a dedicated server</p><br /><br /><p> The server distribution that is officially available is one Java jar, so it ought to be pretty easy to run. Before trying it, though, I searched for Docker images, and found a good one: itzg/minecraft-server.</p><br /><br /><p> You can fire up the container with an individual docker run command, or daemonize it. I prefer to keep it simple and run docker compose within my byobu session.</p><br /><br /><p> Here's my current docker.yml file</p><br /><br /><p> There are a ton of possible configuration options, however I'd like to emphasize two points above:</p><br /><br /><p> Game's persistent files are written to a disk that is mounted on the host. This allows us to easily access the files. [https://farangmart.co.th/author/fatherounce87/ minecraft server list] The "WORLD" option allows you to import a save created on a different computer. [http://idea.informer.com/users/clubsanta54/?what=personal minecraft server list] </p><br /><br /><p> Connecting to the Server</p><br /><br /><p> After a few seconds, the server is ready to accept connections, however my clients don't seem to see it for reasons. Minecraft will remain on the "Scanning games on your local network screen" screen for the rest of time. You can "Add Server" to manually add it, and voila!</p><br /><br /><p> Web Map</p><br /><br /><p> The majority of my Minecraft knowledge is more than a decade old. Third-party tools can produce an online view of the Minecraft environment that is similar to Google Maps. It appears that Minecraft Overviewer is the most popular tool these days.</p><br /><br /><p> Like I said, this tool's installation looks pretty straightforward, but I found an Docker image that's a lot easier. This one's a one-shot process (not a persistent service) We'll make use of docker run:</p><br /><br /><p> With read-only access to game data produced by the other container, and another volume to write to, this will produce an online map using Leaflet. The directory is then symlinked into a web-served directory on the host like /var/www or ~/public_html for access via any browser.</p><br /><br /><p> Even though it only takes a few minutes, the results are quite impressive.</p><br /><br /><p> Makefile</p><br /><br /><p> In the end, in line with my wishes I added some shortcuts to a Makefile to make it easier to access.</p><br /><br /><p> The Reasons to Build a Dockerized Minecraft Server</p><br /><br /><p> Most people don't require a dedicated server. If you are just looking to play local multiplayer and your computer is sufficiently powerful you can click "Open to LAN" directly from the game. If you're planning to play with a large group of players outside of your household You're better off with a paid hosted server. This could be the official "Realms", or one of a variety of third-party alternatives.</p>
+
<p> My oldest child recently got into Minecraft. While many of his peers play Bedrock Edition on an iPad or game console, my son is playing the classic Java Edition on an old computer. He launches it from his terminal! ) To play with each other I decided to run a Dockerized Minecraft server on my home server and it was simpler than I had expected.</p><br /><br /><p> Operating a dedicated server</p><br /><br /><p> The official server distribution includes only one Javajar. It's likely to be simple to use. Before trying it, though, I searched for Docker images, and found a good one: itzg/minecraft-server.</p><br /><br /><p> You can start the container using a single docker run command or daemonize it. I prefer to keep it simple and run docker compose within my byobu session.</p><br /><br /><p> Here's my current docker-compose.yml file:</p><br /><br /><p> There are a variety of configuration options to choose from However, I would like to highlight two:</p><br /><br /><p> The game's data that is persistent is stored on a volume connected to the host so that we can access the files. The "WORLD" option lets you import a save that was created on another computer.</p><br /><br /><p> Connecting to the Server</p><br /><br /><p> After a few seconds the server is ready to accept connections, but my clients don't seem to be able to see it due to reasons. Minecraft will remain on the "Scanning games on your local network screen" screen for the rest of time. You can "Add Server" to manually add it, and voila!</p><br /><br /><p> Web Map</p><br /><br /><p> My Minecraft knowledge is about a decade old. However, I'm aware of third-party tools can create an online view of the Minecraft world, similar to the one in Google Maps. After a bit of research, it seems like Minecraft Overviewer is the prominent one in the present.</p><br /><br /><p> As I mentioned before, the installation is pretty simple, but I found a Docker image that's a lot easier. This is a one-shot (not permanent) procedure, so we'll use docker to run:</p><br /><br /><p> Leaflet will create a web map with read-only access to game data from the other container, and another volume to write it to. This directory can be linked to a web-served directory on the host, like the /var/www/public_html directory, which allows easy access from any internet browser.</p><br /><br /><p> While it only takes a few minutes, the results are quite impressive.</p><br /><br /><p> Makefile</p><br /><br /><p> Finally, as per my wishes I added some shortcuts to a Makefile to make it easier to access.</p><br /><br /><p> Reasons You Might Want to build Dockerized Minecraft Server</p><br /><br /><p> Most people don't require a dedicated server. If you're looking to play local multiplayer and your computer is powerful enough you can click "Open to the LAN" directly from the game. [https://www.transtats.bts.gov/exit.asp?url=https://extremecraft.de/ extreme craft] A paid hosted server is better when you would like to play with a bigger amount of players from outside your home. This could be the official "Realms" or one of the many third-party alternatives.</p>

Revision as of 16:21, 10 July 2022

My oldest child recently got into Minecraft. While many of his peers play Bedrock Edition on an iPad or game console, my son is playing the classic Java Edition on an old computer. He launches it from his terminal! ) To play with each other I decided to run a Dockerized Minecraft server on my home server and it was simpler than I had expected.



Operating a dedicated server



The official server distribution includes only one Javajar. It's likely to be simple to use. Before trying it, though, I searched for Docker images, and found a good one: itzg/minecraft-server.



You can start the container using a single docker run command or daemonize it. I prefer to keep it simple and run docker compose within my byobu session.



Here's my current docker-compose.yml file:



There are a variety of configuration options to choose from However, I would like to highlight two:



The game's data that is persistent is stored on a volume connected to the host so that we can access the files. The "WORLD" option lets you import a save that was created on another computer.



Connecting to the Server



After a few seconds the server is ready to accept connections, but my clients don't seem to be able to see it due to reasons. Minecraft will remain on the "Scanning games on your local network screen" screen for the rest of time. You can "Add Server" to manually add it, and voila!



Web Map



My Minecraft knowledge is about a decade old. However, I'm aware of third-party tools can create an online view of the Minecraft world, similar to the one in Google Maps. After a bit of research, it seems like Minecraft Overviewer is the prominent one in the present.



As I mentioned before, the installation is pretty simple, but I found a Docker image that's a lot easier. This is a one-shot (not permanent) procedure, so we'll use docker to run:



Leaflet will create a web map with read-only access to game data from the other container, and another volume to write it to. This directory can be linked to a web-served directory on the host, like the /var/www/public_html directory, which allows easy access from any internet browser.



While it only takes a few minutes, the results are quite impressive.



Makefile



Finally, as per my wishes I added some shortcuts to a Makefile to make it easier to access.



Reasons You Might Want to build Dockerized Minecraft Server



Most people don't require a dedicated server. If you're looking to play local multiplayer and your computer is powerful enough you can click "Open to the LAN" directly from the game. extreme craft A paid hosted server is better when you would like to play with a bigger amount of players from outside your home. This could be the official "Realms" or one of the many third-party alternatives.