Skip to content

Instantly share code, notes, and snippets.

@RJ
Created November 25, 2025 11:26
Show Gist options
  • Select an option

  • Save RJ/6ab61a8c87fd660a84d62b590179616a to your computer and use it in GitHub Desktop.

Select an option

Save RJ/6ab61a8c87fd660a84d62b590179616a to your computer and use it in GitHub Desktop.
Hosting LAN minecraft server notes..

Minecraft server at home notes

docker-compose.yaml:

services:
  mc:
    image: itzg/minecraft-server:latest
    container_name: mc-fabric
    restart: unless-stopped
    ports:
      - "0.0.0.0:25565:25565"
      - "127.0.0.1:25575:25575"
    environment:
      EULA: "TRUE"
      TYPE: "FABRIC"
      VERSION: "1.21.10"
      MEMORY: "22G"
      USE_AIKAR_FLAGS: "true"
      ENABLE_ROLLING_LOGS: "true"
      TZ: "Etc/UTC"
    volumes:
      - ./server-data:/data:Z

Copy in mods and config dir from exported prism bundle or whatever mods are needed.

Start and stop server to create default configs.

Edit server.properties to taste.

Key changes in config/DistantHorizons.toml: distantGeneratorMode = "INTERNAL_SERVER" and probably playerBandwidthLimit = 0.

This will make pregen create the actual chunks as well as the LODs.

Nuke the world dir and start server.

Use DH's pregen on the server before players connect:

$ mcrcon # (or use /commands while in-game as op)
Logged in.
Type 'Q' or press Ctrl-D / Ctrl-C to disconnect.
>dh pregen start overworld 0 0 256
Starting pregen. Progress will be in the server console.
>dh pregen start the_nether 0 0 128
Starting pregen. Progress will be in the server console.
>dh pregen start the_end 0 0 128

Players can connect with default DH settings and it will stream the pregenerated LODs pretty quickly for a large view distance.

@RJ
Copy link
Copy Markdown
Author

RJ commented Mar 31, 2026

/tick freeze
stop things while setting up world without advancing time

/time set day|night|noon|midnight

/gamerule ...
advance_time
advance_weather
spawn_phantoms
spawn_wardens
keep_inventory
players_sleeping_percentage
tnt_explodes

/weather clear

@RJ
Copy link
Copy Markdown
Author

RJ commented Apr 7, 2026

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment