Preserve JARVIS menus while porting gameplay, Citizens NPCs and plugin-only CI

This commit is contained in:
unimatrixgit 2026-11-29 01:54:16 +01:00
commit dbf4bb25ff
133 changed files with 2251 additions and 196035 deletions

View file

@ -1,29 +0,0 @@
# Approved Arrakis creature and recipe scope
Implementation remains pending until deployed and verified. Keep terrain separate
and preserve the live 1.0.12-arrakeen1 terrain build when recovering its source.
- Rabbits become Jerboas on Arrakis only; preserve custom worms, raiders and NPCs.
- Hide: Common MK I. Raw meat: Uncommon MK III. Water vial: Rare MK VI, 20% drop.
- Cooked meat: Rare MK VI; fire death and furnace/smoker/campfire use the same item.
- Jerboa stew: Very Rare MK IX. Use Jerboa meat and contaminated spice instead
of the mushroom in the rabbit stew recipe; retain the remaining ingredients.
- Refined spice breeds Jerboas. Use custom flesh, hide and creature artwork.
- Spice blooms can produce tiny worms represented by retextured wolves.
- Jerboa stew tames them with 100% success and breeds them like native wolves.
Offspring automatically belong to their owner and follow the native growth cycle.
- Pets are permanently immune to suffocation, independently of water buffs.
- Water vial: +25% attack damage and max health, and regeneration, for 90 seconds.
Reapplication refreshes the duration rather than stacking modifiers.
- Pet death: spice and one bone, both guaranteed. Bone bears the pet's name,
Legendary MK XIV; memorial item, no extra combat power.
## Ecology implementation and rollout
`ArrakisEcology` supplies the Arrakis-only spawn filter, Jerboa breeding and custom drops, fire cooking, furnace/smoker/campfire result hook, and native wolf pet flow. Bloom coordinates are recorded in the chunk PDC so revisiting a bloom does not issue another pet. Water applies one named +25% attack/max-health modifier for 90 seconds, plus Regeneration I. Refreshes do not stack modifiers; absolute expiry is checked after entity load and on a one-second maintenance tick. Native wolf AI, ownership, growth and mating remain in use.
`tools/PatchArrakisEcology.java` adds only this class and its item-factory interface to the exact SHA-256-pinned live `1.0.12-arrakeen1` JAR. It injects two calls into the existing startup and bloom methods. All unrelated existing methods and JAR entries are checked byte for byte. Do not deploy the complete older terrain build from this checkout.
Four new behavioural tests cover planet isolation, natural vs custom/tagged mobs, raw vs fire-cooked death drops and the exact 20% vial threshold, and suffocation immunity without a water buff. The terrain suite has 19 passing tests.
Still pending: custom Jerboa/worm textures and the flesh/hide artwork, pet/water runtime verification, and actual rollout. Gold rabbits and native wolves remain visual placeholders until the world-scoped artwork is ready. No texture or real player interaction is claimed as verified.

View file

@ -1,39 +0,0 @@
# Hetzner DuneRealms: CloudPanel on the Vaerkring lobby host
The **Vaerkring lobby server is also the web hosting server**.
Run CloudPanel and the Vaerkring Paper backend on the same Debian VM.
Velocity and the other five planets may run on this VM or another VM.
## Recommended hostname
- `dune-lobby-01`: CloudPanel, Nginx, website, and Vaerkring Paper (port 25571)
- `dune-mc-01`: Velocity and five planet backends (optional second VM)
## Install order on a fresh Debian 12/13 VM
1. Install CloudPanel **first** on the fresh VM with `network/hetzner-cloudpanel-setup.sh`.
2. Complete CloudPanel initial setup on `https://LOBBY_IP:8443`.
3. Run `network/hetzner-debian-setup.sh` to install Java 21 and Minecraft dependencies.
4. Deploy the GitHub Actions network ZIP with `network/deploy-network.sh` if running the full network locally.
If using separate VMs, copy only the Vaerkring backend to the lobby VM and
adjust Velocity's `spacing-guild` address to its private Hetzner network IP.
The existing deployment script assumes all six backends and proxy are local:
multi-VM installation is not automated yet.
## Networking and security
- Public TCP 80/443: CloudPanel website.
- TCP 8443: CloudPanel admin, restricted to your administrator IP.
- TCP 22: SSH, restricted to your administrator IP.
- Public TCP 25565: Velocity proxy **only on the VM hosting Velocity**.
- TCP 25571: Vaerkring backend; only accessible from Velocity over private network.
- TCP 25566–25570: Planet backends; private access only.
- Never expose MariaDB or Paper backends to the public internet.
- If Velocity and lobby are on different hosts, change `server-ip=127.0.0.1`
in lobby `server.properties` to the lobby VM's private network IP,
configure Paper's Velocity forwarding secret, and firewall port 25571.
- Reserve sufficient RAM for CloudPanel services and Minecraft; do not allocate
all RAM to Java. Monitor CPU, disk, and memory during testing.
The network packaging and lobby generation are prototypes: custom Vaerkring
terrain, NPC navigation, and economy synchronization are not yet verified.
CloudPanel official documentation:
https://www.cloudpanel.io/docs/v2/getting-started/hetzner-cloud/installation/installer/

View file

@ -1,40 +0,0 @@
# DuneRealms Hetzner deployment topologies
> Live status, 18 October 2026: [Velocity plus the saved Guild lobby](live-lobby/README.md) run together on the EU Minecraft VM. The website and CloudPanel run separately. The seven-VM arrangement below is an earlier proposed topology, not the deployed layout. The custom lobby and Navigator structure now exist on beta and are installed; planet backends still need their own provisioned hosts and configuration.
## Current layout: seven virtual machines
- `dune-proxy-01`: Velocity, public Minecraft TCP 25565.
- `dune-lobby-01`: Vaerkring Paper (25571) **plus CloudPanel website** (80, 443, 8443).
- `dune-arrakis-01`: Arrakis Paper, private TCP 25566.
- `dune-giedi-01`: Giedi Prime Paper, private TCP 25567.
- `dune-kaitain-01`: Kaitain Paper, private TCP 25568.
- `dune-caladan-01`: Caladan Paper, private TCP 25569.
- `dune-sigma-01`: Sigma Draconis IV Paper, private TCP 25570.
All seven VMs must join a Hetzner private network. Proxy reaches backend VM private IPs;
the backends are not exposed publicly. Limit SSH and CloudPanel 8443 to administrator IPs.
On the lobby VM, install CloudPanel **first** on fresh Debian, then Java 21.
## Alternative layout: one VM
Use `network/deploy-network.sh` for the all-in-one setup. Its default
backend addresses are loopback. Reserve enough RAM for six Paper instances and
Velocity; if CloudPanel is on that VM install CloudPanel before Minecraft.
## Per-VM deployment (current recommended mode)
1. Run `network/hetzner-debian-setup.sh` on each Debian 12/13 VM
(CloudPanel first on the lobby VM).
2. Download the same `DuneRealms-Velocity-Network.zip` GitHub Actions artifact.
3. On each VM run:
`sudo bash network/deploy-node.sh /path/to/DuneRealms-Velocity-Network.zip NODE PRIVATE_IP`
with NODE one of `proxy`, `spacing-guild`, `arrakis`, `giedi-prime`,
`kaitain`, `caladan`, `sigma-draconis-iv`.
4. Install the matching official Paper 1.21.4 or Velocity proxy JAR in the
service working directory. The per-node script does not download server JARs.
5. Edit proxy `velocity.toml` to use backend private IPs instead of loopback.
Copy the proxy forwarding secret into each backend's Paper proxy config.
Do not expose backend ports to the internet.
6. Review/accept Minecraft EULA on each backend, then enable/start services
using `sudo systemctl enable --now dune-NODE`.
The generated ZIP includes a *prototype* Vaerkring terrain profile; the
custom lobby generation and navigator behavior are not yet implemented.

View file

@ -1,23 +0,0 @@
# Item metadata and cooking
JarvisTranslator 0.5.16 classifies every native item using its prototype rarity.
The four native baselines are common MK I, uncommon MK IV, rare MK VII and
very rare MK X. Shared material overrides provide the agreed progression across
MK 0–XIV: ore/metal hierarchy, common MK II villager workstations, uncommon MK III
redstone mechanisms, very rare debris/scrap, and legendary netherite.
Registered custom items keep their own template grades, including spice and kits.
Classification is presentation, never issuance or payment authority.
Cooking recipes and output must have identical stable item metadata because
Minecraft compares the existing result slot against the recipe before emitting
the Bukkit smelt event. At server load, cooking recipes receive canonical input
(only exact choices) and output metadata. Recipe key, native ordering, category,
group, cooking time and XP remain intact, including custom recipes. No timer is
needed and no per-item serial number is introduced.
`tools/probes/CookingProbe.java` is an isolated Paper integration probe, never a
production plugin. Compile it with the connector classes and Paper classpath,
package those classes/resources with a plugin.yml naming CookingProbe, and run
in a disposable server with no shared database/bridge configuration. It checks
all native item types and two consecutive stone, charcoal, iron, cooked beef,
and custom exact-input rabbit recipes. A successful run emits PROBE SUCCESS.

View file

@ -1,83 +0,0 @@
# November planet regeneration
Worlds remain on Paper 1.21.8. Upgrading the server is a separate, later operation.
| World | Terrain and plants | Wildlife | Native structures |
| --- | --- | --- | --- |
| Caladan | Rocky jungle islands, high hills, large warm/deep oceans; jungle, spruce, cherry and bamboo | Normal biome wildlife except creepers | Vanilla eligible structures, including shipwrecks, ocean monuments and lush caves |
| Kaitain | Flower plains, smaller hills and oceans; oak, birch, dark oak, spruce, cherry, acacia | Passive wildlife | Plains villages at about half vanilla candidate density, trial chambers, outposts, woodland mansions |
| Giedi Prime | Permanent dark, mixed dirt/stone/deepslate/netherrack, lava lakes, no water; pale oak, crimson and warped trees | Nether wildlife; piglins/hoglins protected from Overworld zombification | Bastions and Nether fortresses in the main planet world |
| Sigma Draconis IV | Snowfields and snowy hills, frozen lakes; very rare mooshroom island with small volcano and warm bubbling springs | Skeleton family; mooshrooms only on rare islands | Sulfur cubes reserved for a later version that supports them |
Only the existing native planet ore profiles place mineable ores. Biome datapacks
retain vanilla decoration but remove vanilla ore features that would bypass the
planet resource split. Kaitain village placement spacing is 48 rather than 34,
giving candidate density approximately `(34/48)^2 = 50.17%` of vanilla, and the
village structure choice is restricted to plains villages.
`TemperateLandscape`, `PlanetMobs` and `NativePlants` supply the new profiles.
Plant restrictions honour existing cancelled WorldGuard build decisions. They
reject foreign saplings, propagules, bamboo and Nether fungi on placement and
growth; they do not grant build permission. Custom NPC spawns and existing pets
retain their owners. No Arrakis generator is replaced by this rollout.
Official biome JSON source: Minecraft Java 1.21.8 client distributed by Mojang,
SHA-1 `a19d9badbea944a4369fd0059e53bf7286597576`, data pack format 81. The generator
is an additive patch of the actual live `DuneTerrain` 1.0.12 bytes, input SHA-256
`e297759566aa7bcc4986cadef6a9651198b93ab3a557d68ed5aa1c40f962b5fd`.
`tools/PatchPlanetProfiles.java` checks all unrelated methods and JAR entries.
Do not deploy a full terrain JAR rebuilt from the older repository version.
An isolated Paper instance with only DuneTerrain verified all four profiles and
located the requested structure types. Its initial shallow-ocean fault was fixed
before production: the spawn-island safeguard must not clamp ocean elevation
outside the spawn radius. Regression tests include deep-ocean monument candidates.
Regeneration preserves world identity, current claim references, player inventories,
advancements/statistics and per-world ender-chest contents. Existing player positions
are moved to the verified new spawn; all unrelated player NBT fields are checked
byte-for-byte. Original worlds are moved outside active folders for rollback.
## Revision 3
Caladan has a denser island distribution while keeping large oceans. After native
cave carving, OceanAquifers fills ocean-column air below sea level with water,
before structure placement so deliberately dry structure rooms stay intact. This
also protects Kaitain oceans. Giedi uses smoother heights, larger biome zones and
a dirt/coarse-dirt cap. Sigma includes all twelve configured snow/ice/island biomes
and stronger hills, with spruce permitted in its snowy forests.
Isolated Paper located the requested structures on all four planets and the added
Sigma ice/snow biomes. The verified revision-3 additive terrain JAR has SHA-256
1c3d318dfce0e847077f2a99c970c3ea8d885c39aa3413203fd7f8f258e6bd56.
Regeneration explicitly excludes Arrakis and keeps the current connector/GUI JARs.
## Caladan expansion
The first expanded world uses 17 native biomes, with smaller islands, connected
mountain ranges, rivers, swamp/mangrove lowlands and additional forest and ocean
variants. Vanilla jungle pyramids and swamp huts were located in isolated Paper.
Pumpkin patches are removed outside Kaitain; melon patches remain Caladan-only.
Native planting/growth rules cover trees and crops without bypassing WorldGuard.
No crops are plantable on Arrakis or Giedi Prime; Arrakis retains oak only.
JarvisTranslator 0.5.17 applies fire-spread and water-source-conversion defaults
on startup and later world loads. The biome/structure additions for the other
three homeworlds are a subsequent batch; Arrakis is never regenerated.
## Remaining House expansions
Kaitain adds fourteen configured biome variants, river valleys, trail ruins and
half-density plains/savanna villages. Its isolated native locator checks passed.
Giedi adds Nether/badlands cave biomes, canyon ranges, native mineshafts and
spawner-only zombie/spider/cave-spider exceptions; native Warden spawns remain
allowed in the Deep Dark. Ancient City placement is still being validated.
Sigma adds old-growth taiga, cold-ocean variants and a custom frozen-desert biome,
with igloos and snowy/taiga villages. Existing skeleton-only wildlife and rare
mooshroom exceptions remain unchanged; villages do not override wildlife rules.
The Arrakis additive plant-policy patch preserves every generation/ecology JAR
entry and all unrelated main-class methods; it does not regenerate the world.
Ancient City validation now passes: the Deep Dark region includes vanilla's
structure start layer Y=-27 (instead of ending below it). Isolated Paper also
located native Giedi mineshafts, bastions and fortresses, and Sigma frozen desert,
old-growth spruce taiga, frozen/jagged peaks, igloos and snowy/taiga villages.

View file

