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 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>
+
<p> My oldest child recently got into Minecraft. [https://www.click4r.com/posts/g/5105708/some-minecraft-gamers-are-having-problem-taking-part-in-java-version-in-the-new-launcher Minecraft servers] While many of his peers play Bedrock Edition on an iPad or game console, my son plays the classic Java Edition on an old computer. He launches it from his terminal! ) To play together, I looked into running an Dockerized Minecraft server on my home server, and it was much easier than I expected.</p><br /><br /><p> Running a Dedicated Server</p><br /><br /><p> The official server distribution includes a single Javajar. It should 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 either open the container by using the docker run command, or daemonize it. I prefer to keep it simple and set docker compose within my byobu session.</p><br /><br /><p> Here's my current docker-compose.yml file:</p><br /><br /><p> There are many possible configuration options, however I'd like to highlight two things above:</p><br /><br /><p> The game's data that is persistent is stored on a volume connected to the host to allow us to easily access the files. The "WORLD" option is useful for importing an existing save created on another computer.</p><br /><br /><p> Connecting to the Server</p><br /><br /><p> After a couple of seconds, the server is ready to accept connections, but my clients aren't able to recognize it for some reason. Minecraft will be on the "Scanning for games on your local network" screen for the rest of the time. No matter, you can "Add Server" to add it manually, and voila!</p><br /><br /><p> Web Map</p><br /><br /><p> The majority of my Minecraft knowledge is more than a decade out of date. Third-party tools can create a web view of a Minecraft environment similar to Google Maps. It seems that Minecraft Overviewer is the most popular tool nowadays.</p><br /><br /><p> As before, this tool's installation is pretty simple, but I found an Docker image that's a lot easier. This is a one-shot procedure (not an ongoing service) So we'll make use of docker run:</p><br /><br /><p> With read-only access to game data generated by the other container and another volume to write to, this will result in a web map with Leaflet. This directory can be symlinked to a web-served directories on the host, like /var/www/public_html, for easy access from any web browser.</p><br /><br /><p> Although it takes only just a few minutes to complete, the results are quite impressive. [https://zenwriting.net/reportthread74/every-day-deals-for-october-7-2022-featuring-dragon-dictate-for-mac Proximal's Blog] </p><br /><br /><p> Makefile</p><br /><br /><p> As is my wont, I threw several shortcuts in the Makefile to make them easy to access:</p><br /><br /><p> The Reasons to build Dockerized Minecraft Server</p><br /><br /><p> Most people don't require an individual server. If you're just looking to play locally and one of your machines is reasonably powerful, you can just "Open to LAN" within the game. A paid hosted server is best for those who want to play with a larger number of people outside your home. This could be the official "Realms" or any of several third-party options.</p>

Latest revision as of 19:13, 19 July 2022

My oldest child recently got into Minecraft. Minecraft servers While many of his peers play Bedrock Edition on an iPad or game console, my son plays the classic Java Edition on an old computer. He launches it from his terminal! ) To play together, I looked into running an Dockerized Minecraft server on my home server, and it was much easier than I expected.



Running a Dedicated Server



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



You can either open the container by using the docker run command, or daemonize it. I prefer to keep it simple and set docker compose within my byobu session.



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



There are many possible configuration options, however I'd like to highlight two things above:



The game's data that is persistent is stored on a volume connected to the host to allow us to easily access the files. The "WORLD" option is useful for importing an existing save created on another computer.



Connecting to the Server



After a couple of seconds, the server is ready to accept connections, but my clients aren't able to recognize it for some reason. Minecraft will be on the "Scanning for games on your local network" screen for the rest of the time. No matter, you can "Add Server" to add it manually, and voila!



Web Map



The majority of my Minecraft knowledge is more than a decade out of date. Third-party tools can create a web view of a Minecraft environment similar to Google Maps. It seems that Minecraft Overviewer is the most popular tool nowadays.



As before, this tool's installation is pretty simple, but I found an Docker image that's a lot easier. This is a one-shot procedure (not an ongoing service) So we'll make use of docker run:



With read-only access to game data generated by the other container and another volume to write to, this will result in a web map with Leaflet. This directory can be symlinked to a web-served directories on the host, like /var/www/public_html, for easy access from any web browser.



Although it takes only just a few minutes to complete, the results are quite impressive. Proximal's Blog



Makefile



As is my wont, I threw several shortcuts in the Makefile to make them easy to access:



The Reasons to build Dockerized Minecraft Server



Most people don't require an individual server. If you're just looking to play locally and one of your machines is reasonably powerful, you can just "Open to LAN" within the game. A paid hosted server is best for those who want to play with a larger number of people outside your home. This could be the official "Realms" or any of several third-party options.