Compare commits

...

16 Commits

Author SHA1 Message Date
dependabot[bot]
32b343840f build(deps): bump pymdown-extensions from 10.19.1 to 10.20 in /docs in the patches group (#3864)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-01-13 07:16:32 -06:00
Geoff Bourne
0a98bee40e Ensure FTBA uses image's java (#3867) 2026-01-12 20:56:50 -06:00
dependabot[bot]
93d94f5ba8 build(deps): bump pathspec from 0.12.1 to 1.0.3 in /docs (#3865) 2026-01-12 13:07:02 -06:00
Damián
f3ed09882b Add mekalus to cf-exclude-include.json (#3862) 2026-01-11 07:58:10 -06:00
Geoff Bourne
7325baf750 Default Folia channel to stable rather than experimental (#3861) 2026-01-08 18:28:04 -06:00
Geoff Bourne
c23654008b Leverage ENABLE_ROLLING_LOGS as default for GENERATE_LOG4J2_CONFIG (#3860) 2026-01-08 18:16:13 -06:00
Geoff Bourne
f8ff8a7b8a Opt into generated log4j2.xml configuration (#3856) 2026-01-08 07:25:01 -06:00
EmilyxFox
9c01462c0c Docs: cleanup copyright year and contributing (#3855) 2026-01-07 07:48:14 -06:00
EmilyxFox
21c5c980d5 Move docs to zensical (#3852) 2026-01-06 06:36:04 -06:00
dependabot[bot]
4458908a44 build(deps): bump the patches group across 1 directory with 2 updates (#3825)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-01-05 07:12:33 -06:00
Geoff Bourne
c9094063d3 Bump latest/stable image variant to java25 (#3845) 2025-12-31 16:38:59 -06:00
Geoff Bourne
320ad0906f Adding back TerminalConsole to generated log4j2 config (#3846) 2025-12-31 14:46:49 -06:00
EmilyxFox
128bbff3d7 Document SSH console and RCON password secrets file (#3843) 2025-12-30 11:53:29 -06:00
Igor Fontana
82aafd5f5e Add NEOFORGE to invalid type message (#3842) 2025-12-30 06:57:57 -06:00
Luke Van De Weghe
f746162360 Globally exclude crash-assistant mod (#3839) 2025-12-28 17:44:10 -06:00
Kim
0131f66e46 Add 'ctm' to forceIncludes for ftb-stoneblock-4 (#3840) 2025-12-28 08:49:03 -06:00
25 changed files with 281 additions and 180 deletions

View File

@@ -108,7 +108,7 @@ jobs:
env:
IMAGE_TO_TEST: "${{ github.repository_owner }}/minecraft-server:test-${{ matrix.variant }}-${{ github.run_id }}"
HAS_IMAGE_REPO_ACCESS: ${{ secrets.DOCKER_USER != '' && secrets.DOCKER_PASSWORD != '' }}
MAIN_VARIANT: java21
MAIN_VARIANT: java25
runs-on: ubuntu-22.04
steps:
- name: Checkout
@@ -175,6 +175,7 @@ jobs:
MINECRAFT_VERSION: ${{ matrix.mcVersion }}
VARIANT: ${{ matrix.variant }}
CF_API_KEY: ${{ secrets.CF_API_KEY }}
GH_TOKEN: ${{ github.token }}
run: |
tests/test.sh

View File

@@ -19,14 +19,14 @@ jobs:
fail-fast: false
matrix:
variant:
- java21
- java25
- java21-alpine
- java17
- java8
include:
# JAVA 21:
- variant: java21
baseImage: eclipse-temurin:21-jre
# JAVA 21/25:
- variant: java25
baseImage: eclipse-temurin:25-jre
platforms: linux/amd64,linux/arm64
mcVersion: latest
- variant: java21-alpine
@@ -92,5 +92,6 @@ jobs:
VARIANT: ${{ matrix.variant }}
CF_API_KEY: ${{ secrets.CF_API_KEY }}
DEBUG: ${{ runner.debug }}
GH_TOKEN: ${{ github.token }}
run: |
tests/test.sh

1
.gitignore vendored
View File

@@ -4,3 +4,4 @@
*.iml
/gh-md-toc
personal-build-and-develop.*
site/

View File

@@ -1,14 +1,22 @@
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
version: 2
build:
os: ubuntu-22.04
tools:
python: "3.11"
mkdocs:
configuration: mkdocs.yml
python:
install:
- requirements: docs/requirements.txt
version: 2
python:
install:
- requirements: docs/requirements.txt
build:
os: ubuntu-24.04
tools:
python: latest
jobs:
# We recommend using a requirements file for reproducible builds.
# This is just a quick example to get started.
# https://docs.readthedocs.io/page/guides/reproducible-builds.html
install:
- pip install zensical
build:
html:
- zensical build
post_build:
- mkdir -p $READTHEDOCS_OUTPUT/html/
- cp --recursive site/* $READTHEDOCS_OUTPUT/html/

View File

@@ -1,4 +1,4 @@
ARG BASE_IMAGE=eclipse-temurin:21-jre
ARG BASE_IMAGE=eclipse-temurin:25-jre
FROM ${BASE_IMAGE}
# hook into docker BuildKit --platform support

View File

@@ -68,6 +68,7 @@ dnf clean all
curl -fsSL -o /tmp/knock.tar.gz https://github.com/Metalcape/knock/releases/download/0.8.1/knock-0.8.1-$TARGET.tar.gz
tar -xf /tmp/knock.tar.gz -C /usr/local/ && rm /tmp/knock.tar.gz
ln -s /usr/local/sbin/knockd /usr/sbin/knockd
ls -l /usr/local/sbin/knockd
setcap cap_net_raw=ep /usr/local/sbin/knockd
# Set git credentials globally

16
compose-docs.yml Normal file
View File

@@ -0,0 +1,16 @@
# This composition can be used to serve up the rendered mkdocs for local authoring.
#
# docker compose -f compose-docs.yml -p zensical up
#
# and then access http://localhost:8000
services:
zensical:
build:
context: .
dockerfile: docs/Dockerfile
volumes:
- ./zensical.toml:/docs/zensical.toml
- ./docs:/docs/docs
ports:
- "8000:8000"

View File

@@ -1,19 +0,0 @@
# This composition can be used to serve up the rendered mkdocs for local authoring.
#
# docker compose -f docker-compose-mkdocs.yml -p mkdocs up
#
# and then access http://localhost:8000
services:
mkdocs:
build:
context: .
dockerfile: docs/Dockerfile
volumes:
- ./mkdocs.yml:/mkdocs/mkdocs.yml
- ./docs:/mkdocs/docs
command:
- serve
- --dev-addr=0.0.0.0:8000
ports:
- "8000:8000"

View File

@@ -1,10 +1,4 @@
FROM python:3.11
RUN pip install --upgrade pip
WORKDIR /mkdocs
FROM zensical/zensical
RUN --mount=target=/build/requirements.txt,source=docs/requirements.txt \
pip install -r /build/requirements.txt
ENTRYPOINT ["mkdocs"]

View File

@@ -81,6 +81,8 @@ The openj9 image tags include specific variables to simplify configuration:
The image now uses a templated log4j2 configuration based on PaperMC's logging setup, which is automatically applied for versions that don't require Log4j security patches. This configuration provides rolling logs and advanced logging features by default.
Set the environment variable `GENERATE_LOG4J2_CONFIG` to "true" to enable the following features.
### Customization via environment variables
You can customize various aspects of the logging behavior using environment variables:

View File

@@ -238,15 +238,46 @@ By default an existing `server-icon.png` file will not be replaced, that can be
### RCON
RCON is **enabled by default** to allow for graceful shut down the server and coordination of save state during backups. RCON can be disabled by setting `ENABLE_RCON` to "false".
RCON is **enabled by default** to allow for graceful shut down of the server and coordination of save state during backups. RCON can be disabled by setting `ENABLE_RCON` to "false".
!!! warning
Disabling RCON will remove and limit some features, such as interactive and color console support.
The default password is randomly generated on each startup; however, a specific one can be set with `RCON_PASSWORD`.
#### RCON Password
**DO NOT MAP THE RCON PORT EXTERNALLY** unless you are aware of all the consequences and have set a **secure password** with `RCON_PASSWORD`.
The default password is randomly generated on each startup. However, you can specify a password using one of the following environment variables:
* Set `RCON_PASSWORD` to your desired password.
* Set `RCON_PASSWORD_FILE` to the path of a file containing the password.
Using `RCON_PASSWORD_FILE` is the recommended method for managing sensitive data, as it allows full support for [Docker Secrets](https://docs.docker.com/compose/how-tos/use-secrets/).
??? example
```yaml title="compose.yaml"
services:
mc:
image: itzg/minecraft-server:latest
pull_policy: daily
tty: true
stdin_open: true
ports:
- "25565:25565"
environment:
EULA: "TRUE"
RCON_PASSWORD_FILE: /run/secrets/rcon_pass # Points to the path where the secret is mounted
volumes:
# attach the relative directory 'data' to the container's /data path
- ./data:/data
secrets:
- rcon_pass
secrets:
rcon_pass:
file: ./rcon_password # local file containing the password
```
!!! warning
**BE CAUTIOUS OF MAPPING THE RCON PORT EXTERNALLY** unless you are aware of all the consequences and have set a **secure password**.
!!! info
@@ -444,4 +475,4 @@ When using `docker run` from a bash shell, the entries must be quoted with the `
| STATUS_HEARTBEAT_INTERVAL | [status-heartbeat-interval](https://minecraft.wiki/w/Server.properties#status-heartbeat-interval) |
| SYNC_CHUNK_WRITES | [sync-chunk-writes](https://minecraft.wiki/w/Server.properties#sync-chunk-writes) |
| USE_NATIVE_TRANSPORT | [use-native-transport](https://minecraft.wiki/w/Server.properties#use-native-transport) |
| VIEW_DISTANCE | [view-distance](https://minecraft.wiki/w/Server.properties#view-distance) |
| VIEW_DISTANCE | [view-distance](https://minecraft.wiki/w/Server.properties#view-distance) |

View File

@@ -1,6 +1,6 @@
# Site documentation
The documentation for this image/repository is written in markdown and built by [MkDocs](https://www.mkdocs.org/) into a documentation website hosted at [Read the Docs](https://readthedocs.org/). [Here is general information about writing MkDocs markdown](https://www.mkdocs.org/user-guide/writing-your-docs/) and [specifics for the Material theme used](https://squidfunk.github.io/mkdocs-material/reference/).
The documentation for this image/repository is written in markdown and built using [Zensical](https://zensical.org/) into a documentation website hosted at [Read the Docs](https://readthedocs.org/). [Here is general information about writing Zensical markdown](https://zensical.org/docs/authoring/markdown/).
!!! note
The README.md rarely needs to be modified and only serves as a brief introduction to the project.
@@ -10,7 +10,7 @@ The documentation source is maintained in the [docs](https://github.com/itzg/doc
It will be very helpful to view the rendered documentation as you're editing. To do that run the following from the top-level directory:
```shell
docker compose -f docker-compose-mkdocs.yml -p mkdocs up
docker compose -f compose-docs.yml -p zensical up
```
You can access the live documentation rendering at <http://localhost:8000>.
You can access the live documentation rendering at <http://localhost:8000>.

View File

@@ -1,10 +1,25 @@
mkdocs-material == 9.7.0
mkdocs-autorefs == 1.4.3
mkdocstrings[python] == 0.30.1
mkdocs-literate-nav == 0.6.2
mdx-gh-links == 0.4
# need to pin for auto reload to work
# see https://github.com/mkdocs/mkdocs/issues/4032
click==8.2.1
mkdocs-click == 0.9.0
mkdocs-static-i18n == 1.3.0
click==8.3.1
colorama==0.4.6
deepmerge==2.0
ghp-import==2.1.0
griffe==1.15.0
Jinja2==3.1.6
Markdown==3.10
MarkupSafe==3.0.3
mergedeep==1.3.4
mkdocs==1.6.1
mkdocs-autorefs==1.4.3
mkdocs-get-deps==0.2.0
mkdocstrings==1.0.0
mkdocstrings-python==2.0.1
packaging==25.0
pathspec==1.0.3
platformdirs==4.5.1
Pygments==2.19.2
pymdown-extensions==10.20
python-dateutil==2.9.0.post0
PyYAML==6.0.3
pyyaml_env_tag==1.1
six==1.17.0
watchdog==6.0.0
# zensical @ file:///

View File

@@ -0,0 +1,70 @@
---
title: Over SSH
---
The container can host an SSH console. It is enabled by setting `ENABLE_SSH` to `true`.
The SSH server only supports password based authentication. The password is the same as the RCON password.
!!! question
See [the RCON password](../configuration/server-properties.md/#rcon-password) section under configuration/server-properties for more information on how to set an RCON password.
The SSH server runs on port `2222` inside the container.
??? tip "Tip: Exposing the SSH port"
!!! warning "Security Implications"
By default, publishing ports in Docker binds them to all network interfaces (`0.0.0.0`), making the SSH console accessible to any device that can reach your host machine.
Since the SSH console grants **full administrative access** to your server, it is critical to use a strong [RCON password](../configuration/server-properties.md/#rcon-password).
If you wish to restrict access to the local machine only, refer to the [Docker documentation](https://docs.docker.com/engine/network/port-publishing/#publishing-ports) on binding to specific IP addresses (e.g., `127.0.0.1:2222:2222`).
If SSH access is only intended for inter-container connections, consider **NOT** forwarding the port to the host machine, and putting the containers in a shared [Docker network](https://docs.docker.com/engine/network/#user-defined-networks).
```yaml title="compose.yaml"
services:
mc:
ports:
- '25565:25565'
- '2222:2222'
```
## Connecting
Connecting should be as simple as running
```bash
ssh anyuser@127.0.0.1 -p 2222
```
and typing in the RCON password.
## Environment variables
| Environment Variable | Usage | Default |
| -------------------- | ------------------------- | ------- |
| `ENABLE_SSH` | Enable remote SSH console | `false` |
## Example
```yaml title="compose.yaml"
services:
mc:
image: itzg/minecraft-server:latest
pull_policy: daily
tty: true
stdin_open: true
ports:
- "25565:25565"
- "2222:2222"
environment:
EULA: "TRUE"
ENABLE_SSH: true
RCON_PASSWORD_FILE: /run/secrets/rcon_pass
volumes:
# attach the relative directory 'data' to the container's /data path
- ./data:/data
secrets:
rcon_pass:
file: ./rcon_password
```

View File

@@ -1,8 +1,8 @@
---
title: With websocket
title: With WebSocket
---
With `WEBSOCKET_CONSOLE` set to `true`, logs can be streamed, and commands sent, over a websocket connection.
With `WEBSOCKET_CONSOLE` set to `true`, logs can be streamed, and commands sent, over a WebSocket connection.
The API is available on `/console`.
## Password
@@ -21,7 +21,16 @@ The listen address and port can be set with `WEBSOCKET_ADDRESS` (defaults to `0.
## Log history
When a connection is established, the last 50 (by default, configurable with `WEBSOCKET_LOG_BUFFER_SIZE`) log lines are sent with a `logHistory` type message.
??? tip "Tip: Remember to forward the websocket port on the host"
??? tip "Tip: Remember to forward the WebSocket port on the host"
!!! warning "Security Implications"
By default, publishing ports in Docker binds them to all network interfaces (`0.0.0.0`), making the WebSocket console accessible to any device that can reach your host machine.
Since the WebSocket console grants **full administrative access** to your server, it is critical to use a strong [WebSocket password](#password) or [RCON password](../configuration/server-properties.md/#rcon-password).
If you wish to restrict access to the local machine only, refer to the [Docker documentation](https://docs.docker.com/engine/network/port-publishing/#publishing-ports) on binding to specific IP addresses (e.g., `127.0.0.1:80:80`).
If WebSocket access is only intended for inter-container connections, consider **NOT** forwarding the port to the host machine, and putting the containers in a shared [Docker network](https://docs.docker.com/engine/network/#user-defined-networks).
```yaml title="compose.yaml"
services:
@@ -34,12 +43,12 @@ When a connection is established, the last 50 (by default, configurable with `WE
## Environment variables
| Environment Variable | Usage | Default |
| ---------------------------------- | ---------------------------------------------------------- | ------------ |
| `WEBSOCKET_CONSOLE` | Allow remote shell over websocket | `false` |
| `WEBSOCKET_ADDRESS` | Bind address for websocket server | `0.0.0.0:80` |
| `WEBSOCKET_CONSOLE` | Allow remote shell over WebSocket | `false` |
| `WEBSOCKET_ADDRESS` | Bind address for WebSocket server | `0.0.0.0:80` |
| `WEBSOCKET_DISABLE_ORIGIN_CHECK` | Disable checking if origin is trusted | `false` |
| `WEBSOCKET_ALLOWED_ORIGINS` | Comma-separated list of trusted origins | ` ` |
| `WEBSOCKET_PASSWORD` | Password will be the same as RCON_PASSWORD if unset | ` ` |
| `WEBSOCKET_DISABLE_AUTHENTICATION` | Disable websocket authentication | `false` |
| `WEBSOCKET_DISABLE_AUTHENTICATION` | Disable WebSocket authentication | `false` |
| `WEBSOCKET_LOG_BUFFER_SIZE` | Number of log lines to save and send to connecting clients | `50` |
## API Schema

View File

@@ -12,8 +12,8 @@ where `<tag>` refers to the first column of this table:
| Tag | Java version | Linux | JVM Type | Architecture | Note |
|----------------|--------------|--------|--------------------|---------------------|------|
| latest | 21 | Ubuntu | Hotspot | amd64, arm64 | |
| stable | 21 | Ubuntu | Hotspot | amd64, arm64 | |
| latest | 25 | Ubuntu | Hotspot | amd64, arm64 | |
| stable | 25 | Ubuntu | Hotspot | amd64, arm64 | |
| java25 | 25 | Ubuntu | Hotspot | amd64, arm64 | |
| java25-jdk | 25 | Ubuntu | Hotspot+JDK | amd64, arm64 | |
| java25-graalvm | 25 | Oracle | Oracle GraalVM (3) | amd64, arm64 | (5) |

View File

@@ -0,0 +1,17 @@
services:
mc:
image: itzg/minecraft-server:java25
tty: true
stdin_open: true
environment:
EULA: "TRUE"
TYPE: FTBA
FTB_MODPACK_ID: "130"
FTB_MODPACK_VERSION_ID: "100171"
MEMORY: "4G"
ports:
- "25565:25565"
volumes:
- data:/data
volumes:
data:

View File

@@ -35,6 +35,7 @@
"controllable",
"controlling",
"craftpresence",
"crash-assistant",
"cull-less-leaves",
"ctm",
"custom-main-menu",
@@ -100,6 +101,7 @@
"lootbeams",
"magnesium-extras",
"make-bubbles-pop",
"mekalus-oculus-fork-with-fixed-mekanism-mekasuit",
"menumobs",
"minecraft-rich-presence",
"mining-speed-tooltips",
@@ -183,7 +185,10 @@
"forceIncludes": ["just-enough-resources-jer"]
},
"ftb-stoneblock-4": {
"forceIncludes": ["particular-reforged"]
"forceIncludes": [
"particular-reforged",
"ctm"
]
},
"mc-eternal-2": {
"forceIncludes": [

View File

@@ -32,6 +32,7 @@
"continuity",
"controlling",
"craftpresence",
"CrashAssistant",
"Cull Less Leaves",
"cwb",
"DisableCustomWorldsAdvice",

View File

@@ -1,95 +0,0 @@
---
site_name: Minecraft Server on Docker (Java Edition)
site_url: https://docker-minecraft-server.readthedocs.io/en/latest/
site_description: Documentation for Minecraft Server on Docker
repo_url: https://github.com/itzg/docker-minecraft-server
edit_uri: blob/master/docs/
theme:
name: material
features:
- navigation.tracking
- navigation.tabs
- navigation.tabs.sticky
- navigation.sections
- navigation.expand
- navigation.top
- navigation.indexes
locale: en
palette:
# Palette toggle for automatic mode
- media: "(prefers-color-scheme)"
toggle:
icon: material/brightness-auto
name: Switch to light mode
# Palette toggle for light mode
- media: "(prefers-color-scheme: light)"
scheme: default
toggle:
icon: material/brightness-7
name: Switch to dark mode
# Palette toggle for dark mode
- media: "(prefers-color-scheme: dark)"
scheme: slate
toggle:
icon: material/brightness-4
name: Switch to system preference
highlightjs: true
hljs_languages:
- yaml
- bash
- java
- docker
- shell
- json
extra_css:
- css/extra.css
markdown_extensions:
- admonition
- toc:
permalink: true
- attr_list
- def_list
- footnotes
- tables
- pymdownx.emoji:
emoji_index: !!python/name:material.extensions.emoji.twemoji
emoji_generator: !!python/name:material.extensions.emoji.to_svg
- pymdownx.highlight:
anchor_linenums: true
line_spans: __span
pygments_lang_class: true
- pymdownx.inlinehilite
- pymdownx.details
- pymdownx.snippets
- pymdownx.superfences
- mdx_gh_links:
user: camalot
repo: mkdocs-test
- mkdocs-click
copyright: Copyright &copy; itzg 2025.
plugins:
- search
- autorefs
- mkdocstrings:
handlers:
python:
options:
docstring_section_style: list
members_order: source
show_root_heading: true
show_source: false
show_signature_annotations: true
# https://github.com/ultrabug/mkdocs-static-i18n
- i18n:
languages:
- locale: en
name: English
build: true
default: true
- literate-nav:
nav_file: README.md
implicit_index: true

View File

@@ -321,7 +321,7 @@ case "${TYPE^^}" in
logError "Invalid TYPE: '$TYPE'"
logError "Must be: VANILLA, FORGE, BUKKIT, SPIGOT, PAPER, FOLIA, PURPUR, FABRIC, QUILT,"
logError " SPONGEVANILLA, CUSTOM, MAGMA, MOHIST, GTNH, AIRPLANE, PUFFERFISH,"
logError " CANYON, LIMBO, NANOLIMBO, CRUCIBLE, LEAF, YOUER, BANNER"
logError " CANYON, LIMBO, NANOLIMBO, CRUCIBLE, LEAF, YOUER, BANNER, NEOFORGE"
exit 1
;;

View File

@@ -93,7 +93,7 @@ if isTrue "$FTB_FORCE_REINSTALL" ||
log "Installing modpack ID ${FTB_MODPACK_ID}, version ID ${FTB_MODPACK_VERSION_ID}"
log "This could take a while..."
${ftbInstaller} -pack "${FTB_MODPACK_ID}" -version "${FTB_MODPACK_VERSION_ID}" -auto -force | tee ftb-installer.log
${ftbInstaller} -pack "${FTB_MODPACK_ID}" -version "${FTB_MODPACK_VERSION_ID}" -auto -force -no-java | tee ftb-installer.log
rm -f forge*installer.jar
echo "${FTB_MODPACK_ID}=${FTB_MODPACK_VERSION_ID}" > ${ftbInstallMarker}

View File

@@ -1,6 +1,6 @@
#!/bin/bash
: "${FOLIA_CHANNEL:=experimental}"
: "${FOLIA_CHANNEL:=default}"
# shellcheck source=start-utils
. "$(dirname "$0")/start-utils"

View File

@@ -47,7 +47,7 @@ if [ -n "$ICON" ]; then
fi
fi
canUseRollingLogs=true
useGeneratedLogs=${GENERATE_LOG4J2_CONFIG:-${ENABLE_ROLLING_LOGS:-false}}
useFallbackJvmFlag=false
SERVER_DIR="$baseDataDir"
@@ -65,7 +65,7 @@ patchLog4jConfig() {
return 1
fi
JVM_OPTS="-Dlog4j.configurationFile=${file} ${JVM_OPTS}"
canUseRollingLogs=false
useGeneratedLogs=false
}
# Temporarily disable debugging output
@@ -104,7 +104,8 @@ elif versionLessThan 1.18.1; then
fi
# Set up log4j2 configuration with templating support
if ${canUseRollingLogs}; then
LOGFILE="${SERVER_DIR}/log4j2.xml"
if ${useGeneratedLogs}; then
# Set up log configuration defaults
: "${LOG_LEVEL:=info}"
: "${ROLLING_LOG_MAX_FILES:=1000}"
@@ -128,10 +129,9 @@ if ${canUseRollingLogs}; then
export LOG_LEVEL ROLLING_LOG_FILE_PATTERN ROLLING_LOG_MAX_FILES
export LOG_CONSOLE_FORMAT LOG_TERMINAL_FORMAT LOG_FILE_FORMAT
LOGFILE="${SERVER_DIR}/log4j2.xml"
# Always regenerate if file doesn't exist or REGENERATE_LOG4J2 is set
if [ ! -e "$LOGFILE" ] || isTrue "${REGENERATE_LOG4J2:-false}"; then
# Always regenerate if file doesn't exist
if [ ! -e "$LOGFILE" ] || isTrue "${REGENERATE_LOG4J2:-true}"; then
log "Generating log4j2.xml from template in ${LOGFILE}"
# Generate log4j2.xml using heredoc for reliable variable substitution
@@ -142,6 +142,9 @@ if ${canUseRollingLogs}; then
<Console name="SysOut" target="SYSTEM_OUT">
<PatternLayout pattern="${LOG_CONSOLE_FORMAT}" />
</Console>
<Queue name="TerminalConsole">
<PatternLayout pattern="${LOG_TERMINAL_FORMAT}" />
</Queue>
<RollingRandomAccessFile name="File" fileName="logs/latest.log" filePattern="${ROLLING_LOG_FILE_PATTERN}">
<PatternLayout pattern="${LOG_FILE_FORMAT}" />
<Policies>
@@ -169,10 +172,8 @@ EOF
# Apply the log4j2 configuration
JVM_OPTS="-Dlog4j.configurationFile=log4j2.xml ${JVM_OPTS}"
elif isTrue "${ENABLE_ROLLING_LOGS:-false}"; then
# Legacy behavior: error if rolling logs explicitly requested but not possible
logError "Using rolling logs is currently not possible in the selected version due to CVE-2021-44228"
exit 1
else
rm -f "${LOGFILE}"
fi
# Optional disable console

42
zensical.toml Normal file
View File

@@ -0,0 +1,42 @@
[project]
site_name = "Minecraft Server on Docker (Java Edition)"
site_url = "https://docker-minecraft-server.readthedocs.io/en/latest/"
site_description = "Documentation for Minecraft Server on Docker"
repo_name = "itzg/docker-minecraft-server"
repo_url = "https://github.com/itzg/docker-minecraft-server"
site_author = "itzg"
copyright = "Copyright &copy; itzg 2026."
docs_dir = "docs"
site_dir = "site"
[project.theme]
features = [
"navigation.tracking",
"navigation.tabs",
"navigation.tabs.sticky",
"navigation.sections",
"navigation.expand",
"navigation.top",
"navigation.indexes"
]
language = "en"
[project.theme.icon]
repo = "fontawesome/brands/github"
[[project.theme.palette]]
media = "(prefers-color-scheme)"
toggle.icon = "lucide/sun-moon"
toggle.name = "Switch to light mode"
[[project.theme.palette]]
media = "(prefers-color-scheme: light)"
scheme = "default"
toggle.icon = "lucide/sun"
toggle.name = "Switch to dark mode"
[[project.theme.palette]]
media = "(prefers-color-scheme: dark)"
scheme = "slate"
toggle.icon = "lucide/moon"
toggle.name = "Switch to light mode"