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
Before you start
-
Distant Horizons on the serverThe jar is in
mods/, and the server has started with it once soconfig/DistantHorizons.tomlexists. -
Generated Distant Horizons dataAt least one dimension of the world holds a
DistantHorizons.sqlite. -
serverKeyandlevelKeyPrefixsetSet both inconfig/DistantHorizons.tomlto letters, digits,_and-. They name the folders players put the files in. -
A way to warn playersTurn on
enable-rconinserver.properties, or start the server from Konnekt. - A destinationA saved bucket, such as the one from Save a Cloudflare R2 bucket.
Add the trigger
- Maximize the Scheduler tile to open the scheduler editor.
- In the graph picker, select New graph.
- Select Open blocks at the top left of the canvas.
- Under trigger, click Cron Schedule.
- 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.
Add DH Snapshot
- Under action, open the Distant Horizons group and click DH Snapshot.
- Set Destination of the last snapshot to your destination.
- 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.
Add Publish DH Snapshot
- In the same group, click Publish DH Snapshot.
- Set Destination to the same destination.
- Connect DH Snapshot's onComplete port to Publish DH Snapshot's trigger port.
- 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.
Run it
- Open Graph actions and select Save.
- Select run.
- Follow the progress in the server's console.
- 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.
Copy the link
- Open Settings, then Destinations.
- On the destination's Snapshot link row, select Copy link.
The link is the address of the snapshot's latest.json.
Give it to the people who download the snapshot.
Each snapshot also has an index.html listing every file with its size
and target folder.
Its address is in What ends up in the bucket.
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.
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. |