librelad ff25b08ee8 Make multi-instance actually install, and stop apps stealing each other's network rows
Instance install (bugs found by running one end to end):

- The cloned compose kept the TYPE's tag namespace
  (#LIBREPORTAL|BOOKSTACK_APP_KEY_1_TAG|...) while the config had been
  re-namespaced to CFG_<SLUG>_*, so tagsProcessorAppConfigValues matched
  nothing, the placeholders survived and the pre-start guard refused to
  launch. Rewrite the tag names and *_DATA tokens too — narrowly, so an
  app whose compose sets a real env var named after itself is untouched.
- Tools/hooks kept uppercase CFG_<TYPE>_ reads, so an instance
  provisioned itself from the type's config and ignored its own values.
- Cloned hooks were never loaded: both loaders run at startup, before the
  instance dir exists, so _appCallHook's `declare -F` found nothing and
  every <slug>_install_* hook silently no-opped — for bookstack that is
  the readiness probe and the admin bootstrap. Source the instance's own
  scripts in-process, then regen arrays + manifest for later runs.
- bookstack's hook hardcoded the container name after `docker exec -e ...`
  flags, where the rewriter can't see it, so an instance's admin bootstrap
  ran against the BASE app's container — including a tinker DELETE of a
  user. Target "$app_name" instead, and teach the rewriter the
  container="<type>" assignment form used by auth adapters.

network_resources uniqueness:

UNIQUE(resource_type, resource_value) is right for 'ip' and 'port' but the
port-tag writer stores descriptive rows in the same table with INSERT OR
REPLACE, so every install DELETED the matching row from whichever app held
it. traefik_managed and url_accessible are booleans, so the whole table
could only ever hold one row of each. Observed live: installing a second
bookstack took all four traefik_managed/url_accessible rows from stoat and
bookstack, and removing that instance took the stolen rows with it.

Replace it with a partial unique index scoped to ip/port, and migrate
existing databases in place (SQLite can't drop a constraint, so the table
is rebuilt inside a transaction). The migration is invoked from
portUpdateComposeTags, not just databaseCreateTables — the latter only
runs from startPreInstall, which a working install never re-runs.

Verified: two bookstacks now hold port_tag_internal=80, traefik_managed
and url_accessible simultaneously; duplicate host ports and IPs are still
rejected; instance installs, serves HTTP 200, provisions its own admin in
its own database, and removes cleanly with no orphan rows.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-18 23:15:21 +01:00
2026-05-21 20:37:54 +01:00

LibrePortal

Your own private corner of the internet — free, open, and yours.

LibrePortal is a self-hosted platform for running the apps you rely on, on your own server: one-click installs, a reverse proxy with automatic SSL, rootless Docker, optional VPN routing, and a clean web dashboard to manage it all.

⚠️ v0.1.0 — early days. Expect rough edges while things settle.

Why LibrePortal

Too many services today treat your data as theirs to take — quietly overstepping boundaries that should never have been crossed. LibrePortal grew out of frustration with that: it's a way to run the apps you depend on on your own server, where your data stays yours. Privacy here isn't a feature to toggle — it's the whole point.

Free & open — forever

The entire platform is free software under the GNU AGPLv3. Self-host it and you get everything — every feature, no paywalls, no telemetry. See our Promise for exactly what that means.

What you get

  • 📦 One-click self-hosted apps (Nextcloud, Vaultwarden, Jellyfin, Gitea, …)
  • 🔀 Traefik reverse proxy + automatic Let's Encrypt SSL
  • 🔒 Rootless Docker, CrowdSec, sane security defaults
  • 🛡️ Optional VPN routing (gluetun) for any app
  • 🖥️ A web dashboard to install, configure, back up, and monitor everything

Quick start

curl -fsSL https://get.libreportal.org/install.sh | sudo bash

This installs a versioned, checksum-verified release (Debian/Ubuntu, root). Put data on separate disks with --system-dir= / --containers-dir= / --backups-dir=.

The get.libreportal.org host is still being set up — until it's live, build a release and install from it locally (see the docs below).

Documentation

LibrePortal Connect (optional)

Self-hosting is free and complete. If you'd rather not fiddle with the tricky parts — like reaching your server from your phone, or keeping off-site backups — LibrePortal Connect will handle them for you. Here's the catch that makes us different: we work like a courier carrying a sealed box. We move your data between your devices and store backup copies, but it stays locked and you hold the only key — we can't open it, and we never run your apps for you. Everything we offer, you can also set up yourself for free. Our Promise spells out exactly where that line sits.

Contributing

PRs welcome — see CONTRIBUTING.md. We use a lightweight DCO sign-off (git commit -s), no CLA.

Acknowledgments

LibrePortal has been built from scratch since 2023. Its spark of inspiration was a small installer script from Brian McGonagill (OpenSourceIsAwesome): gitlab.com/bmcgonag/docker_installs. From that seed it grew start to finish — refined, extended, and refactored into the platform it is today.

License

GNU AGPLv3. What's open stays open.

Description
No description provided
Readme AGPL-3.0 26 MiB
Languages
Shell 51.3%
JavaScript 34.1%
CSS 9.8%
TypeScript 2.3%
HTML 1.8%
Other 0.6%