@ -1,45 +0,0 @@
# DuneRealms Pterodactyl deployment
## Topology
- dune-lobby-01: CloudPanel, public website, Pterodactyl **panel**, Wings node for Vaerkring.
- dune-proxy-01: Wings node for Velocity.
- dune-arrakis-01, dune-giedi-01, dune-kaitain-01, dune-caladan-01, dune-sigma-01:
one Wings node each for its Paper backend.
- All VMs on Hetzner private network. Panel domain e.g. panel.example.com.
- CloudPanel and Pterodactyl panel must use separate site configurations; avoid
conflicting Nginx server blocks, PHP versions, and database users.
## Installation checklist
1. Provision CloudPanel on fresh lobby VM first and create your website.
2. Create a **separate** PHP site for the Pterodactyl panel in CloudPanel.
Follow the official Pterodactyl panel installation guide for its supported
PHP version, Composer, database, Redis, scheduler and queue worker.
CloudPanel is not itself a Pterodactyl installer.
3. Configure HTTPS for panel.example.com, admin login and two-factor auth.
Link to it from the website's Admin tools page.
4. Install Docker and Pterodactyl Wings on each of the seven VMs using the
official Wings installation instructions. On lobby VM, ensure Docker and
CloudPanel firewall/network rules do not collide.
5. Register each node in the panel, download each node's unique Wings
configuration and place it in /etc/pterodactyl/config.yml on its VM.
6. Import compatible Paper and Velocity eggs. Create seven server instances,
assign their network ports and per-server resource limits. Upload the
network configs/plugins and copy the same Velocity forwarding secret.
7. Use Pterodactyl to manage Minecraft processes. **Disable any existing
dune-*.service units** on VMs before starting the equivalent Pterodactyl
server to avoid port conflicts and duplicate instances.
8. Firewall Wings API to the panel, SFTP to trusted users, and Paper ports to
the private network only. Expose public TCP 25565 solely on proxy VM.
9. Verify start/stop/restart, live console, logs, file manager and backups.
## IMPORTANT
This repository contains the topology and website integration, not a fully
installed Pterodactyl panel. Installation requires server access, node
registration, panel-generated Wings tokens and DNS records. Do not expose
Wings API credentials, panel API tokens or forwarding secrets in Git.
Use Pterodactyl's built-in authenticated live console, rather than exposing
Minecraft RCON or an unauthenticated custom command API.
Official documentation:
- https://pterodactyl.io/panel/1.0/getting_started.html
- https://pterodactyl.io/wings/1.0/installing.html

View file

@ -1,53 +0,0 @@
# Tonight's Hetzner deployment runbook
> Historical plan, superseded for the live lobby on 18 October 2026. See [the verified live deployment](live-lobby/README.md): Velocity and Paper lobby share the EU Minecraft VM; CloudPanel and the website run on a separate host. Do not install CloudPanel or Pterodactyl over the live Minecraft VM. The saved Guild lobby is implemented and deployed from the beta branch. The five planet backends remain pending; the seven-VM layout below is a proposal, not existing infrastructure.
## Intended layout (7 VMs)
| VM | Role | Port |
|---|---|---|
| dune-proxy-01 | Velocity | 25565 public |
| dune-lobby-01 | Vaerkring Paper + CloudPanel website + Pterodactyl panel/Wings | 25571 private |
| dune-arrakis-01 | Arrakis Paper + Wings | 25566 private |
| dune-giedi-01 | Giedi Prime Paper + Wings | 25567 private |
| dune-kaitain-01 | Kaitain Paper + Wings | 25568 private |
| dune-caladan-01 | Caladan Paper + Wings | 25569 private |
| dune-sigma-01 | Sigma Draconis IV Paper + Wings | 25570 private |
## Provisioning prerequisites
Create Debian VMs in Hetzner Cloud, attach all seven to a Hetzner private network,
install your SSH public key, and record private IPs. Choose VM RAM/CPU based on
expected players; lobby VM needs headroom for website, database, panel and Paper.
Do not paste API tokens, passwords or SSH private keys into chat or Git.
## One-time network config
Copy `network/network.example.json` to `network/network.json` locally and
fill in the private IPs and SSH hosts. Never commit personal infrastructure
details or the forwarding secret. Run
`python3 network/apply-network.py network/network.json --output network/generated`
to render settings. The `--deploy` mode requires SSH key access and correctly
installed services; test on staging before using it.
## World files
`network/generate-world-files.py` generates a complete per-world config folder
and zip for each world, based on the DuneTerrain source configuration.
These are **world-generation configuration files**, not pre-generated Minecraft
region (.mca) files. Actual playable worlds must be generated by starting each
Paper backend with the correct compatible generator installed. Vaerkring
custom lobby generator is not implemented; do not advertise it as ready.
World generation should be tested with a fresh world directory first.
## Installation order
1. On lobby VM: CloudPanel first, then Java 21, then Pterodactyl panel and Wings.
2. On all other VMs: Java 21 and Wings prerequisites.
3. Register each VM as a Pterodactyl node and configure Wings from panel-issued credentials.
4. Install Paper 1.21.4 and Velocity via supported Pterodactyl eggs.
5. Upload the compiled Dune plugins and planet-specific generator config.
6. Configure Velocity modern forwarding and identical secret across Paper nodes.
7. Configure CloudPanel site + HTTPS and a separate secured panel domain.
8. Start each server, inspect logs, test teleport, and verify only Velocity
is reachable publicly. Do not run systemd Minecraft units alongside Wings.
## Known gaps
No Hetzner VM has been created by these scripts. No pre-generated Minecraft world
data exists. Pterodactyl is not installed remotely. The generator's support for
Vaerkring and the full network package still require verification.

View file

