Guide

Publish Distant Horizons LODs

Publish the server's Distant Horizons data to a bucket as a snapshot others can download.

Duration
~20 min
Requirements
A Distant Horizons server · A destination
Topics
Distant Horizons · Destinations · Scheduler
00

Before you start

  • Distant Horizons on the serverThe jar is in mods/, and the server has started with it once so config/DistantHorizons.toml exists.
  • Generated Distant Horizons dataAt least one dimension of the world holds a DistantHorizons.sqlite.
  • serverKey and levelKeyPrefix setSet both in config/DistantHorizons.toml to letters, digits, _ and -. They name the folders players put the files in.
  • A way to warn playersTurn on enable-rcon in server.properties, or start the server from Konnekt.
  • A destinationA saved bucket, such as the one from Save a Cloudflare R2 bucket.
01

Add the trigger

  1. Maximize the Scheduler tile to open the scheduler editor.
  2. In the graph picker, select New graph.
  3. Select Open blocks at the top left of the canvas.
  4. Under trigger, click Cron Schedule.
  5. Set Cron expression to 0 4 * * 0.

That fires every Sunday at 04:00 on this computer's clock.
Pick an hour with few players, because DH Snapshot stops the server for the copy.

02

Add DH Snapshot

  1. Under action, open the Distant Horizons group and click DH Snapshot.
  2. Set Destination of the last snapshot to your destination.
  3. Connect Cron Schedule's onComplete port to DH Snapshot's trigger port.

With a destination set, the block reads the bucket's latest.json and stages only the parts the bucket lacks.
Use the same Key prefix here and in step 03, or leave both blank, so the block finds the previous snapshot.
The other fields are on the DH Snapshot page.

03

Add Publish DH Snapshot

  1. In the same group, click Publish DH Snapshot.
  2. Set Destination to the same destination.
  3. Connect DH Snapshot's onComplete port to Publish DH Snapshot's trigger port.
  4. Connect DH Snapshot's Staged folder output to Publish DH Snapshot's Staged folder input.

The wired folder replaces the field, so a custom staging folder still reaches the publish.
Snapshots to keep is 3 unless you change it.
The other fields are on the Publish DH Snapshot page.

04

Run it

  1. Open Graph actions and select Save.
  2. Select run.
  3. Follow the progress in the server's console.
  4. Select [on] so the trigger can fire.

The first run copies and uploads all of the data, so it takes the longest.
Later runs send only the parts that changed.
The server stops for the copy and starts again whether or not the copy worked.

06

Choose public or private

A new destination publishes to a fixed address under its prefix.
A private link puts the snapshot behind a random token instead.
Switch before the first publish and there is nothing to move.
The switch and Rotate link are described under Snapshot link.

07

When it refuses

Error Do
no Distant Horizons jar found in folder: the snapshot reads the version from it Put the Distant Horizons jar in mods/.
index.json in folder was staged for a different layout (partsBase value, expected value): run the snapshot again Run DH Snapshot again after switching a link between public and private.