Sign inSign up

crashvb/minecraft-web

By crashvb

•Updated about 24 hours ago

Contains minecraft server manager.

Image
0

114

crashvb/minecraft-web repository overview

⁠minecraft-web-docker

version) image size linting license

⁠Overview

This docker image contains a web interface for managing Minecraft servers.

The interface displays the cached public IPv4 address and each server's deployed version, server name, and level name; manages allowlist.json and permissions.json using the gamer tag mappings in xuid.yml; and compares each server.properties with the other servers and its distribution default. The current allowlist and permissions files can be inspected as formatted JSON. The public address is refreshed from the configured STUN server after one hour, or immediately when requested from the interface. Player and property tables can be filtered and sorted in the browser.

Authentication uses PHP sessions backed by the bcrypt credentials regenerated from the secrets volume into /etc/minecraft/.htpasswd at container startup.

⁠Environment Variables

VariableDefaultDescription
MINECRAFT_BACKUP/var/backup/minecraftWritable root containing per-server JSON backups.
MINECRAFT_CONFIG/etc/minecraftWeb configuration containing xuid.yml.
MINECRAFT_DATA/var/lib/minecraft-dataRead-only server data containing version and server.properties.dist.
MINECRAFT_LOCKS/run/minecraft-webEphemeral update-lock directory.
MINECRAFT_SHARE/var/lib/minecraftWritable server configuration root.
MINECRAFT_STUNstun.cloudflare.com:3478STUN server used to determine the public IPv4 address.
MINECRAFT_USERSadminComma-separated web authentication users.

⁠Volumes

Server identifiers are discovered from the directories mounted directly under MINECRAFT_SHARE. Each server requires a corresponding read-only data directory under MINECRAFT_DATA. The application itself is baked into /var/www; do not mount a volume over that path.

PHP-FPM runs as minecraft (1000:1000), matching the Minecraft server containers. The web container does not change ownership or permissions on the shared server config or data volumes. At startup, xuid.yml keeps its owner and is set to group minecraft with mode 0660. Each mounted backup-volume root also keeps its owner and is set to group minecraft with mode 0770 so PHP can create backups.

Changes to XUID mappings, allowlists, and permissions are persisted immediately. A running Minecraft server still requires the corresponding console reload command before it uses allowlist or permission changes. Before a changed JSON file is replaced, its prior version is copied with metadata preserved to the corresponding server backup volume as filename.json.YYYY-MM-DD_HH:MM:SS. Before xuid.yml is changed, its prior version is copied to the web backup volume as xuid.yml.YYYY-MM-DD_HH:MM:SS.

⁠Development

Source Control⁠

Tag summary

Content type

Image

Digest

sha256:e628c0658…

Size

108.5 MB

Last updated

about 24 hours ago

docker pull crashvb/minecraft-web