@ -1,91 +0,0 @@
#!/usr/bin/env python3
"""Render or distribute network settings from one JSON file.
Usage:
python3 network/apply-network.py network/network.json --output /tmp/dune-network
python3 network/apply-network.py network/network.json --deploy
Requires SSH keys for each node; deploy uses scp and sudo via SSH.
"""
import argparse, ipaddress, json, pathlib, re, secrets, shutil, subprocess, sys
NAMES=("proxy","spacing-guild","arrakis","giedi-prime","kaitain","caladan","sigma-draconis-iv")
BACKENDS=NAMES[1:]
ROOT="/opt/dunerealms/DuneRealms-Velocity-Network"
def valid_host(value):
if not isinstance(value,str) or not re.fullmatch(r"[A-Za-z0-9_.:-]+",value):
raise ValueError("Invalid host/IP: "+str(value))
return value
def run(args): subprocess.run(args,check=True)
def main():
ap=argparse.ArgumentParser()
ap.add_argument("config")
ap.add_argument("--output",default="network/generated")
ap.add_argument("--deploy",action="store_true",help="Copy configs to VMs and restart services")
ap.add_argument("--secret-file",default="network/.forwarding.secret",help="Local untracked Velocity secret")
args=ap.parse_args()
cfg=json.loads(pathlib.Path(args.config).read_text())
nodes=cfg["nodes"]
if set(nodes)!=set(NAMES): raise ValueError("nodes must contain exactly: "+", ".join(NAMES))
for n in NAMES:
valid_host(nodes[n]["host"]);valid_host(nodes[n].get("ssh_host",nodes[n]["host"]))
p=nodes[n]["port"]
if not isinstance(p,int) or not 1<=p<=65535: raise ValueError("Invalid port: "+n)
ssh_user=cfg.get("ssh_user","root")
if not re.fullmatch(r"[a-z_][a-z0-9_-]*",ssh_user): raise ValueError("Invalid ssh_user")
ssh_port=cfg.get("ssh_port",22)
if not isinstance(ssh_port,int) or not 1<=ssh_port<=65535: raise ValueError("Invalid ssh_port")
secret_path=pathlib.Path(args.secret_file)
if not secret_path.exists():
secret_path.parent.mkdir(parents=True,exist_ok=True)
secret_path.write_text(secrets.token_hex(32)+"\n")
secret_path.chmod(0o600)
secret=secret_path.read_text().strip()
if not re.fullmatch(r"[a-fA-F0-9]{64}",secret): raise ValueError("Invalid forwarding secret")
out=pathlib.Path(args.output)
out.mkdir(parents=True,exist_ok=True)
(out/"proxy").mkdir(exist_ok=True)
lines=['config-version = "2.7"','bind = "0.0.0.0:'+str(nodes["proxy"]["port"])+'"',
'motd = "<gold>DuneRealms <gray>| Vaerkring"','show-max-players = 100',
'online-mode = true','player-info-forwarding-mode = "modern"',
'forwarding-secret-file = "forwarding.secret"','[servers]']
for name in BACKENDS:
lines.append(' "'+name+'" = "'+nodes[name]["host"]+':'+str(nodes[name]["port"])+'"')
lines.extend(['try = ["spacing-guild"]','[advanced]','bungee-plugin-message-channel = true'])
(out/"proxy"/"velocity.toml").write_text("\n".join(lines)+"\n")
(out/"proxy"/"forwarding.secret").write_text(secret+"\n")
(out/"proxy"/"forwarding.secret").chmod(0o600)
for name in BACKENDS:
dest=out/name
dest.mkdir(exist_ok=True)
(dest/"server.properties.patch").write_text("server-ip="+nodes[name]["host"]+"\nserver-port="+str(nodes[name]["port"])+"\n")
(dest/"paper-global.yml.patch").write_text("proxies:\n velocity:\n enabled: true\n online-mode: true\n secret: '"+secret+"'\n")
print("Rendered configs in",out)
if not args.deploy: return
for name in NAMES:
node=nodes[name]
target=ssh_user+"@"+node.get("ssh_host",node["host"])
ssh=["ssh","-p",str(ssh_port),"-o","BatchMode=yes",target]
scp=["scp","-P",str(ssh_port),"-o","BatchMode=yes"]
# Stage files in /tmp and install as root; avoid requiring direct root SCP.
if name=="proxy":
for filename in ("velocity.toml","forwarding.secret"):
run(scp+[str(out/"proxy"/filename),target+":/tmp/dune-"+filename])
remote=("sudo install -m 600 /tmp/dune-forwarding.secret "+ROOT+"/proxy/forwarding.secret && "
"sudo install -m 644 /tmp/dune-velocity.toml "+ROOT+"/proxy/velocity.toml && "
"rm -f /tmp/dune-forwarding.secret /tmp/dune-velocity.toml && sudo systemctl restart dune-proxy")
else:
for filename in ("server.properties.patch","paper-global.yml.patch"):
run(scp+[str(out/name/filename),target+":/tmp/dune-"+filename])
# Edit existing server.properties and Paper YAML; do not overwrite full Paper config.
# A Python helper is transferred to make YAML block replacement deterministic.
helper=pathlib.Path(__file__).with_name("apply-node-local.py")
run(scp+[str(helper),target+":/tmp/dune-apply-node-local.py"])
remote=("sudo python3 /tmp/dune-apply-node-local.py "+ROOT+"/servers/"+name+
" /tmp/dune-server.properties.patch /tmp/dune-paper-global.yml.patch && "
"rm -f /tmp/dune-server.properties.patch /tmp/dune-paper-global.yml.patch /tmp/dune-apply-node-local.py && "
"sudo systemctl restart dune-"+name)
run(ssh+[remote])
print("Updated",name)
if __name__=="__main__":
try: main()
except (ValueError,KeyError,subprocess.CalledProcessError) as e:
print("ERROR:",e,file=sys.stderr);sys.exit(1)

View file

@ -1,20 +0,0 @@
#!/usr/bin/env python3
"""Update node config while preserving unrelated Paper configuration."""
import pathlib,sys,re
base=pathlib.Path(sys.argv[1])
props=base/"server.properties"
updates=dict(line.strip().split("=",1) for line in pathlib.Path(sys.argv[2]).read_text().splitlines() if "=" in line)
text=props.read_text()
for k,v in updates.items():
if re.search(r"^"+re.escape(k)+r"=.*$",text,re.M): text=re.sub(r"^"+re.escape(k)+r"=.*$",lambda _:k+"="+v,text,flags=re.M)
else: text+="\n"+k+"="+v+"\n"
props.write_text(text)
paper=base/"config/paper-global.yml"
secret=pathlib.Path(sys.argv[3]).read_text().split("secret: ",1)[1].strip().strip("'")
s=paper.read_text()
# Replace only proxies.velocity block when it exists; preserve rest of global config.
block="proxies:\n velocity:\n enabled: true\n online-mode: true\n secret: '"+secret+"'\n"
if re.search(r"(?m)^proxies:\s*$",s):
s=re.sub(r"(?ms)^proxies:\n(?:(?!^[^ #\s]).*\n)*",block,s,count=1)
else: s+="\n"+block
paper.write_text(s)

View file

@ -1,19 +0,0 @@
# Separate Arrakis backend — 19 October 2026
Arrakis has its own Paper directory `/opt/dunerealms/servers/arrakis`, separate from `/opt/dunerealms/lobby`. Service: `dune-arrakis`; Java 21, Paper 1.21.4 build 232, localhost TCP 25566, 256–1536 MB Java heap. The lobby remains on localhost TCP 25571 with 256–768 MB heap so both can run on the existing 4 GB VM. This is a temporary two-backend test layout, not the five-planet production deployment.
Installed Arrakis plugins: DuneCore 1.0.10, DuneTerrain 1.0.7, DuneEss 1.0.2, DuneNPC 1.0.0, Vault 2.5.0 and ViaVersion 5.12.1. No DuneLobby or ImageFrame is installed on Arrakis. No lobby world is copied into the Arrakis directory.
The primary world is named `arrakis`. `bukkit.yml` registers both generator and biome provider as `DuneTerrain:arrakis`, and DuneTerrain selects `server.planet: arrakis`. This creates actual saved Minecraft terrain. Further terrain generates normally as players explore; this is not a claim that an infinite world has been fully pregenerated.
Velocity uses modern forwarding with the existing private secret. Both backend ports stay private. Its temporary server order is `try = ["arrakis", "spacing-guild"]`, so the existing public Java/Bedrock entry leads to Arrakis first with the lobby as fallback. The website monitor has a systemd environment override mapping Arrakis to localhost:25566.
Before changes, the proxy config and lobby launch wrapper were preserved under `/opt/dunerealms/backups/20261019-arrakis/`. To return to lobby-first routing, set the proxy order to `["spacing-guild", "arrakis"]` and restart only Velocity. Preserve the separate Arrakis directory and world when switching routes.
Console input: `printf 'list\n' > /opt/dunerealms/servers/arrakis/console.fifo`. Live logs: `journalctl -f -u dune-arrakis -u dune-lobby -u dune-proxy`. Do not publish forwarding secrets or player data in Git.
Shared PostgreSQL and the live website exchange bridge remain unconfigured. The default local economy is for this single Arrakis test; do not treat it as a completed multi-server economy. The exchange refuses real trades without its shared database.
The first start successfully loaded DuneTerrain's generator and a console biome test at 0/80/0 passed for `minecraft:desert`. A subsequent bulk force-load of a 16x16-chunk area exceeded the watchdog budget. The server saved its chunks before stopping; its forced-chunk data was preserved in the backup directory and removed from active use before restarting. Avoid bulk synchronous `/forceload` pregeneration on this VM. Region headers recorded 1,721 saved chunk entries, including intermediate generation states; this is not a count of fully pregenerated playable chunks.
Recovery verification passed: the existing Arrakis world loaded in 6.5 seconds, all six plugins enabled, the desert biome test passed again, `/forceload query` reported no forced chunks, and `save-all flush` completed. Both Paper ports bind only to localhost and both returned Minecraft status responses through the monitor. Velocity restarted successfully with Arrakis first. The lobby remained active and restored its artwork. Final memory check showed approximately 560 MB available and 40 MB swap in use; no real-player Arrakis walkthrough has yet been claimed.

