Link: Github Repository
Reach me out via LinkedIn, Portfolio Contact Form or mail@pascal-nehlsen.de
Minecraft Server with Docker Compose
Welcome to your personal Minecraft Server! This repository provides an easy-to-use setup for running a customizable Minecraft server using Docker Compose. Deploy it locally or to a virtual machine (VM) with minimal effort.
Table of Contents
Description
This repository offers a Docker Compose configuration for hosting a Minecraft server. The setup simplifies launching, managing, and customizing a Minecraft server.
Key features:
- Containerized Deployment: Run your server reliably using Docker.
- Customizable Settings: Adjust memory allocation, player limits, game modes, and more.
- Easy Maintenance: Start, stop, and update your server with minimal effort.
Quickstart
Prerequisites
Ensure you have the following tools installed:
- Docker
- Docker Compose is included with Docker 20.10 and later. If you have an older version, follow the official instructions to install Docker Compose as a plugin.
-
Clone this repository:
git clone https://github.com/PascalNehlsen/minecraft-server
cd minecraft-server -
Create a
.envfile from the example configuration:cp example.env .env -
Build and start the server container:
docker compose up --build -
Open Minecraft and connect to the server:
- Local server:
localhost:8888(or use your server's IP if hosted remotely).
- Local server:
-
To stop the server, use:
docker compose down
Usage
Configuration
The server settings can be customized in the example.env file. Below are the key environment variables you can modify:
| Variable | Description | Default value | Possible Values |
|---|---|---|---|
MAX_PLAYERS | Maximum number of players allowed on the server. | 15 | Any integer value |
MOTD | Message of the Day displayed to players upon joining. | - | Any text |
DIFFICULTY | Difficulty level of the server. | easy | easy, normal, hard |
GAMEMODE | Default game mode for players. | creative | survival, creative, adventure, spectator |
ONLINE_MODE | Authenticate players using Minecraft's online services. | true | true, false |