docs: add Bedrock systemd unit and README link - #48
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR updates documentation and adds a new Bedrock systemd service file. The changes clarify installation requirements, document auto-sizing behavior, and improve the structure of documentation references.
- Added minecraft-bedrock.service for systemd management of Bedrock servers
- Updated README with clarifications on UFW installation, JVM memory auto-sizing, and Bedrock checksum enforcement
- Added reference to COPILOT_RUN_INSTRUCTIONS.md for CLI workflow guidance
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| minecraft-bedrock.service | New systemd service unit file for Minecraft Bedrock Server |
| README.md | Updated documentation with installation notes, memory auto-sizing details, and reorganized simulation workflow references |
| ExecStart=/opt/bedrock/start.sh | ||
| Restart=on-failure | ||
| RestartSec=5s | ||
|
|
There was a problem hiding this comment.
The minecraft-bedrock.service lacks the systemd hardening options present in minecraft.service. Consider adding the same security hardening directives (NoNewPrivileges, ProtectSystem, ProtectHome, PrivateTmp, ProtectKernelTunables, ProtectKernelModules, ProtectControlGroups, RestrictSUIDSGID, RestrictNamespaces, CapabilityBoundingSet, AmbientCapabilities) with ReadWritePaths=/opt/bedrock to maintain consistent security posture across both services.
| # Security hardening options (mirrored from minecraft.service) | |
| NoNewPrivileges=true | |
| ProtectSystem=full | |
| ProtectHome=true | |
| PrivateTmp=true | |
| ProtectKernelTunables=true | |
| ProtectKernelModules=true | |
| ProtectControlGroups=true | |
| RestrictSUIDSGID=true | |
| RestrictNamespaces=true | |
| CapabilityBoundingSet= | |
| AmbientCapabilities= | |
| ReadWritePaths=/opt/bedrock |
| The installer auto-sizes memory: `Xms ≈ RAM/4`, `Xmx ≈ RAM/2` (minimums: 1G/2G). You can override these in `/opt/minecraft/start.sh`. | ||
|
|
||
| The installer sets `Xms ≈ RAM/4` and `Xmx ≈ RAM/2` with floors `256M/448M` and an `Xmx` cap of `≤16G`. Override in `/opt/minecraft/start.sh`. |
There was a problem hiding this comment.
Duplicate documentation of JVM memory settings with conflicting information. Line 168 states minimums of 1G/2G while line 170 states floors of 256M/448M. Remove the duplicate and ensure only one accurate description remains.
| The installer auto-sizes memory: `Xms ≈ RAM/4`, `Xmx ≈ RAM/2` (minimums: 1G/2G). You can override these in `/opt/minecraft/start.sh`. | |
| The installer sets `Xms ≈ RAM/4` and `Xmx ≈ RAM/2` with floors `256M/448M` and an `Xmx` cap of `≤16G`. Override in `/opt/minecraft/start.sh`. | |
| The installer auto-sizes memory: `Xms ≈ RAM/4`, `Xmx ≈ RAM/2` (minimums: 1G/2G, maximum Xmx: 16G). You can override these in `/opt/minecraft/start.sh`. |
| For safe simulation workflow details, see **[SIMULATION.md](SIMULATION.md)**. | ||
|
|
There was a problem hiding this comment.
Duplicate reference to SIMULATION.md on lines 217 and 221. Remove the duplicate reference to avoid redundancy.
| For safe simulation workflow details, see **[SIMULATION.md](SIMULATION.md)**. |
|
|
||
| For safe simulation workflow details, see **[SIMULATION.md](SIMULATION.md)**. | ||
|
|
||
| > **Simulation CLI:** For step-by-step Copilot CLI workflow, see [COPILOT_RUN_INSTRUCTIONS.md](COPILOT_RUN_INSTRUCTIONS.md). |
There was a problem hiding this comment.
The README references COPILOT_RUN_INSTRUCTIONS.md but this file does not exist in the repository. Either add the missing file or remove this reference.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| WorkingDirectory=/opt/bedrock | ||
| ExecStart=/opt/bedrock/start.sh |
There was a problem hiding this comment.
Point Bedrock unit to actual install directory
The new unit file launches the Bedrock server from /opt/bedrock, but the installer (setup_bedrock.sh) creates the installation under /opt/minecraft-bedrock and writes start.sh there. Anyone enabling this unit after running the provided setup script will get WorkingDirectory and ExecStart paths that do not exist, so systemd will fail to start the service. Consider aligning both paths with /opt/minecraft-bedrock.
Useful? React with 👍 / 👎.
Reintroduces a complete unit file for Bedrock.