Host Your Own Minecraft Server with Docker

Would you like to host your own Minecraft Server? Have full control of your files and the ability to backup all of your World Data?

If you’d like to host your own server with all of its perks, this tutorial is definitely for you. (This also works for a VPS if you want to host your own Minecraft server in the cloud.) If Docker is installed, you can run the following command and have your own personal Minecraft server running in no time at all.

Recommended hardware: Any x86 Architecture with at least 8GB RAM.

sudo docker run -e EULA=TRUE -e MEMORY=6G -d -p 25565:25565 --name minecraft itzg/minecraft-server

The command is broken down below:

  • sudo docker run [command to run Docker container.]
  • -e EULA=TRUE [-e means Environmental Variable, and this sets the End User License Agreement to ‘True’.]
  • -e MEMORY=6G [sets the allocated memory to 6 gigabytes of RAM, You can change this to whatever you want. I recommend at least 4 gigabytes.]
  • -d -p 25565:25565 [-d allows the container to run in the background. -p allocates the ports for the container and the host.]
  • –name minecraft [self explanatory. Name it whatever you want.]
  • itzg/minecraft-server [This is the original publisher of the container and their title of the container]

For any questions on installing Docker, you can check out a few of my previous posts that cover Docker installation and Containerization fundamentals.

Feel free to reach out if you have any questions, and as always keep learning.

Leave a comment