View file

@ -1,41 +0,0 @@
"""Switch Core only; preserve the legacy LuckPerms/CoreProtect tunnel on 13307."""
import pathlib,subprocess,yaml,json,re,urllib.parse,os,pwd
ROOT=pathlib.Path('/opt/dunerealms/servers')
NAMES=['arrakis','caladan','giedi_prime','kaitain','sigma_draconis_iv']
def run(*args):return subprocess.run(args,check=True,text=True,capture_output=True).stdout.strip()
def main():
for name in NAMES:
state=subprocess.run(['systemctl','is-active','dune-'+name+'.service'],capture_output=True,text=True).stdout.strip()
if state not in ('inactive','failed'):raise RuntimeError('Stop all planet writers first: '+name)
staging=pathlib.Path('/root/dune-db-reconcile');central=yaml.safe_load((staging/'central-core.yml').read_text())['database']
uri=urllib.parse.urlparse(re.sub('^jdbc:','',central['jdbc-url']))
assert uri.hostname=='127.0.0.1' and uri.port==13308 and uri.path=='/dunegameplay'
target={k:central[k] for k in ['jdbc-url','username','password']}
if 'useServerPrepStmts=' not in target['jdbc-url']:target['jdbc-url']+='&useServerPrepStmts=true'
old_tunnel=run('systemctl','cat','dune-db-tunnel.service')
assert 'dunegamedb@162.55.87.104' in old_tunnel and 'dev@91.107.196.242' not in old_tunnel,'Legacy plugin database routing must remain unchanged'
unit=pathlib.Path('/etc/systemd/system/dune-gameplay-db-tunnel.service')
assert not unit.exists(),'Inspect the existing central tunnel before retrying'
patches=[]
for name in NAMES:
path=ROOT/name/'plugins/DuneCore/config.yml';assert path.is_file() and not path.is_symlink()
original=path.read_text();config=yaml.safe_load(original);assert ':13307/dunegameplay' in config['database']['jdbc-url']
ess=yaml.safe_load((ROOT/name/'plugins/DuneEss/config.yml').read_text())
if not ess.get('database',{}).get('use-core-database',True):raise ValueError('DuneEss must use Core storage: '+name)
changed=original
for k,v in target.items():
pattern=r'(?m)^( '+re.escape(k)+r':)\s*[^\n]*$'
changed,n=re.subn(pattern,lambda m:m[1]+' '+json.dumps(v),changed);assert n==1,(name,k)
parsed=yaml.safe_load(changed);expected=json.loads(json.dumps(config));expected['database'].update(target);assert parsed==expected
patches.append((name,path,original,changed))
# Keep one exact recovery copy privately; never restore it automatically.
uid=pwd.getpwnam('dune')
for name,path,original,changed in patches:
recovery=staging/(name+'-core-before.yml')
if recovery.exists():raise ValueError('This migration was already staged; inspect before retrying')
recovery.write_text(original);recovery.chmod(0o600)
tmp=path.with_name('config.yml.central-stage');tmp.write_text(changed);os.chown(tmp,uid.pw_uid,uid.pw_gid);tmp.chmod(path.stat().st_mode&0o777);tmp.replace(path)
unit.write_text('[Unit]\nDescription=Central DuneRealms shared game storage\nAfter=network-online.target\nWants=network-online.target\n[Service]\nExecStart=/usr/bin/ssh -NT -i /root/.ssh/dune-db-tunnel -o BatchMode=yes -o ExitOnForwardFailure=yes -o ServerAliveInterval=20 -o ServerAliveCountMax=3 -o StrictHostKeyChecking=yes -o UserKnownHostsFile=/root/.ssh/dune-central-known-hosts -L 127.0.0.1:13308:127.0.0.1:3306 dev@91.107.196.242\nRestart=always\nRestartSec=5\n[Install]\nWantedBy=multi-user.target\n')
run('systemctl','daemon-reload');run('systemctl','enable','--now','dune-gameplay-db-tunnel.service')
print(json.dumps({'configured':NAMES,'database':'central:13308','otherPluginStorage':'original:13307','pluginJars':'unchanged'}))
if __name__=='__main__':main()

View file

@ -0,0 +1,139 @@
{
"guild": {
"name": "Vaerkring",
"feel": "Neutral, handcrafted materials at the Spacing Guild port",
"aliases": [
"guild_lobby"
],
"blocks": {}
},
"arrakis": {
"name": "Arrakduin",
"feel": "Warm desert rock, eroded masonry and dry timber",
"aliases": [
"arrakis",
"arrakduin"
],
"blocks": {
"stone": "granite",
"andesite": "granite",
"cobblestone": "sandstone",
"stone_bricks": "cut_sandstone",
"mossy_stone_bricks": "sandstone",
"mossy_cobblestone": "sandstone",
"dirt": "coarse_dirt",
"oak_planks": "acacia_planks",
"deepslate": "basalt_side",
"cobbled_deepslate": "blackstone"
}
},
"caladan": {
"name": "Kaladam",
"feel": "Wet coastal rock, jungle earth and mossy ruins",
"aliases": [
"caladan",
"kaladam"
],
"blocks": {
"stone": "andesite",
"cobblestone": "mossy_cobblestone",
"stone_bricks": "mossy_stone_bricks",
"dirt": "coarse_dirt",
"oak_planks": "spruce_planks",
"deepslate": "blackstone",
"cobbled_deepslate": "mossy_cobblestone"
}
},
"giedi_prime": {
"name": "Giedermark",
"feel": "Soot-dark industrial masonry, basalt and heavy timber",
"aliases": [
"giedi_prime",
"giedermark"
],
"blocks": {
"stone": "blackstone",
"andesite": "basalt_side",
"diorite": "basalt_top",
"granite": "polished_blackstone_bricks",
"cobblestone": "blackstone",
"stone_bricks": "polished_blackstone_bricks",
"mossy_stone_bricks": "cracked_polished_blackstone_bricks",
"mossy_cobblestone": "blackstone",
"dirt": "coarse_dirt",
"oak_planks": "dark_oak_planks",
"deepslate": "basalt_side",
"cobbled_deepslate": "blackstone",
"polished_deepslate": "polished_blackstone"
}
},
"kaitain": {
"name": "Kaiterhof",
"feel": "Pale imperial stone, orderly masonry and light court timber",
"aliases": [
"kaitain",
"kaiterhof"
],
"blocks": {
"stone": "polished_diorite",
"andesite": "polished_andesite",
"cobblestone": "stone_bricks",
"stone_bricks": "quartz_block_side",
"mossy_stone_bricks": "quartz_block_side",
"mossy_cobblestone": "stone_bricks",
"oak_planks": "birch_planks",
"deepslate": "polished_andesite",
"cobbled_deepslate": "stone_bricks"
}
},
"sigma_draconis_iv": {
"name": "Sigmadraken IV",
"feel": "Cold grey rock, snow, ice and dark northern timber",
"aliases": [
"sigma_draconis_iv",
"sigmadraken_iv",
"sigmadraken iv"
],
"blocks": {
"stone": "stone",
"andesite": "diorite",
"cobblestone": "andesite",
"stone_bricks": "polished_andesite",
"dirt": "gravel",
"oak_planks": "spruce_planks",
"deepslate": "basalt_side",
"cobbled_deepslate": "blackstone",
"polished_deepslate": "basalt_top"
}
},
"giedi_prime_nether": {
"name": "Giedermark Nether",
"feel": "Industrial darkness, soot-black stone and ominous molten foundries",
"aliases": [
"giedi_prime_nether",
"giedermark_nether"
],
"blocks": {
"netherrack": "blackstone",
"nether_bricks": "polished_blackstone_bricks",
"red_nether_bricks": "cracked_polished_blackstone_bricks",
"nether_gold_ore": "gilded_blackstone",
"basalt_top": "blackstone_top",
"smooth_basalt": "blackstone",
"soul_soil": "coarse_dirt"
}
},
"sigma_draconis_iv_the_end": {
"name": "Sigmadraken IV End",
"feel": "Cold alien stone, pale End islands and muted violet ruins",
"aliases": [
"sigma_draconis_iv_the_end",
"sigmadraken_iv_the_end",
"sigmadraken_iv_end"
],
"blocks": {
"end_stone": "diorite",
"end_stone_bricks": "polished_diorite"
}
}
}

