The only correct way to self-host Minecraft Bedrock Server: Montainer

Wasin Silakong
3 min readMar 26, 2024
My DALL-E3 Generated Logo for Montainer

Introduction

Minecraft Bedrock Edition offers a seamless and efficient gaming experience, complete with cross-platform multiplayer, winning over many gamers, myself included (I even persuaded my friends to switch to Bedrock😈😈😈). However, the experience of hosting multiplayer servers is pure painful. While players can easily update their games via the Minecraft Launcher, server administrators must navigate a tedious process of manual updates to keep servers up-to-date, unlike Java Edition, where specific versions can be chosen. Bedrock Edition necessitates both players and servers to use the latest version. Additionally, managing multiple server instances, ensuring they start at boot, and accessing admin consoles to abuse your juicy admin power can be complex and daunting. These challenges inspired the creation of Montainer, designed to simplify hosting and managing game servers for Bedrock-fans and Java-haters.

What is Montainer?

Montainer, combining “Minecraft” and “container,” harnesses Docker’s benefits for application deployment. Now, updating your Minecraft server is as simple as changing the Docker image’s version tag, or even automating updates with tools like containerrr/watchtower, ensuring your game world and configurations are safely stored via volume mounting. Additionally, Montainer includes an Admin Web Interface Console, making game management through the admin console more straightforward than ever.

How Montainer Works?

Montainer GitHub Repository is designed to be self-updating. It employs GitHub Actions to run a Selenium web scraper daily, checking for new releases on the Mojang website. If new stable or preview versions are available, it automatically builds an updated Docker image, ensuring the repository remains current without manual intervention. When the Docker image is run, it starts a Python FastAPI web application, serving as the administrative gateway. Through this application, administrators can manage the server processes by interacting with the API via a React.js web-based graphical user interface (GUI).

Web GUI for managing server

How to use Montainer?

Let’s dive in and start deploying Montainer using Docker Compose. I’ll assume you’re using an AMD64 CPU and already have Docker and Docker Compose installed. If not, don’t worry; installing them is straightforward by following the instructions in the Docker documentation.

  1. Create a directory for your game server and a docker-compose.yaml file within the directory
  2. Paste the following script into docker-compose.yaml
version: '3'
services:
montainer:
image: ghcr.io/wasinuddy/montainer-stable:latest # Use montainer-preview for Minecraft Snapshot server
ports:
- "8000:8000" # Web UI Console mount to port 8000 TCP
- "19132:19132/udp" # Minecraft Bedrock Server port 19132 UDP
volumes:
- ./worlds:/app/minecraft_server/worlds # Paste your world folder inside ./worlds (ie. ./worlds/Bedrock Level)
- ./configs:/app/configs
environment:
- SUBPATH="" # Subpath when you want admin console behind reverse proxy (ie. /server1)


restart: unless-stopped

Feel free to customize the mounting positions and the external ports for both the WebUI and the game server to suit your preferences. The WebUI supports reverse proxy subpaths, making it easier to manage multiple servers. However, if you plan to expose the WebUI to the internet, don’t forget to implement basic security measures like NGINX Basic-Auth for added protection.

Congratulations

Congratulations on successfully setting up your Minecraft server with Montainer! You’re now all set to join the game using your server IP on port 19132 and manage everything through the web interface on port 8000, or whichever ports you’ve chosen. Easy, isn’t it? Remember, if you’re planning to connect from beyond your local network, don’t forget to set up port forwarding on your router. Enjoy your enhanced Minecraft hosting experience!

--

--