aboutsummaryrefslogtreecommitdiffstats
path: root/README.md
diff options
context:
space:
mode:
authorFilip Wandzio <contact@philw.dev>2026-01-25 00:50:42 +0100
committerFilip Wandzio <contact@philw.dev>2026-01-25 00:50:42 +0100
commit41af486c3523180889655803517a63dbab22b5e5 (patch)
tree700295043e5a1579613143b3b4b4377cdcd7bea5 /README.md
downloadmcsv-master.tar.gz
mcsv-master.zip
Implement basic paper server configurationHEADmaster
Diffstat (limited to 'README.md')
-rw-r--r--README.md103
1 files changed, 103 insertions, 0 deletions
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..79a883a
--- /dev/null
+++ b/README.md
@@ -0,0 +1,103 @@
1# Minecraft Multi-Server Docker Setup
2
3## Overview
4
5This setup allows you to run one or more vanilla Minecraft servers on a single VPS using Docker Compose. Features include:
6
7* Fully `.env`-driven configuration.
8* Automated backups with timestamped filenames and retention.
9* Server-specific logs.
10* Resource limits (CPU/memory) per server.
11* Security hardening: non-root execution, read-only root filesystem, dropped capabilities.
12* Internal-only RCON.
13* Multi-server friendly.
14
15## Folder Structure
16
17```
18/opt/docker/minecraft/
19├─ server1/
20│ ├─ docker-compose.yml
21│ └─ .env
22├─ server2/
23│ ├─ docker-compose.yml
24│ └─ .env
25└─ shared/
26 └─ (optional shared resources)
27```
28
29## .env Configuration Example
30
31```
32# Server identity
33SERVER_NAME=server1
34MC_IMAGE=itzg/minecraft-server
35BACKUP_IMAGE=alpine:latest
36
37# Ports
38SERVER_PORT=25565
39MC_INTERNAL_PORT=25565
40RCON_PORT=25575
41
42# Paths
43DATA_PATH=/opt/docker/minecraft/server1/data
44BACKUP_PATH=/opt/docker/minecraft/server1/backups
45TMPFS_PATH=/tmp
46
47# Minecraft settings
48MC_VERSION=latest
49MC_MEMORY=2G
50MC_EULA=TRUE
51ENABLE_RCON=true
52RCON_PASSWORD=StrongPasswordHere
53MC_UID=1000
54MC_GID=1000
55
56# Backup settings
57BACKUP_INTERVAL=86400
58MAX_BACKUPS=3
59BACKUP_LOG_PREFIX=server1
60
61# Security options
62READ_ONLY=true
63CAP_DROP=ALL
64CAP_ADD=CHOWN,SETUID,SETGID
65SECURITY_OPT=no-new-privileges:true
66
67# Resource limits
68MC_CPUS=1.5
69MC_MAX_MEMORY=3G
70
71# Logging
72LOG_DRIVER=json-file
73LOG_MAX_SIZE=10m
74LOG_MAX_FILE=5
75BACKUP_LOG_DRIVER=json-file
76BACKUP_LOG_MAX_SIZE=5m
77BACKUP_LOG_MAX_FILE=3
78
79# Network
80NETWORK_NAME=mc_net
81NETWORK_DRIVER=bridge
82```
83
84## Backup Logging Example
85
86```
87[server1] Backup completed: /backups/server1_20251030_153045.tar.gz
88[server2] Backup completed: /backups/server2_20251030_153046.tar.gz
89```
90
91## Running Multiple Servers
92
93```
94cd /opt/docker/minecraft/sv1
95docker compose up -d
96
97cd /opt/docker/minecraft/sv2
98docker compose up -d
99```
100
101## References
102
103* [Docker Minecraft image](https://hub.docker.com/r/itzg/minecraft-server)