View file

@ -1,89 +0,0 @@
# DuneRealms shared PostgreSQL setup
This is a fresh database deployment template. It does not modify a running host until you run it. Existing PostgreSQL installations should keep their current database and credentials; only install the updated plugin and additive migrations. Back up SQL and backend player data before upgrading, and stop all backends during the change.
## Fresh install
Install Docker Engine and the Compose plugin on the database host. Run:
```bash
cd network/database
./setup.sh
```
The script creates a private `.env` with two independently generated passwords and starts PostgreSQL 17. The `dune_admin` account is the container administrator. The `dune` application account can create its tables in the public schema but is not a superuser. The database volume persists across restarts. Never use `docker compose down -v` on an installation with player data. Changing `.env` passwords after initialization does not rotate existing PostgreSQL role passwords.
The listener binds to localhost by default. If Paper backends run on different machines, set `DB_BIND_IP` in `.env` to the database host's private network IP, then rerun `./setup.sh`. Permit TCP 5432 from backend private IPs only in the host/Hetzner firewall. Use the database host's private IP in each JDBC URL. Do not use a public listener. For traffic outside a trusted private network, configure PostgreSQL TLS and a trusted certificate before using `sslmode=verify-full`.
## Configure every backend before starting it
Use the same existing configuration keys in `plugins/DuneCore/config.yml` on every planetary backend. Copy the `DUNE_PASSWORD` value from the database host's `.env`; do not use the administrator password.
```yaml
database:
enabled: true
autosave-seconds: 60
jdbc-url: "jdbc:postgresql://DATABASE_PRIVATE_IP:5432/dunerealms"
username: "dune"
password: "YOUR_GENERATED_DUNE_PASSWORD"
```
In `plugins/DuneEss/config.yml`, keep:
```yaml
database:
use-core-database: true
```
DuneEss starts before Core and reads Core's file directly. Create/configure that file before the first network startup. Check that Essentials reports a working shared economy; configured shared mode now refuses network payments during an outage instead of falling back to a local wallet. Wallet deposits and withdrawals use atomic SQL arithmetic so they cannot overwrite concurrent exchange payments. The older `dune_players.solaris` column is legacy data; current wallets live in `dune_economy_balances`. Inventory saves do not overwrite wallets.
Core creates missing tables and adds missing player columns automatically, under a transaction-scoped schema lock. It preserves existing profile rows, inventory blobs, economy tables, and politics. No manual inventory schema import is required. Use one dedicated database for this network.
## Shared inventory behavior
- Shares main inventory, hotbar, armor, offhand, selected hotbar slot, faction, XP level/progress/total.
- Uses the existing Bukkit item serialization and retains compatibility with stored inventory blobs. Verify custom item metadata on staging with your actual plugins.
- First shared login adopts that backend's local inventory when no shared inventory exists. It does not merge items from other backend player files. Choose the authoritative first-login backend and archive other backend inventories before migration. Null legacy XP columns adopt the first upgraded backend's values.
- Saves every configured interval (minimum 10 seconds), on quit/server switch, and on orderly shutdown. Final saves close open inventories to return cursor/crafting items.
- A dedicated PostgreSQL session lock admits one backend per UUID. A fast transfer arriving before the source finishes saving is rejected; reconnect after the source quits. There is no automatic proxy retry in this change.
- A failed load cannot save local stale inventory back into SQL. An unclean session remains marked open in SQL even after its connection dies; login is blocked until an administrator reconciles it.
- SQL save failures attempt a timestamped local `plugins/DuneCore/inventory-recovery/UUID-*.yml` snapshot. These files are evidence for manual recovery, never automatically replayed. A hard process/machine crash may leave no such file.
- Autosaving restores temporarily hidden Ordos armor before capturing it; a save can shorten Shadow Step's hidden-armor period. The invisibility effect retains its existing timer.
- Ender chests, positions, beds, health, hunger, effects, advancements, statistics and arbitrary plugin player tags are not synchronized. All backends must use compatible Paper/plugin/item versions and identical authenticated player UUIDs through Velocity/Floodgate.
Do not run another inventory synchronization plugin on these same backends. This code is part of DuneCore. Only the five configured planetary identifiers opt into shared profiles; lobby and spacing_guild are excluded even if Core is installed. Keep network.local-planet correct on every backend. The lobby keeps its own inventory. Ender chests are never read, written, synchronized or exposed in account snapshots by this code; each planetary backend retains its local ender chest. Do not add an external ender chest sync plugin.
## Recovery after an unclean session
Never clear `session_open` as a routine login fix. A crash can leave the last SQL checkpoint older than item trades, drops or container changes. Automatically restoring that checkpoint would risk duplicating or losing items.
1. Keep the affected player disconnected everywhere. Stop the affected backends; for recovery during an outage, stop all planetary backends.
2. Back up SQL, backend player data and all `inventory-recovery` files.
3. Inspect the affected `dune_players` row and compare checkpoint data with local recovery/player data and any trades/container changes. Reconcile items explicitly. Recovery snapshots contain Base64 Bukkit item arrays; interpret them with this plugin on the same compatible Paper version. Do not concatenate blobs or merge inventories blindly.
4. Only after reconciling and choosing the authoritative checkpoint, use an administrator SQL session to clear the marker for that single UUID:
```sql
BEGIN;
SELECT uuid,faction,session_open FROM dune_players
WHERE uuid='REPLACE-WITH-PLAYER-UUID' FOR UPDATE;
UPDATE dune_players SET session_open=FALSE
WHERE uuid='REPLACE-WITH-PLAYER-UUID';
COMMIT;
```
5. Start the backends, reconnect the player and verify all slots, XP and wallet. Archive the incident and recovery files. Never clear markers for all players at once.
## Capacity, backups and verification
Inventory I/O follows this plugin's existing synchronous server-thread model with connection/socket timeouts. Each active planetary player holds one direct PostgreSQL connection plus short-lived economy/politics connections. Size `max_connections`, memory and backend player caps together; do not use PgBouncer transaction pooling for these session locks. Measure login and autosave tick times before increasing player limits. Java 21 and Paper 1.21.8 are the repository's pinned target, not an unverified newer release.
Example backup from this directory (shell creates the backup on the host):
```bash
umask 077
docker compose exec -T postgres pg_dump -U dune_admin -d dunerealms -Fc > dunerealms-backup.dump
```
Test restores on a separate database. Keep backups outside the Docker volume and off the host.
Staging acceptance: transfer between two distinct planetary backends with tagged spice, named/enchanted/PDC items, armor, offhand and XP; confirm different local ender contents remain different; verify exact quantities and metadata. Try duplicate connections, fast transfer, database loss during login and quit, and a forced backend crash. Confirm rejected/unclean sessions cannot overwrite SQL. Verify Java, Bedrock/Floodgate and ViaVersion clients. Production deployment is pending this live validation.

