Files
ulicraft-server-v1/plan/06-launcher.md
Oier Bravo Urtasun 67d1f82e6a refactor!: unify into one compose, drop airgap/mirror/dnsmasq/avahi/blessingskin
Collapse the override-file matrix into a single docker-compose.yml holding the
whole stack: drasl, minecraft, mc-backup, caddy, nmsr, uptime-kuma. Bring-up is
now just `docker compose up -d --build`.

Removed features (dead-ends for this deployment):
- airgap / full asset mirror (mirror-airgap.sh, mirror-mods.sh, 20-mirror.caddy,
  caddy local-CA export, /ca.crt)
- dnsmasq + avahi/mDNS + dns-records.sh + mdns-host-setup.sh + ENABLE_MDNS;
  DNS is now handled outside this repo (HOST_LAN_IP dropped)
- Blessing Skin auth variant (compose + 00-core-blessingskin.caddy + BS_* env)
- host-nginx-static variant (docker-compose.nginx.yml, nginx/ulicraft.conf.tmpl)
- build-stack.sh and its run modes (online/airgap/core)

Production ingress is the only path now: host nginx terminates TLS (LE certs)
in front of caddy on a localhost-only port; caddy routes every vhost by Host
header. Launcher downloads move mirror/launcher -> launcher/.

Docs: README, deploy skill, and plan/ rewritten to match; obsolete plan docs
(dnsmasq, blessing-skin, assets-mirror, full-airgap-mirror, dns-and-run-modes)
deleted.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-09 02:14:09 +02:00

98 lines
3.8 KiB
Markdown

# Launcher — FjordLauncherUnlocked distribution
## Summary
Guests use **FjordLauncherUnlocked** (`hero-persson/FjordLauncherUnlocked`) — a
Prism/PolyMC fork with **authlib-injector support built in**. So guests add their
drasl account directly in the launcher (no manual JVM `-javaagent`), import the
modpack, and play.
We host the launcher installers for **all platforms** on the landing page
(`ulicraft.net`), served by Caddy from `./launcher/` (mounted at `/srv/launcher`,
reachable at `/launcher/`). A script downloads the release assets ahead of time.
## Release assets (latest = 11.0.2.0)
Every platform variant is published as a GitHub release asset:
- **Windows**: MSVC + MinGW, each as `.zip`, `Portable .zip`, `Setup .exe`; x64 + arm64
- **macOS**: `.dmg`, `.zip`
- **Linux**: `.AppImage` (x86_64, aarch64) + `.zsync`, portable `.tar.gz` (Qt6)
The fetch script grabs **all** assets via the GitHub API (loops
`browser_download_url`). The landing page highlights the common three: Windows
Setup `.exe`, macOS `.dmg`, Linux `.AppImage`.
## tooling/fetch-launcher.sh
```bash
#!/usr/bin/env bash
# Download all FjordLauncherUnlocked release assets for local hosting.
# Halts on any error or ambiguity (no silent partial downloads).
set -euo pipefail
REPO="hero-persson/FjordLauncherUnlocked"
DEST_ROOT="$(dirname "$0")/../launcher"
API="https://api.github.com/repos/${REPO}/releases/latest"
command -v curl >/dev/null || { echo "curl required"; exit 1; }
command -v jq >/dev/null || { echo "jq required"; exit 1; }
meta="$(curl -fsSL "$API")"
tag="$(jq -r '.tag_name' <<<"$meta")"
[ -n "$tag" ] && [ "$tag" != "null" ] || { echo "no tag_name resolved"; exit 1; }
dest="${DEST_ROOT}/${tag}"
mkdir -p "$dest"
echo "Fetching FjordLauncher ${tag}${dest}"
mapfile -t urls < <(jq -r '.assets[].browser_download_url' <<<"$meta")
[ "${#urls[@]}" -gt 0 ] || { echo "no assets found"; exit 1; }
for url in "${urls[@]}"; do
fname="$(basename "$url")"
echo "${fname}"
curl -fSL --retry 3 -o "${dest}/${fname}" "$url"
done
# stable symlink for the landing page to reference
ln -sfn "$tag" "${DEST_ROOT}/latest"
echo "Done. ${#urls[@]} assets in ${dest}"
```
Caddy mount: `./launcher:/srv/launcher:ro` (served at `/launcher/…`).
### Stable symlinks (so landing links survive version bumps)
The landing page (`09-landing.md`) links to **fixed** filenames, not versioned
ones. After downloading, `fetch-launcher.sh` must create these symlinks under
`launcher/latest/` pointing at the real assets:
- `fjord-windows-setup.exe` → Windows Setup `.exe` (x64)
- `fjord-macos.dmg` → macOS `.dmg`
- `fjord-linux-x86_64.AppImage` → Linux x86_64 `.AppImage`
Selecting the right asset from the release list needs filename matching (the
upstream names carry MSVC/MinGW/arch/version). Match cautiously; halt if a
category resolves to 0 or >1 candidate rather than guessing. **Names must stay in
sync with `landing/src/data/site.ts`.**
## Per-guest flow
1. Open `https://ulicraft.net`, download launcher for their OS, install.
2. Add account: authlib-injector type, URL
`https://auth.ulicraft.net/authlib-injector`, drasl username/password.
3. Import the modpack (packwiz URL `https://pack.ulicraft.net/pack.toml`,
or a shared instance zip).
4. Connect to `mc.ulicraft.net:25565`.
## Tasks
- [ ] Create `tooling/fetch-launcher.sh` (above); `chmod +x`
- [ ] Extend script: create stable symlinks (win/mac/linux) in `launcher/latest/`
- [ ] Run it pre-party; verify all assets land in `./launcher/<tag>/`
- [ ] `.gitignore` `./launcher/` (done)
- [ ] Landing page DONE — `landing/` Astro project, builds to `www/` (see 09-landing.md)
- [ ] Confirm Fjord authlib-injector account flow against drasl
- [ ] Decide whether to ship a pre-built instance zip vs packwiz URL import
- [ ] Pin a launcher version (don't silently follow `latest` on party day)