# Server — Properties, JVM, Operations Three server tiers are provided as drop-in presets in `presets//server/` (see `presets/README.md`). The **Medium** tier is the recommended default. | Tier | Host RAM | view-distance | simulation-distance | max-players | |------|----------|---------------|---------------------|-------------| | Low | 8-16 GB | 5 | 4 | 8 | | **Medium** | 16-32 GB | 8 | 6 | 8 | | High | 32 GB+ | 12 | 10 | 16 | Apply a tier (after `packwiz install`): ```bash cp presets/medium/server/server.properties server_pack/server.properties # then use the matching jvm-flags.txt when launching ``` `server_pack/eula.txt` → `eula=true` (after review). ## Recommended JVM Flags (server, Medium) ```bash java -Xms4G -Xmx8G \ -XX:+UseG1GC \ -XX:+ParallelRefProcEnabled \ -XX:MaxGCPauseMillis=200 \ -XX:+UnlockExperimentalVMOptions \ -XX:+DisableExplicitGC \ -XX:+AlwaysPreTouch \ -XX:G1NewSizePercent=30 \ -XX:G1MaxNewSizePercent=40 \ -XX:G1HeapRegionSize=8M \ -XX:G1ReservePercent=20 \ -XX:G1HeapWastePercent=5 \ -XX:G1MixedGCCountTarget=4 \ -XX:InitiatingHeapOccupancyPercent=15 \ -XX:G1MixedGCLiveThresholdPercent=90 \ -XX:G1RSetUpdatingPauseTimePercent=5 \ -Dlog4j2.formatMsgNoLookups=true \ -jar neoforge-21.1.248-server.jar nogui ``` Notes: - G1 tuning keeps large-tech-server TPS stable under chunk gen (Krypton Reno + BadOptimizations help server-side). - `-Xms4G` avoids early GC churn. Cap at 8G for Medium; this pack is RAM-hungry from AE2/Mekanism tick load but Medium does not need 16G. - See `presets/low/server/jvm-flags.txt` (2-4G) and `presets/high/server/jvm-flags.txt` (8-16G) for the other tiers. ## Server start order 1. `packwiz install --dir server_pack` (first time / after changes) 2. Accept EULA. 3. Launch with the JVM flags above. ## Common failures | Symptom | Fix | |---------|-----| | "Mismatched mods" on client join | Run `packwiz refresh` both packs, redeploy. | | Sinytra connector errors | Update Sinytra Connector + Forgified Fabric API together. | | Iris black screen | Disable flywheel compat first, then test without shaders. | | Crash on world gen (Deeper and Darker) | Ensure CF 659011 + its lithostitched data load; update both. | | TPS lag from many AE2 cells | Check FTB chunk claims; lower `simulation-distance`. | | Immersive Portals won't load | Must be the Fabric jar added via `url add --force` (Modrinth blocks loader mismatch). | ## Backups - World: copy `server_pack/world/` (or use FTB Chunks backups). - Configs: `server_pack/config/` mirrors client defaults; keep both in sync when changing KubeJS scripts or FTB settings.