View file

@ -1,21 +0,0 @@
services:
postgres:
image: postgres:17
restart: unless-stopped
environment:
POSTGRES_DB: dunerealms
POSTGRES_USER: dune_admin
POSTGRES_PASSWORD: ${POSTGRES_ADMIN_PASSWORD:?Run setup.sh first}
DUNE_PASSWORD: ${DUNE_PASSWORD:?Run setup.sh first}
ports:
- "${DB_BIND_IP:-127.0.0.1}:5432:5432"
volumes:
- dune_postgres:/var/lib/postgresql/data
- ./init-app-user.sh:/docker-entrypoint-initdb.d/10-app-user.sh:ro
healthcheck:
test: ["CMD-SHELL", "pg_isready -U dune_admin -d dunerealms"]
interval: 10s
timeout: 5s
retries: 6
volumes:
dune_postgres:

View file

@ -1,8 +0,0 @@
#!/usr/bin/env bash
set -euo pipefail
psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" <<'SQL'
\getenv app_password DUNE_PASSWORD
CREATE ROLE dune LOGIN PASSWORD :'app_password';
GRANT CONNECT ON DATABASE dunerealms TO dune;
GRANT USAGE, CREATE ON SCHEMA public TO dune;
SQL

View file

@ -1,16 +0,0 @@
#!/usr/bin/env bash
set -euo pipefail
cd -- "$(dirname -- "${BASH_SOURCE[0]}")"
command -v docker >/dev/null || { echo 'Install Docker Engine with the Compose plugin first.' >&2; exit 1; }
docker compose version >/dev/null
umask 077
if [[ ! -e .env ]]; then
command -v openssl >/dev/null
{
printf 'POSTGRES_ADMIN_PASSWORD=%s\n' "$(openssl rand -hex 32)"
printf 'DUNE_PASSWORD=%s\n' "$(openssl rand -hex 32)"
printf 'DB_BIND_IP=127.0.0.1\n'
} > .env
fi
docker compose up -d --wait
printf '\nDatabase ready. Configure every backend using the dune password in this directory/.env.\nSee README.md for network binding, migration, backups and recovery.\n'

View file

@ -1,65 +0,0 @@
#!/usr/bin/env bash
set -Eeuo pipefail
# Usage: sudo bash deploy-network.sh /path/to/DuneRealms-Velocity-Network.zip
[[ $EUID -eq 0 ]] || { echo "Run as root"; exit 1; }
ZIP="${1:?Provide network ZIP path}"
BASE=/opt/dunerealms
[[ -f "$ZIP" ]] || { echo "Missing ZIP: $ZIP"; exit 1; }
command -v java >/dev/null || { echo "Install Java 21 first"; exit 1; }
install -d -o dune -g dune "$BASE"
unzip -o "$ZIP" -d "$BASE"
ROOT="$BASE/DuneRealms-Velocity-Network"
[[ -d "$ROOT/servers/spacing-guild" ]] || { echo "Unexpected ZIP layout"; exit 1; }
# Download official Paper builds from PaperMC downloads API.
get_paper() {
local version=1.21.4
local json build url
json="$(curl -fsSL "https://fill.papermc.io/v3/projects/paper/versions/$version/builds")"
url="$(printf '%s' "$json" | jq -r '[.[] | select(.channel == "STABLE") | .downloads."server:default".url] | first // empty')"
[[ -n "$url" ]] || { echo "No stable Paper build found for $version"; return 1; }
curl -fL "$url" -o "$ROOT/paper.jar"
}
get_velocity() {
local json url
json="$(curl -fsSL 'https://fill.papermc.io/v3/projects/velocity/versions/3.4.0-SNAPSHOT/builds')"
url="$(printf '%s' "$json" | jq -r '[.[] | select(.channel == "STABLE") | .downloads."server:default".url] | first // empty')"
[[ -n "$url" ]] || { echo "No stable Velocity build found; install proxy jar manually"; return 1; }
curl -fL "$url" -o "$ROOT/proxy/velocity.jar"
}
get_paper
# Velocity download failure does not silently start an incomplete proxy.
get_velocity
for dir in "$ROOT"/servers/*; do
[[ -d "$dir" ]] || continue
ln -sfn ../../paper.jar "$dir/paper.jar"
done
chown -R dune:dune "$BASE"
create_unit() {
local name="$1" dir="$2" jar="$3" memory="$4"
cat >"/etc/systemd/system/dune-${name}.service" <<EOF
[Unit]
Description=DuneRealms ${name}
After=network-online.target
Wants=network-online.target
[Service]
Type=simple
User=dune
Group=dune
WorkingDirectory=${dir}
ExecStart=/usr/bin/java -Xms512M -Xmx${memory} -jar ${jar} nogui
Restart=on-failure
RestartSec=10
LimitNOFILE=65535
NoNewPrivileges=true
[Install]
WantedBy=multi-user.target
EOF
}
create_unit proxy "$ROOT/proxy" velocity.jar 512M
for name in arrakis giedi-prime kaitain caladan sigma-draconis-iv spacing-guild; do
create_unit "$name" "$ROOT/servers/$name" paper.jar 2G
done
systemctl daemon-reload
echo "Installed units: dune-proxy and dune-{arrakis,giedi-prime,kaitain,caladan,sigma-draconis-iv,spacing-guild}"
echo "Review eula.txt on every backend; accept only after reading the EULA."
echo "After configuring firewall and accepting EULA, run: systemctl enable --now dune-proxy dune-arrakis dune-giedi-prime dune-kaitain dune-caladan dune-sigma-draconis-iv dune-spacing-guild"

View file

@ -1,55 +0,0 @@
#!/usr/bin/env bash
set -Eeuo pipefail
# Deploy one node of a DuneRealms Velocity network on Debian.
# Usage: sudo bash network/deploy-node.sh /path/to/DuneRealms-Velocity-Network.zip <proxy|spacing-guild|arrakis|giedi-prime|kaitain|caladan|sigma-draconis-iv> [private-bind-ip]
# On a single VM use deploy-network.sh instead.
[[ $EUID -eq 0 ]] || { echo "Run with sudo"; exit 1; }
ZIP="${1:?ZIP required}"
NODE="${2:?node name required}"
IP="${3:-127.0.0.1}"
case "$NODE" in proxy|spacing-guild|arrakis|giedi-prime|kaitain|caladan|sigma-draconis-iv) ;; *) echo "Unknown node"; exit 1;; esac
[[ -f "$ZIP" ]] || { echo "ZIP not found"; exit 1; }
id dune >/dev/null 2>&1 || useradd --system --create-home --home-dir /opt/dunerealms --shell /usr/sbin/nologin dune
BASE=/opt/dunerealms
mkdir -p "$BASE"
TEMP="$(mktemp -d)"
trap 'rm -rf "$TEMP"' EXIT
unzip -q "$ZIP" -d "$TEMP"
SRC="$TEMP/DuneRealms-Velocity-Network"
[[ -d "$SRC/servers/spacing-guild" ]] || { echo "Wrong ZIP layout"; exit 1; }
if [[ "$NODE" == proxy ]]; then
mkdir -p "$BASE/proxy"
cp -a "$SRC/proxy/." "$BASE/proxy/"
echo "IMPORTANT: Edit $BASE/proxy/velocity.toml to point each backend to its private VM IP."
echo "IMPORTANT: Distribute $BASE/proxy/forwarding.secret to each backend's Paper proxy config."
DIR="$BASE/proxy"; JAR=velocity.jar; MEM=512M
else
mkdir -p "$BASE/servers/$NODE"
cp -a "$SRC/servers/$NODE/." "$BASE/servers/$NODE/"
sed -i "s/^server-ip=.*/server-ip=$IP/" "$BASE/servers/$NODE/server.properties"
echo "IMPORTANT: Set Paper Velocity forwarding secret to match proxy's forwarding.secret."
DIR="$BASE/servers/$NODE"; JAR=paper.jar; MEM=2G
fi
cat >"/etc/systemd/system/dune-$NODE.service" <<EOF
[Unit]
Description=DuneRealms $NODE
After=network-online.target
Wants=network-online.target
[Service]
Type=simple
User=dune
Group=dune
WorkingDirectory=$DIR
ExecStart=/usr/bin/java -Xms512M -Xmx$MEM -jar $JAR nogui
Restart=on-failure
RestartSec=10
LimitNOFILE=65535
NoNewPrivileges=true
[Install]
WantedBy=multi-user.target
EOF
chown -R dune:dune "$BASE"
systemctl daemon-reload
echo "Prepared dune-$NODE service; server jar must be installed in $DIR/$JAR."
echo "Review Minecraft EULA and set eula=true on Paper servers after accepting it."
echo "Do not start until jar, forwarding secret and private IP settings are correct."

