Go to file
Peterino2 9dd11c3011 Offer desktop client downloads and let a proxy end Lore's gRPC TLS
- scripts/build-desktop-dist.sh cross-compiles the desktop client for
  Linux (glibc 2.39) and Windows with Zig and Cargo, bundles liblore
  from the pinned release, and writes the archives, SHA256SUMS and BUILD
  to run/downloads/.
- lore-forge serves them to signed-in users at /download and
  /downloads/{file} (LORE_FORGE_DOWNLOADS_DIR), with a Desktop tab in
  the nav and a panel on the home page. Only plain names of known types
  are served; download and downloads are reserved names.
- fetch-lore.sh takes LORE_TARGET for --liblore and unpacks the Windows
  zip.
- loreserver-config --grpc-tls-at-proxy (LORE_GRPC_TLS_AT_PROXY=1 for
  start.sh) gives the certificate to QUIC only, for a proxy that ends
  TLS on TCP 41337 and relays to loreserver over a private link.
- shell.nix: an FHS shell with Rust, protoc, Zig and the other build
  tools, for NixOS.
2026-11-27 04:16:36 +00:00
.ai/designs Offer desktop client downloads and let a proxy end Lore's gRPC TLS 2026-11-27 04:16:36 +00:00
crates Offer desktop client downloads and let a proxy end Lore's gRPC TLS 2026-11-27 04:16:36 +00:00
deploy Harden lore-forge for a production deployment 2026-11-26 17:20:53 -07:00
desktop Show transfer speed in the desktop client 2026-11-26 21:07:28 -07:00
scripts Offer desktop client downloads and let a proxy end Lore's gRPC TLS 2026-11-27 04:16:36 +00:00
.gitignore Build phase 1 and the read-only repository browser 2026-11-25 19:09:42 -07:00
AGENTS.md Offer desktop client downloads and let a proxy end Lore's gRPC TLS 2026-11-27 04:16:36 +00:00
Cargo.lock Offer desktop client downloads and let a proxy end Lore's gRPC TLS 2026-11-27 04:16:36 +00:00
Cargo.toml Offer desktop client downloads and let a proxy end Lore's gRPC TLS 2026-11-27 04:16:36 +00:00
README.md Offer desktop client downloads and let a proxy end Lore's gRPC TLS 2026-11-27 04:16:36 +00:00
lore.lock Drive real workspaces through liblore in the desktop client 2026-11-26 10:19:27 -07:00
shell.nix Offer desktop client downloads and let a proxy end Lore's gRPC TLS 2026-11-27 04:16:36 +00:00

README.md

lore-forge

Accounts, sign-in, per-repository tokens and a self-hosted forge for Epic's Lore version control system.

lore-forge runs beside an unmodified loreserver as the OpenID Connect issuer it trusts. Lore clients log in through lore-forge, which signs tokens scoped to one repository at a time from the permissions it manages. Repository data still flows directly between Lore clients and loreserver.

Status: early. lore auth login, repository create, push, clone and listing work end to end against Lore 0.14. Provider sign-in, invites and the forge UI are still to come. The design is in .ai/designs/.

Starting a deployment

This repository is all a deployment needs. You need Rust, protoc, curl and tar.

scripts/start.sh

On the first run it:

  1. writes run/deployment.env with local defaults;
  2. generates run/secret.key;
  3. builds lore-forge;
  4. downloads the Lore release pinned in lore.lock into .lore/ and checks its SHA-256;
  5. starts lore-forge and then loreserver, which it configures to trust lore-forge.

Then:

  • Open http://localhost:8080 and create the owner account.

  • Sign in with the CLI, using the path the script prints:

    .lore/v0.14.0/lore auth login lore://localhost:41337
    .lore/v0.14.0/lore repository create lore://localhost:41337/<your-username>/my-game
    

Ctrl-C stops both servers. Later runs reuse everything in run/, which is git-ignored. Set LORE_FORGE_RUN_DIR to keep it somewhere else.

In run/
deployment.env Public URLs, listen address, TLS certificate for loreserver. Edit it before going beyond localhost
secret.key Encrypts the token signing keys. Back it up apart from the rest; losing it invalidates every outstanding token
forge-data/ lore-forge's SQLite database
lore-store/ loreserver's repository storage
lore-config/ The loreserver configuration, regenerated on every start
logs/ Both servers' logs
downloads/ Desktop client archives for /download, from scripts/build-desktop-dist.sh

To serve other machines, set PUBLIC_URL to lore-forge's https URL. Behind a reverse proxy, the proxy must pass HTTP/2 through so gRPC works. Also set LORE_URL and LORE_REMOTE to the host clients use for Lore, and LORE_TLS_CERT/LORE_TLS_KEY to a real certificate. Without one, loreserver makes a self-signed certificate on every start. LORE_REMOTE is also the remote the pages tell people to use; make it lores://, since lore:// neither checks the certificate nor encrypts gRPC.

If a proxy in front ends TLS on TCP 41337 and forwards Lore's gRPC over a private link, set LORE_GRPC_TLS_AT_PROXY=1: the certificate then serves only QUIC, whose TLS always ends at loreserver, and gRPC stays plaintext behind the proxy.

PUBLIC_URL is the token issuer, so do not change it once people have logged in.

Lore releases

lore.lock pins the Lore release and the SHA-256 of each archive. To fetch it on its own:

scripts/fetch-lore.sh

It prints the directory holding the binaries. Lore publishes binaries for macOS on Apple silicon and for Linux on x86-64 and arm64. Elsewhere, build Lore from source and set LORE_BIN_DIR.

To move to another release, run the e2e test before committing the new lock:

scripts/fetch-lore.sh --pin vX.Y.Z

On macOS the lore CLI keeps the key for its stored logins in the keychain. Each lore process asks for it until you choose Always Allow.

Desktop client

desktop/ holds a tray application and the per-user service it talks to. It builds with Zig and Cargo, separately from the server.

scripts/build-desktop-dist.sh cross-compiles it for Linux and Windows and packs an archive for each into run/downloads/, which lore-forge offers to signed-in users at /download. Both builds are experimental: neither window has yet been run on that platform.

Testing

cargo test --workspace
scripts/e2e-lore.sh            # against the pinned Lore release
SMOKE=1 scripts/e2e-lore.sh    # one login, create and push only

Set LORE_BIN_DIR to test against another Lore build.