View file

@ -1,26 +0,0 @@
import pathlib,re,json,os,stat,time,sys
mode=sys.argv[1];names=['lobby'] if mode=='lobby' else ['arrakis','caladan','giedi_prime','kaitain','sigma_draconis_iv']
sections={'revert_on_unclaim','wild_revert_on_mob_explosion','wild_revert_on_block_explosion'}
for name in names:
base=pathlib.Path('/opt/dunerealms/lobby' if mode=='lobby' else '/opt/dunerealms/servers/'+name);p=base/'plugins/Towny/settings/config.yml';text=p.read_text();out=[];stack=[];found=set()
for line in text.splitlines(keepends=True):
m=re.match(r'^( *)([a-zA-Z0-9_-]+):\s*(.*?)(\r?\n)?$',line)
if m:
indent=len(m[1]);key=m[2];value=m[3]
while stack and stack[-1][0]>=indent:stack.pop()
path=[k for _,k in stack]+[key]
if len(path)==4 and path[:2]==['new_world_settings','plot_management'] and path[2] in sections and key=='enabled':
line=m[1]+key+": 'false'\n";found.add(path[2])
if not value or value.startswith('#'):stack.append((indent,key))
out.append(line)
assert found==sections,(name,found);p.write_text(''.join(out))
worlds=list((base/'plugins/Towny/data/worlds').glob('*.txt'));commands=['townyadmin reload config']
for world in worlds:
assert re.fullmatch('[a-zA-Z0-9_-]+',world.stem)
for feature in ['revertunclaim','revertentityexpl','revertblockexpl']:commands.append('townyworld '+world.stem+' toggle '+feature+' off')
fifo=base/'console.fifo';fd=os.open(fifo,os.O_WRONLY|os.O_NONBLOCK|os.O_NOFOLLOW);assert stat.S_ISFIFO(os.fstat(fd).st_mode)
try:
for cmd in commands:
data=(cmd+'\n').encode();assert os.write(fd,data)==len(data);time.sleep(0.15)
finally:os.close(fd)
print(json.dumps({'server':name,'futureWorldDefaults':'off','worlds':[w.stem for w in worlds],'commandsSent':len(commands)}),flush=True)

View file

@ -1,13 +0,0 @@
# DuneRealms Forgejo
Installed 18 October 2026 under the existing `dunerealms` hosting user. Public URL: https://www.dunerealms.com/git/. Forgejo 17.0.0 official amd64 binary was checked against its SHA256 and verified with the official release-signing key fingerprint EB114F5E6C0DC2BCDD183550A4B61A2DC5923710.
The installation lives in `/home/dunerealms/apps/forgejo`: binary in `bin/`, SQLite database in `data/`, bare Git repositories in `repositories/`, and private configuration in `custom/conf/app.ini`. No credentials, signing keys or database are stored in this source repository. Administrator username is `unimatrix`; public registration is disabled. Email delivery and Actions runners are not configured. Git transport is HTTPS; Forgejo SSH and LFS are disabled in this initial installation.
Forgejo binds to localhost:3001. The website's Node host streams `/git/` to that service, preserving Git requests and Forgejo cookies without exposing website session cookies or accepting forged reverse-proxy identity headers. Ordinary website requests retain their bounded body limit. The public Nginx Vhost redirects apex and www1 requests to `https://www.dunerealms.com$request_uri`; www is the serving hostname. The website's private environment sets `PUBLIC_ORIGIN=https://www.dunerealms.com` and `FORGEJO_URL=http://127.0.0.1:3001`. Forgejo config uses `DOMAIN=www.dunerealms.com` and `ROOT_URL=https://www.dunerealms.com/git/`.
PM2 manages `forgejo` and `dunerealms-web` as the site user, with the saved process list restored by its existing reboot entry. Website release is `20261018-forgejo`, cloned from the working status-panel release. The previous release is preserved. Back up the entire Forgejo directory, including its SQLite database and private config, consistently while Forgejo is stopped or with the supported Forgejo backup tooling.
The owner explicitly requested public copies of both private GitHub repositories under the Forgejo account. `MC` was imported with its complete history and four branches; `A3` was empty on GitHub and is an empty repository here as well. GitHub visibility was not changed. These are independent copies, not automatically scheduled mirrors.
Verification: public HTTPS pages, anonymous repository listing and Git ref advertisements worked; MC branch hashes matched the source. The proxy test covers a Git payload above the website's normal body limit, subpath routing, auth forwarding and separation from website cookies/identity headers. Website health and the live world-status API remained available after the canonical hostname change.

Some files were not shown because too many files have changed in this diff Show more