**Activity** (Bandwidth, Logs), the top-level **Plugins**, and **Settings** (Platform settings, About
Runway). Items you cannot open are hidden — each entry is shown exactly when its screen would let you in
(the same check the screen makes: a grantable permission such as **Logs** → `VIEW_AUDIT`, **Bandwidth** →
`VIEW_BANDWIDTH`, **Templates** → `MANAGE_STYLES`, **Manage sites** → `VIEW_TENANCIES` or `MANAGE_SITE_HOSTS`,
or the superadmin/wildcard-admin gate of **Backups**, **Permissions** and **Platform settings**) — and a group left with nothing in it is hidden too, so the menu
never offers a link that answers "forbidden". Hiding is only presentation: every screen still checks on its
own. Section references below name the
destination screen; the parenthetical path is the direct URL. A **language switcher** (the globe/language
icon next to your username) sets the console's display language — English or Spanish by default (see
`runway.operator.ui-languages` in **§8**); the choice is remembered per operator and does not affect any
site's own language.
**What you do NOT do.** You never operate *inside* a site as if you were a site user — you cannot
edit a site's pages, its content, or its per-site data. That is the site manager's job, done in a
separate realm and a separate console. This is a deliberate, foundational boundary:
- **Two user realms that never cross.** The **application realm** (operators; login `/app/login`,
console `/__app`) and the **tenant realm** (site users; login `/login`, console `/__admin`) have
separate login URLs and separate user stores. Authenticating in one never grants the other — even
in the same browser, an application session and a site session coexist without crossing. A
compromised or buggy action in one site is contained to that one site; the operator and the other
sites are never exposed.
- **The application superadmin runs the platform but cannot enter a site;** every **site
superadmin** fully manages its site but can never reach the application realm. You provision a
site's first superadmin when you create the site, and you can reset its password from the console,
but you cannot use it to act inside the site.
The companion document for operating an individual site is the *Site Manager & Designer Guide*
([SITE-MANAGER-GUIDE.md](SITE-MANAGER-GUIDE.md)); its §2 also describes keyboard and screen-reader use, which
is the same in the platform console (skip link, Esc then Tab out of a code editor, Down arrow or Shift+F10 for
a listing table's column menu). Day-to-day operational troubleshooting lives in
[OPERATIONS.md](OPERATIONS.md).
## 2. System requirements
| Requirement | Detail |
|---|---|
| **OS** | Linux with **systemd** (the installer and unit target it; tested on RHEL-family — Rocky/Fedora/Alma — and Debian-family). macOS/Windows are not covered by the installer. |
| **Java** | A **JDK or JRE 25+** on the host. A JRE is sufficient — Runway does **not** compile at runtime. The installer auto-detects a 25+ runtime (Zulu, Temurin, generic OpenJDK) or you point it with `--java-home`. |
| **Database** | **None.** The kernel is filesystem/YAML-backed on purpose; there is no SQL server to install or configure, and the first-run wizard never asks for one. Plugins that need one use PostgreSQL or MariaDB through the **database plugins** (§11.1). |
| **CPU / RAM** | Modest. The service runs in one JVM; the shipped heap is `-Xms256m -Xmx1g` (`JAVA_OPTS` in the unit), which suits a small VM. Note the sizing interlock: each Argon2id password verification costs 19–32 MiB, and the hash pool is bounded (`runway.security.max-concurrent-hashes`, default 8) precisely so a login flood cannot exhaust heap — keep `-Xmx` comfortably above `max-concurrent-hashes × memory-cost`. |
| **Disk** | The code footprint is small (a single fat jar). Plan capacity for **editable state**: `external/` (config + all site folders), `logs/`, and `backups/` (site backup archives can be large — see **§13**). |
| **Network / ports** | One HTTP listener. By default Runway serves **plain HTTP on port 8080** and expects a reverse proxy (HAProxy/nginx/Caddy) in front to terminate TLS (**§7**). Change the port with `--server.port=` (`RUNWAY_OPTS`). Binding a privileged port (80/443) directly needs `CAP_NET_BIND_SERVICE` — see the unit (**§6**). |
Clustering is **opt-in and off by default** (`runway.cluster.enabled`, set in the external
`application.yml`). Left off — the default, and what the sizing figures below assume — no Hazelcast member
starts, no session repository is wired, and the container's own `HttpSession` is used: one instance, scaled
vertically on a bigger host. Turned on, several instances run behind a load balancer — HTTP sessions live in
a Hazelcast `IMap` shared by every node (so a session survives losing the node that created it, with no
sticky-session requirement), and a Hazelcast topic relays cache-invalidation events (site, page, content and
per-site plugin-config changes) so every node evicts in step. Each node is a Hazelcast member itself by
default (`runway.cluster.topology: EMBEDDED`, `tcp-ip` discovery with an explicit member list), or a client
of a separately-run grid (`CLIENT_SERVER`).
**The clustering keys.** All of them live in the external `application.yml` (or the environment) of **every**
node, with the same values on each, and are read once at startup: a change needs a restart of every node. None is
on a console screen, because one node's console cannot change the others. While `enabled` is `false` none of the
other keys is read, so a mistake in them shows only when you switch clustering on. Nor are they read in WIZARD mode:
clustering starts only once first-run setup is done.
| Key | Default | What it does |
|---|---|---|
| `runway.cluster.enabled` | `false` | The master switch. Off, the node runs alone with the servlet container's own sessions. |
| `runway.cluster.cluster-name` | `runway` | The Hazelcast cluster name. Members and clients join only peers with the same name, so two estates on one network stay apart. With `CLIENT_SERVER` it must equal the name of the grid you connect to. |
| `runway.cluster.topology` | `embedded` | `embedded`: every node is a Hazelcast member and reads only the `embedded.*` keys. `client-server` (or `CLIENT_SERVER`): every node is a client of a grid you run separately and reads only the `client.*` keys. Any other value stops startup. |
| `runway.cluster.session-ttl` | `30m` | How long an idle signed-in session lives while clustering is on. **Keep it equal to `server.servlet.session.timeout`** (§8): with clustering on, this value decides the timeout, and with it off that one does, so equal values mean switching clustering never changes when people are signed out. Write the unit (`30m`, `2h`): a bare number is read as **milliseconds** here, unlike `server.servlet.session.timeout`, where it means seconds. On an embedded member the grid also drops idle session entries itself after this time, but never sooner than 60 seconds. |
| `runway.cluster.sessions-map-name` | `runway.sessions` | The name of the distributed map that holds the sessions. Change it only when two separate Runway estates share one external grid (`CLIENT_SERVER`): with the same name they would share sessions. |
| `runway.cluster.events-topic-name` | `runway.events` | The name of the distributed topic that carries "this changed, drop your cached copy" messages between nodes (site, page, content and per-site plugin-setting changes). Same rule as the map name: different estates on one grid need different names. |
| `runway.cluster.embedded.discovery` | `tcp-ip` | How embedded members find each other: `tcp-ip` (the `members` list below; use it in production) or `multicast` (members find each other on the local network; convenient for a test cluster, and `members` is then ignored). Written exactly so, in lower case; any other value stops startup with a message naming it. |
| `runway.cluster.embedded.members` | empty | With `tcp-ip`: the members' addresses as `host:port`, for example `["10.0.0.1:5701", "10.0.0.2:5701"]`. |
| `runway.cluster.embedded.port` | `5701` | The port this node's member listens on for the other members. Open it between the nodes in the host firewall, and nowhere else: it is the cluster's internal traffic, sessions included. |
| `runway.cluster.embedded.port-auto-increment` | `true` | When the port is taken, try the next ones, so several members can run on one host. Turn it off to make a taken port fail instead of moving to a port your firewall does not open. |
| `runway.cluster.client.addresses` | empty | With `client-server`: the grid members to connect to, e.g. `["hz1.internal:5701"]`. **Required**: an empty list stops startup with *"runway.cluster.topology=CLIENT_SERVER requires runway.cluster.client.addresses to be non-empty"*. |
| `runway.cluster.client.smart-routing` | `true` | The client talks to every grid member and sends each operation to the member that owns the data (the fastest). Turn it off only when a firewall lets the client reach just one member: everything then goes through that one. |
With `client-server`, Runway does not configure the grid's session map for you: declare the map named in
`sessions-map-name` on the grid with `max-idle-seconds` equal to the session TTL. Without it an idle session is
removed only when someone presents its id again, so abandoned sessions stay in the grid's memory.
Two limits remain, and they shape the topology you can actually run: there is **no read-only edge/replica
mode** yet (every node is a full read-write instance), and the filesystem stores serialize writes **per site
within one JVM only** — two nodes writing the same site's files are last-writer-wins at file granularity (a
distributed lock is the follow-up). Keep authoring traffic on one node until that lands.
### Capacity, sizing & resilience
Runway is **CPU-bound**, not memory-bound, for dynamic traffic — so **size the CPU for your peak request rate and
let memory follow the §15 rule.** Reference numbers from a load test on a **2 vCPU** box (Jetty/JDK 25, behind
HAProxy; SSR-heavy mix including a full-JSON-LD page):
- **~750 req/s sustained** for server-rendered pages, at **~99 % CPU** — the **SSR render is the cost**; the box
saturated CPU well before anything else. **Median latency ~27 ms** when not overloaded.
- **Static / cached content goes far higher** (a CSS/JS asset is cheap) — the dynamic render is what consumes a
core, so read the 750 figure as a *dynamic-page* ceiling, not a total.
- **Memory was comfortable throughout: zero full GCs**, heap peaked ~0.7 GB of a 2 GB `-Xmx`, and the `MemoryMax`
cgroup cap was never approached. Add cores for throughput; give memory the §15 headroom and it is not the limit.
- **Rule of thumb:** throughput scales with cores for SSR traffic — roughly **~350–400 dynamic req/s per core** on
this class of hardware. Extrapolate cautiously (these are 2-core measurements; real pages and CPU differ).
**Concurrency ceiling — the Jetty thread pool.** In-flight request concurrency is bounded by the embedded Jetty
thread pool (**default max 200**, min 8). On ≤ 2 cores CPU saturates long before 200 threads matter, so the default
is fine; on a **larger multi-core host** the pool becomes the binding ceiling. Raise it on **Settings → Server
settings → Capacity** ("Most request threads", "Fewest request threads"), or with the standard Spring Boot property
in the external `application.yml` (or as a `RUNWAY_OPTS`/JVM arg). Either way it applies after a restart. The
minimum may not be above the maximum (the console refuses it, because the server would not start). The same threads
serve the public sites **and** the consoles, so a maximum set too low leaves the console waiting behind public
traffic under load:
```yaml
server:
jetty:
threads:
max:400# default 200 — raise on a box with many cores serving high SSR concurrency
min:8
```
**Resilience past capacity.** Beyond its capacity Runway **degrades gracefully — it sheds excess with `503`s,
never crashes, and recovers instantly** when load drops (in the test, CPU fell 99 %→8 % and busy threads 200→3 the
moment the spike ended). Combined with the DoS floor (**§12**), an overload or a flood is shed, not fatal.
## 3. Installation
Runway ships as a **single-file, self-extracting installer** — `runway-<version>.bin` — a plain
shell script with a compressed bundle appended after a marker. It needs only stock tools
(`bash`, `tar`, `gzip`, `awk`, `tail`); there is no `makeself` or other dependency. The **same
file installs and upgrades** — re-run it to upgrade in place (**§15**).
**Download & verify.** Get the installer (and the plain `runway-<version>-dist.zip` bundle) from the
releases page, <https://g.quest.mx/quest/runway/releases>. Every release also ships **stable-named
aliases** and an auto-computed **`SHA256SUMS`** manifest, so these links always fetch the newest build
| `--user NAME` | Service user to create/use (default `runway`). |
| `--port N` | The app's listen port. Written to `application.yml` when non-default (443 with local TLS, else 8080), and opened in the firewall if requested. A port below 1024 also switches on `CAP_NET_BIND_SERVICE` in the unit; later upgrades keep it (§6). **First install only** (see below). |
| `--tls-keystore PATH` | Terminate TLS in Runway itself with this **PKCS12** (`.p12`) keystore — implies local TLS; the file is copied to `external/tls/` and `runway.tls.*` is written (§7.1). **First install only** (see below). |
| `--tls-password PASS` | Keystore password (else prompted; unattended installs must pass it). It is written **in plain text** as `runway.tls.keystore-password` in `external/application.yml`, which is why that file is mode `600` and owned by the service user. Typed on the command line it also lands in your shell history; leave it off on a terminal and answer the prompt instead. |
| `--tls-redirect` | Also add an HTTP→HTTPS 301 redirect + ACME webroot on port 80. Port 80 is privileged, so it also switches on `CAP_NET_BIND_SERVICE` in the unit (kept on upgrade, as with `--port`; see §6), and `--open-firewall` then opens 80 as well. |
| `--no-tls` | Skip the TLS prompt — stay plain HTTP behind a proxy. |
| `--secret-key KEY` | The master key for encrypting stored secrets (SMTP / CAPTCHA / plugin passwords). Persisted as a **root-only systemd drop-in** (`/etc/systemd/system/runway.service.d/30-secret-key.conf`, env var `RUNWAY_SECURITY_SECRET_KEY`). **Leave it off to auto-generate one on first install** (so secret storage never silently fails — even with `-y`). An existing key is **kept** on upgrade (never rotated). Pass an explicit value only to reuse a known key (e.g. migrating a deployment). **Back it up** — losing or changing it makes existing `ENC(...)` values undecryptable. |
| `--java-home DIR` | The JDK/JRE 25+ to run under (else auto-detected). The installer takes the first of these whose `bin/java` reports version 25 or later: this flag, then `$JAVA_HOME`, then `/usr/lib/jvm/` folders matching `*zulu*25*`, `*temurin*25*`, `*-25-*`, `java-25-*`, `jdk-25*`, `jre-25*`. A `--java-home` older than 25 is passed over without an error, so check the `java home` line it prints. With none found it warns and writes `/usr/lib/jvm/java-25-openjdk` into the unit; fix the unit's `JAVA_HOME` then. |
| `--open-firewall` | Best-effort: open the listen port (and 80 with `--tls-redirect`) in **firewalld** or an already-active **ufw** (**§16**). |
| `--firewall-ports LIST` | Comma-separated TCP ports to open (implies `--open-firewall`). |
| `--no-firewall` | Never touch the firewall — **wins over**`--open-firewall` and skips the prompt. |
| `-y`, `--yes`, `--non-interactive` | Non-interactive: accept all defaults. Without it the installer asks only when its input is a terminal, so a run from a pipe, a script or cron is already non-interactive. |
| `--update-essential-plugins` | Accepted and ignored (it logs that it has nothing to do). **Every upgrade** refreshes the bundled essential plugin (`protection`) from the new release; see §15 *Essential plugins on upgrade*. |
| `--heap SIZE` | Set the JVM heap `-Xmx` (e.g. `2g`, `1536m`) via an **upgrade-surviving drop-in** (`runway.service.d/20-heap.conf`) instead of the installer-rewritten main unit. `SIZE` is a whole number with an optional `k`, `m` or `g` (either case); a value with any other character (`2GB`, `1.5g`) is refused before the install starts. The drop-in sets `JAVA_OPTS=-Xms256m -Xmx<SIZE>` and is rewritten whole each time you pass `--heap`. See **Memory tuning** in **§15**. |
| `--memory-max SIZE` | Set a systemd `MemoryMax` cgroup backstop (e.g. `3g`, `1945M`) via drop-in `10-memory.conf`. Keep it ≥ heap + headroom. See **§15**. |
| `--dry-run` | Print every privileged action instead of doing it (change nothing). |
| `-h`, `--help` | Show help. |
| `--extract DIR` | (On the `.bin` itself) unpack the bundle into `DIR` without installing. |
**Where the `.bin` unpacks.** Before it installs, the `.bin` unpacks itself into a new folder under `$TMPDIR` (or
`/tmp` when `TMPDIR` is unset) and deletes that folder when it ends. On a host whose `/tmp` is small, point it
elsewhere: `sudo env TMPDIR=/var/tmp ./runway-<version>.bin`. Or unpack it yourself with `--extract DIR` and run
`DIR/runway-<version>/scripts/install.sh` with the same options.
**`--port` and `--tls-keystore` are for the first install only.** They write `external/application.yml` whole,
and on an existing install that file also holds the setup wizard's superadmin pin and anything you added to it;
replacing it would put the platform back into wizard mode with `/setup` open. So when the file already exists the
installer **refuses** them, before changing anything, and names the keys to edit instead — `server.port`,
`runway.tls.*` (§7.1) — then restart. An upgrade needs neither (**§15**); `--port 8080` (the default, never
written) and the firewall flags are still accepted. On an existing install the interactive run does not ask
about TLS or the port either.
**What it lays down.** The installer is **idempotent** and separates *code* from *state* so an
upgrade never clobbers your configuration or data (see **§5** for the layout, **§15** for
upgrades). With the defaults it:
1. Creates the **service user**`runway` (a system account, `nologin` shell).
2. Creates the version-independent **data dir**`/opt/runway-data/` with `external/`, `logs/`,
and `backups/`.
3. Unpacks the release to a **versioned dir**`/opt/runway-<version>/` — `bin/` (the jar and the
launcher), `scripts/` (the installer), and `seed/plugins/` (the bundled protection plugin as it ships, the copy
you repair from — **§12**) — and symlinks `external/`, `logs/`, `backups/` from there into the data dir.
4. Flips the **`/opt/runway` "current" symlink** to the new release (this path is `RUNWAY_HOME`).
5. Sets ownership to the service user and, on SELinux-enforcing hosts, **relabels contexts**
(`restorecon`) — this is required, not optional (**§16**).
6. Installs/updates the **systemd unit**`/etc/systemd/system/runway.service` with the detected
`JAVA_HOME`, enables it, and **starts the service**.
**Verify the install.** After it finishes:
```bash
systemctl status runway # should be "active (running)"
journalctl -u runway -e # startup log — look for the listen port and "WIZARD" mode
ls -l /opt/runway # -> runway-<version> (the current symlink)
ls /opt/runway-data # external logs backups
```
Then open the server in a browser and complete the first-run setup (**§4**) — a fresh install
boots in **WIZARD** mode and every request funnels to the setup page.
## 4. First-run setup
A brand-new install has no accounts and no sites, so Runway boots in **WIZARD mode** and serves a
single open setup page — every other path is funneled to it. The mode is **derived**, not a knob:
the platform is in WIZARD mode precisely while the application-superadmin **pin**
(`runway.security.app-master-id`) is unset in `external/application.yml`. Once the wizard writes
it, the next launch comes up in **ACTIVE mode** and the whole wizard layer is gone. Config can
never contradict reality because there is no separate `mode` setting to drift.
Writing the pin is a **merge, not a rewrite**: any settings already in `external/application.yml` —
self-managed TLS (§7.1), proxy CIDRs, a custom `server.port`, whatever the installer or you put there —
are **preserved** through first-run setup (the wizard only sets the pin). If that file exists but is not
valid YAML, setup stops with a clear message rather than overwriting it, so a hand-edit is never lost.
**Security note.** Because there are no accounts yet, the setup page is **unauthenticated**. Reach
it only over localhost or from behind your reverse proxy until setup completes — do not expose
`/setup` to the internet.
**Run the wizard.** Open the server (e.g. `http://<host>:8080/setup`, or just any URL — it
redirects to setup). You provision **two administrators, one per realm** in a single step:
- **Application superadmin** — runs the *platform* (sites, plugins, application users). You give a
username, an optional display name and recovery email, and a password (min 8 chars). There is
exactly one, and it is **pinned** — it can never be deleted, disabled, demoted, or renamed from
within the realm (**§9**).
- **Default site administrator** — the **superadmin of the first site** the wizard seeds. This is a
separate **tenant-realm** identity (username, password and an optional recovery email); the two realms
never cross, so this is a distinct account from the application superadmin. Give it the recovery email
here, or later on **Site masters** (**§10**), so it can use *Forgot your password?*.
Submit **"Create administrators & restart"**. The wizard:
1. Seeds a first site from the **starter template** and marks it the **default (catch-all)** site
(**§10**) — so the deployment answers any hostname out of the box. The starter is a real, styled
**two-page site** (a home page and an about page) sharing one master template, not a blank placeholder:
it is meant to be edited, not replaced. There is no other choice to make here.
2. Provisions that site's superadmin (the tenant admin you entered). If this step fails, it rolls
back to a clean slate so you can simply retry.
3. Creates the pinned application superadmin, writes `external/application.yml` with the pin
(mode `600` — it holds a secret), and triggers a supervised relaunch.
**Confirm it worked.** The success page says setup is complete and the server is restarting. Under
systemd the JVM exits with the relaunch code and systemd restarts it into ACTIVE mode (**§6**).
Within a few seconds:
```bash
journalctl -u runway -f # you should see a fresh startup, now WITHOUT WIZARD mode
ls -l /opt/runway-data/external/application.yml # exists, mode -rw------- (600)
```
Then sign in to the **operator console** at `/app/login` with the application-superadmin
credentials — you land on the console home at `/__app`. The site administrator signs in
separately at the site's `/login`. Use the server's address, or a host name of the first site (it is the
default site): once you give other sites their own host names, the console does not answer on those (**§8.6**).
## 5. Deployment layout
Runway keeps all editable state in an **external folder** (no database). The kernel resolves
these paths from `runway.storage.*`; only `external` is normally set, the rest default relative
| `runway.plugins.root` | `<external>/plugins` | Installed plugins, one folder each (**§11**). Normally left unset; when set, both the loader and the console's install/uninstall/enable/disable use it |
`runway.storage.stats` and `runway.storage.logs` are not settings (bandwidth is metered per site, in
`sites/<id>/stats/`; the launcher's `runway.out` lives in the deployment's `logs/`, outside Runway's control).
A configuration that sets either starts normally and logs one `WARN` naming the key — delete the line.
**The layout marker.** On its first start with a data folder, Runway writes `external/layout.yml`
(`version: 1`). It records which version of this folder's layout the data is in, and it is checked before
anything else touches the folder: a release older than the layout refuses to start rather than write into it
(see **§15**, *Rolling back*). Do not edit or delete it.
**Every file, and who owns it.** The full `external/` and `sites/<id>/` inventory — each file, the class
that reads and writes it, and what an upgrade may change about it — is in
host, scheme) **only** from proxy peers you list in `runway.proxy.trusted-cidrs`; from any other peer the
headers are ignored and the raw connection is used, so a directly-reachable instance cannot spoof them. The
container's own forwarded-header handling is off (`server.forward-headers-strategy: none`) — Runway's gated
filter is the sole handler. Defaults: forwarding is on (`runway.proxy.forwarded-headers: true`) and the
shipped config trusts loopback only (`127.0.0.1/32`, `::1/128`) for a same-host proxy. **Behind an off-host
proxy, add its exact IP** (prefer a single address over a broad range); an **empty**`trusted-cidrs` trusts
nothing (every request attributed to its direct peer, logged at startup). A catch-all (`0.0.0.0/0`, `::/0`,
or ranges that add up to one, such as `0.0.0.0/1` with `128.0.0.0/1`) trusts every client to fake its address:
Server settings refuses it, and one set in `application.yml` is warned about at startup. Never put a tenant-editable value here — it is an isolation/abuse boundary.
The redirect answers at the **connector level** — nothing on the plain port ever reaches the application —
with hardened handling (ACME tokens are shape-checked and confined to the webroot; symlinks and over-sized
files are refused; malformed `Host`/path values are rejected `400`). `status` is the redirect's HTTP status:
`301` (the default, permanent), `308` (permanent, and the client keeps the request method), `302` or `307`
(temporary). Any other value stops startup with a message naming it.
> **The webroot's permissions are yours to guard:** everything in `acme-challenges-dir` is served to
> anyone on the plain port. Only the ACME client should be able to write there — never the application or
> an untrusted user (e.g. `chown` it to the user running certbot and keep it `700`/`750`).
**Privileged ports & firewall.** Binding 443 and/or 80 directly needs `CAP_NET_BIND_SERVICE`. An install with
`--tls-keystore` on 443 or with `--tls-redirect` already has it, and upgrades keep it. If you switched to these ports
afterwards by editing `application.yml`, give it with the drop-in shown in **§6**. Open both ports in the host firewall (e.g. re-run the installer with
`--firewall-ports 80,443 --open-firewall`, or your firewall tooling directly).
> **Verify:** `curl -sI https://<host>/ | head -1` answers over TLS; `curl -sI http://<host>/x` returns
> `301` with a `Location: https://…`; and with a file `t` in the webroot,
> `curl -s http://<host>/.well-known/acme-challenge/t` returns its content instead of a redirect.
Set `runway.tls.sni-host-check: false` only for a **re-encrypting proxy** that connects by the backend's IP
while forwarding the real Host (Jetty's SNI/Host consistency check would otherwise reject those requests);
leave it on everywhere else.
## 8. Configuration reference
Runway is configured through **`application.yml`**, following the house convention: a reference
copy of every default ships inside the jar (on the classpath), and your **external override** at
`external/application.yml` (i.e. `/opt/runway-data/external/application.yml`) is loaded **above** it
and wins key-by-key. Only set in the external file the keys you actually change. The first-run
wizard creates this file and writes the application-superadmin pin into it; add your own keys
alongside. Because it holds a secret (the pin, and any `runway.security.secret-key`), keep it mode
`600`, owned by the service user (**§16**).
Changes take effect on the **next restart** (`systemctl restart runway`), except where noted.
Runtime-editable resources — messages/i18n, templates, static assets — live under `external/` and
reload without a restart.
**Most settings are set in the console, not here.** Every setting that can be changed safely
while the server runs has a page in the application console: **Settings → Server settings**
(`/__app/config/server`), and the **Settings** button on Backups, Bandwidth, Activity → Logs and Plugins
(§8.5). Those pages save to `settings:` in `external/platform.yml`. What stays in `external/application.yml`
is what the server needs before it can start or what is only safe to change on the host: the port, TLS, the
secret key, the storage paths, clustering, the audit switch `runway.app-activity.enabled`, and the console's host
names `runway.console.hosts` (a wrong value would lock you out of the console, so the file is where you fix it,
**§8.6**). [SETTINGS-REFERENCE.md](SETTINGS-REFERENCE.md) lists every host-only key with its reason.
**One home per setting; the host wins.** The console's values are loaded *below*`external/application.yml`,
environment variables and command-line arguments. A key you set there by hand wins, and the console shows
that field disabled with the note *"Set on the server in external/application.yml, which wins over this
page."*, followed by what removing the line would do: the console holds the same value, or the value is the
default (removing it changes nothing); the console holds a different value (that one takes effect); or the console
holds none and the default takes effect. A list counts in either form: a comma string
(`trusted-cidrs: "10.0.0.5/32,::1/128"`) or a YAML list (`trusted-cidrs: [10.0.0.5/32, ::1/128]`).
**Moving a key from `application.yml` to the console: one restart, with "Use the file's value".** While a key's
line is in the file, its field is locked, so the console cannot be given a value first. Moving it the plain way —
delete the line, restart, set the value on the page, restart again — costs **two restarts, and between them the
server runs on the default**. For a key whose default differs from your value (your proxy's address in trusted
proxy addresses, a monitoring token, the CSP mode) that is a window with the wrong value. A
locked row whose removal would change something offers **Use the file's value** (**Use the server's value** when an
environment variable or a command-line argument sets it). It copies the value the server runs with now into the
console's store. Then:
1. On the locked row, click **Use the file's value** and confirm. The field stays locked (the file still wins), and
the row now says *"The console holds the same value, so removing it there changes nothing."*
2. Delete the key's line from `external/application.yml`.
3. Restart once (`sudo systemctl restart runway`). Nothing changes: the console's copy is what the server reads now.
The value goes through the same checks as a save, and nothing is stored when one fails: a value the console
refuses (a catch-all trusted proxy, a value containing `${`, a number outside the console's range) stays on the host
until you correct it there. A token needs `runway.security.secret-key`: it is stored encrypted, like a token typed
on the page, and never shown. A token the host sets to `""` removes the console's stored token, since no token is
what runs. A blank value the console cannot hold is refused, because a blank field on the console means the default
(an empty `runway.compression.mime-types`, say, which compresses nothing): keep that one on the host. The copy is
recorded in the activity log, with the key and never the value. Values copied this way are listed with the
other changes saved since the start, but they change nothing until the line is removed and the server restarts.
Two keys do not follow this rule. **Password strength** (`runway.security.password-strength`): the value chosen
on Settings → Platform settings wins over `application.yml`, environment variables and command-line arguments,
and that field is never locked (§8.1). **The protection plugin's settings**: what its settings screen saves in
`external/plugin-settings/protection.yml` wins over `external/application.yml`, and the form shows no lock; an
environment variable or a command-line argument still wins over both.
**Keys.** The tables below list the most-used keys; anything not listed is left at its default. The
complete `runway.*` inventory, with types and defaults, is in
[CONFIGURATION-AND-DATA-STABILITY.md](CONFIGURATION-AND-DATA-STABILITY.md) §1, and your IDE completes every key
from the configuration metadata shipped in the jar.
**`runway.*` — the platform's own keys:**
| Key | Default | Meaning |
|---|---|---|
| `runway.storage.external` | `./external` | Root of the operator-editable folder (see **§5**). |
| `runway.storage.sites` | `<external>/sites` | Where per-site folders live. |
| `runway.storage.backups` | `./backups` (deployment root) | Where per-site backup archives are written (**§13**). |
| `runway.plugins.root` | `<external>/plugins` | Where plugins are installed and discovered (read from the environment before startup). The console's install/uninstall/enable/disable work in the same folder. |
| `runway.operator.ui-languages` | `[en, es]` | Languages the operator console's topbar switcher offers (BCP-47 codes, in display order). English and Spanish ship; any other language needs your own translation in `external/i18n/` (*Translating the console*, below). |
| `runway.operator.default-language` | `en` | Fallback console language when the browser requests none offered. |
| `runway.console.hosts` | _(empty)_ | The host names the operator console answers on (case and port ignored); every other host gets a `404` for the console's paths. Empty: the default site's host names and host names that serve no site. Host only, applies after a restart. **§8.6**. |
| `runway.compression.enabled` | `true` | Master switch for the single Brotli+gzip response-compression filter. Set `false` when a fronting proxy already compresses. Jetty's own gzip (`server.compression`) stays off either way. |
| `runway.compression.max-buffer-bytes` | `4194304` (4 MiB) | Largest response buffered to compress; anything larger streams through uncompressed. The buffer is held in memory **per response being sent**, so the worst case is this size times the busy request threads. `0` or a negative value (possible only in `application.yml`; the console takes 64 KiB to 256 MiB) sends every response uncompressed. |
| `runway.compression.mime-types` | `text/html`, `text/xml`, `text/plain`, `text/css`, `text/javascript`, `application/javascript`, `application/json`, `application/xml`, `image/svg+xml` | The content types that are compressed, matched on the type without its `charset`. **A list you set replaces this one**, so repeat the defaults you want to keep. An empty list in `application.yml` compresses nothing; a blank field on the console restores this default. Leave out formats that are already compressed (images, fonts, zip). |
| `runway.compression.brotli.enabled` / `.quality` / `.min-size` | `true` / `5` / `1024` | Offer Brotli (needs the brotli4j native lib; falls back to gzip if absent). Quality `0..11`: lower is faster and compresses less, higher is smaller and costs more CPU on every response; 4 to 6 suit compressing as pages are sent. In `application.yml`, a value above 11 or below -1 stops startup (the library refuses it; -1 asks for the library's own default). |
| `runway.security.app-master-id` | _(blank)_ | The pinned application-superadmin principal id. **Written by the wizard** — its presence flips WIZARD → ACTIVE. Do not edit by hand. |
| `runway.security.password-strength` | `STANDARD` | Argon2id memory-cost profile for **new** passwords: `STANDARD` (19 MiB) or `HIGH` (32 MiB). The Settings screen can override this (**§8.1**). |
| `runway.security.max-concurrent-hashes` | `8` | Most password hashes computed at once before requests fail "busy" — bounds heap under a login flood. Read once at startup (Settings → Server settings → Capacity, or here); at least `1` — `0` or a negative value stops startup. |
| `runway.security.acquire-timeout-millis` | `2000` | How long a request waits for a hashing slot before failing "busy". |
| `runway.security.secret-key` | _(installer-set)_ | Master key for AES-256-GCM encryption of every stored secret (platform SMTP password or OAuth2 client secret, per-site CAPTCHA secrets, `secret`-typed plugin settings). The installer generates one on first install and stores it in a root-only systemd drop-in as `RUNWAY_SECURITY_SECRET_KEY` (see `--secret-key`, §3); Spring's relaxed binding maps that env var to this property. **While blank the secret cipher is unavailable and no secret can be saved** — the app console shows a persistent warning on every page until it is set. Holds a real secret — never in the classpath default. |
| `runway.proxy.forwarded-headers` | `true` | Whether to honor `X-Forwarded-*` at all (still only from trusted peers; the standard `Forwarded` header is never read) — see **§7**. |
| `runway.http.min-request-data-rate` | `4096` | The slowest a request body may arrive, in **bytes per second**, before Runway answers `408 Request Timeout` and frees the request thread. It applies to every body — login and other forms, multipart uploads, raw bodies alike. Without it a client sending a byte now and then kept a thread for as long as it liked (the idle timeout only limits one stalled read). Only the time spent waiting for the client counts, from the first second of waiting on, so a server slow to start reading is never blamed, and a body that has arrived complete is never refused, however late its last packet came. Sending part of a body fast earns at most 30 seconds of waiting, so a large body cannot buy a long drip; a client pausing between packets is cut when its next packet arrives, within one idle timeout. 4096 (4 KiB/s) is below any real connection; `0` turns the check off. Set on **Settings → Server settings → Request limits**; applies after a restart. |
| `runway.i18n.cache-seconds` | `5` | How often a message lookup **outside** a public page (an error page, a plugin's background text) and the operator console's own bundle re-check their files on disk (`0` = on every lookup). Public pages re-check on every request, so a bundle edited on disk shows on the next page view, under a new ETag. |
| `runway.csp.mode` | `report` | Content-Security-Policy delivery: `report` (report-only — violations are logged, nothing is blocked), `enforce`, or `off`. Upper or lower case; blank means `report`. Any other value (`enforced`, say) stops startup with a message naming it. See **§8.4**. |
| `runway.csp.strict-dynamic` | `true` | `'strict-dynamic'` on the nonced pages. `false` rolls the whole estate (console **and** public pages) back to the host allowlist. **§8.4**. |
| `runway.csp.public-strict-dynamic` | `true` | Public tenant pages get a nonce derived from the page version + `'strict-dynamic'`, stamped at the edge on the scripts the allowlist policy would have run (same-origin or allowlisted `src`; never inline). `false` keeps public pages on the host allowlist. Needs `strict-dynamic: true`. **§8.4**. |
| `runway.csp.extra-hosts` | `[]` | Extra hosts an operator allowlists for the fetch directives and `frame-src` (a CDN, an analytics host), on **every site's** pages (the console calls it *Extra allowed hosts (all sites)*). A host only one site needs belongs on **Settings → Embed hosts**. **§8.4**. |
| `runway.http-cache.public-pages` | `public, max-age=300, stale-while-revalidate=60` | The `Cache-Control` header of a public page: browsers and shared caches may keep it 5 minutes, then serve it one more minute while they check for a newer version. A page also carries an ETag that changes with its content, so a cache that asks again gets the new page at once. (A page whose content widget reads the request's query, such as a search results page asked with a query, is sent `private, no-cache` and no ETag instead.) `no-cache` makes every visit ask. A page's own **Cache-Control** field in the page editor wins over this value. Blank means this default. |
| `runway.http-cache.assets` | `public, max-age=86400` | The header of a site's files under `/static/` (one day), and always of its documents under `/static/doc/`, which can be replaced in place. Blank means this default. |
| `runway.http-cache.plugin-assets` | `public, max-age=3600` | The header of the files plugins serve under `/__plugin/<id>/static/` (their styles and scripts): browsers keep them an hour, then ask again and get a `304` while the file is unchanged (each file carries an ETag of its content). An hour rather than a day because a plugin file keeps its name across upgrades. Accepts `public`, `private`, `max-age`, `s-maxage`, `stale-while-revalidate`, `stale-if-error`, `must-revalidate`, `proxy-revalidate`, `no-transform`, `immutable`, and `no-cache` or `no-store` alone; another value logs a warning and uses the default. Blank means this default. |
| `runway.http-cache.immutable-extensions` | `woff2, woff, ttf, otf, eot` | Files under `/static/` with these extensions (any case, with or without the dot) get the immutable header below instead. Add `css` or `js` only if the site's file names change with their content (`app.3f9c2.js`): a browser never asks again for an immutable file, so an edited `site.css` under the same name would stay old for a year. An empty list makes no file immutable. |
| `runway.http-cache.immutable-assets` | `public, max-age=31536000, immutable` | The header for those files: kept a year and never re-checked, not even on reload. Blank means this default. |
| `server.port` | `8080` (Boot default; unset) | The HTTP listen port. Override with `RUNWAY_OPTS=--server.port=N`. |
| `server.forward-headers-strategy` | `none` | The container's own forwarded-header handling is **off** — Runway's gated filter is the sole handler, so a direct client cannot spoof `X-Forwarded-*` (**§7**). Do not turn this on. |
| `server.error.whitelabel.enabled` | `false` | Runway serves its own error pages; the Spring whitelabel page is disabled. |
| `spring.config.import` | `optional:file:external/application.yml` | Loads your external override above the classpath defaults. |
| `spring.web.resources.add-mappings` | `false` | The page controller owns the catch-all `/**`; Boot's default static `/**` mapping is off so it can never shadow a page. |
| `spring.servlet.multipart.max-file-size` / `max-request-size` | `256MB` | The largest upload the platform accepts is a site backup zip (restore-from-upload); the 1 MB Boot default would reject any real backup. |
| `spring.security.filter.order` | `100` | Runs Spring Security's chain **after** the multi-tenancy filters, so a chain can read the bound site — required for tenant isolation. Do not lower it. |
| `spring.task.scheduling.pool.size` | `4` | Threads in the **one** scheduler pool every periodic task runs on: automatic backups (when enabled, §13) and plugins' scheduled work. Scheduling is always on. Four, so a long nightly backup cannot hold up short plugin jobs; threads start only as tasks are scheduled, so an idle pool costs nothing. Raise it only if a thread dump shows every `runway-scheduler-*` thread busy. |
| `spring.task.scheduling.thread-name-prefix` | `runway-scheduler-` | Names those threads, so they are recognisable in a thread dump (`jcmd <pid> Thread.print`). |
| `spring.thymeleaf.servlet.produce-partial-output-while-processing` | `false` | A page is rendered whole before its first byte is sent. Streamed instead (Boot's default), an error halfway through a render would leave the visitor a blank or cut-off page instead of the error page. Do not turn it on. |
| `server.servlet.session.timeout` | `30m` | How long a signed-in session (the operator console and every site console) may sit idle before it signs out. A duration such as `30m`, `2h` or `1d`; a bare number means seconds. Set on **Settings → Server settings → Sessions**; applies after a restart. With clustering on, `runway.cluster.session-ttl` decides instead — keep the two equal (§2). |
| `server.jetty.threads.max` / `.min` | `200` / `8` | The request thread pool (§2, *Capacity*). Set on **Settings → Server settings → Capacity**; applies after a restart; the minimum may not exceed the maximum. |
| `server.jetty.connection-idle-timeout` | `30s` | How long a connection may make no progress before Jetty closes it — a request with nothing more to read, or a response the client has stopped reading. Jetty's own default, stated so it has one home. It is what ends a client that reads a large response too slowly; a request body that keeps trickling in is ended by `runway.http.min-request-data-rate` instead. |
| `server.ssl.*` | from `runway.tls.*` | Filled from `runway.tls.*` (§7.1). Never set these yourself: they would bypass Runway's TLS startup checks. |
| `management.endpoints.web.exposure.include` | `health, prometheus` | The only actuator endpoints served. Do not add others: everything under `/actuator/` is open to the superadmin and System admins without the console's CSRF protection, and an endpoint such as `heapdump` would hand out what the server holds in memory, secrets included. |
| `management.endpoint.health.probes.enabled` | `true` | Adds `/actuator/health/liveness` and `/actuator/health/readiness` for a supervisor or load balancer. |
| `management.endpoint.health.show-details` | `when-authorized` | The public health answer is only `UP`/`DOWN`; a signed-in operator also sees each check (e.g. the data folder's path). |
| `logging.level.<logger>` | Boot's (`INFO`) | Raise one logger for diagnosis, e.g. `logging.level.mx.quest.runway.head: DEBUG`. Runway's own loggers are `runway.access` (one line per public request), `runway.protect` (edge rejections) and the `mx.quest.runway.*` packages. Set here, it applies after a restart (or set it for one run with `RUNWAY_OPTS=--logging.level.mx.quest.runway=DEBUG`). Easier: **Activity → Logs → Log levels** (`/__app/logs/levels`) changes a level at once and keeps it across restarts (in `platform.yml`); a level set here wins and shows locked there. **Default** on that screen puts a logger back to the level set here, or else its parent's; `ROOT` goes back to `logging.level.root`, or else `INFO`. Turn it back down afterwards: `DEBUG` on a busy server writes a lot. |
| `logging.file.name` / `logging.file.path` | _(unset)_ | Unset, everything goes to the console stream (journald under systemd). Setting either also writes a log file, rotated by Spring Boot; see Operations §3. |
Plugin settings are **not** placed in `application.yml`: app-level plugin settings live in their own
file per plugin under `external/plugin-settings/<id>.yml` and are edited from the console (**§11**).
**Translating the console.** The console's text ships in the jar as `i18n/operator-messages.properties` (English,
also the fallback for any language without its own file) and `operator-messages_es.properties` (Spanish). To
correct a wording or add a language, put a file of the same name in `external/i18n/`: for example
`external/i18n/operator-messages_fr.properties` for French. It needs only the keys you change; any key it lacks
comes from the shipped files. Copy the keys from the shipped file (`unzip -p <runway-app-…-exec.jar>
'BOOT-INF/classes/i18n/operator-messages.properties'`) and write the file in **UTF-8**. A new language also needs
its code added to `runway.operator.ui-languages` (Settings → Server settings → Console languages; applies after a
restart) and a name for the switcher, the key `op.lang.<code>` (`op.lang.fr=Français`); without it the switcher
shows the key itself. Edits to these files are picked up while the server runs, within
`runway.i18n.cache-seconds` (5 seconds by default). Mind one trap: a key in the unsuffixed
`external/i18n/operator-messages.properties` wins over the **shipped Spanish** text too, because your folder is read
before the shipped files; put a Spanish correction in `operator-messages_es.properties`.
The console's **Settings** menu is a dropdown with two entries: **Platform settings** (§8.1, the
editable settings below) and **About Runway** (§8.2, a read-only view of the running platform).
### 8.1 Platform settings
A small set of platform-wide settings is edited from the operator console at **Settings → Platform
settings** (`/__app/settings`, restricted to the application superadmin or a wildcard admin) and
stored in `external/platform.yml` — application-realm state kept **outside every tenant folder**, so
it never travels in a per-site backup:
- **Default site** — the catch-all that answers requests whose `Host` isn't bound to any other site
(see **§10**). Changing it takes effect immediately.
- **Password strength** — the Argon2id memory-cost profile (`STANDARD` = 19 MiB, `HIGH` = 32 MiB) used
for **new** passwords. It overrides the `runway.security.password-strength` value from
`application.yml` and applies on the next restart; existing passwords are unaffected (Argon2id hashes
are self-describing, so verification never breaks when the profile changes).
- **Node name** and **Response compression** — a display name for this node (shown on About) and the
master + per-encoding (Brotli / gzip) compression switches. Both apply immediately. The name shown is this field
when it is set, else `runway.node.name` from the server's configuration, else the server's host name. So in a
cluster, leave the field blank and give each node its own `runway.node.name` (an environment variable such as
`RUNWAY_NODE_NAME=web-1` suits that); a value saved in the field wins over it. The name is only displayed; nothing
else uses it.
- **Platform mail (SMTP)** — the application's own mail account: host, port, From address, and optional
**Editing platform.yml by hand.** The running server reads this file once and keeps it in memory, so a hand edit
applies only **after a restart** — and a save of any console page that writes this file before that restart writes
the old values back over your edit. Stop the service, edit, start it. An unknown `passwordStrength` is logged and
ignored (the `application.yml` profile is used).
**Clear template cache.** Below the settings form, **Clear template cache** empties the cache of parsed
page and chrome templates on **the node that answers you**. You normally never need it: Runway keeps the
cache on for speed, evicts exactly the right entries whenever a page or fragment is changed
**through the console** or a site is deleted or restored, and re-reads a template whose file changed
**outside** the console (edited on the server, copied in by a deployment script) on its next use — a
cached parse counts only while its files are unchanged on disk (Operations §5.2). It stays as a
backstop, e.g. for a file system whose timestamps cannot be trusted. (For **one** site, the site reload
of §12.2 does the same for that site's templates only, and leaves every other site's cache warm.) It is harmless — each page re-reads its template on its next request, which costs a few
milliseconds once — and is recorded in the activity log (`platform.template-cache-cleared`). In a
cluster it clears only the node that served the click: open the console on each node and run it there.
Restricted to the application superadmin or a wildcard admin.
### 8.2 About Runway
**Settings → About Runway** (`/__app/about`) is a **read-only** view of the running platform — useful
when diagnosing an install or filing a report. Unlike Platform settings it changes nothing and exposes
### 8.4 Content-Security-Policy and the public-page nonce secret
Every HTML response carries a Content-Security-Policy header (`runway.csp.*`, **§8**). Out of the box it
is **report-only**: violations are logged by the in-kernel collector (`/__csp-report`, WARN level) and
nothing is blocked. Review the log, then set `runway.csp.mode: enforce` in the external
`application.yml` and restart.
**The directives.** The policy is built once at startup from `runway.csp.*` (Settings → Server settings →
Content-Security-Policy, or `application.yml`; every field applies after a restart, and SETTINGS-REFERENCE.md lists
each default). Each directive key — `default-src`, `script-src`, `style-src`, `img-src`, `font-src`, `connect-src`,
`base-uri`, `form-action`, `frame-ancestors` — is the source list written after the directive's name, **exactly as
you type it** and not checked, so quote keywords the CSP way (`'self'`, `'none'`). Runway then adds to it:
-`extra-hosts` (*Extra allowed hosts (all sites)* on Server settings: every site gets them) and the hosts plugins
declare (reCAPTCHA's, for instance) — `extra-hosts` to `default-src`,
`script-src`, `style-src`, `img-src`, `font-src`, `connect-src` and an added `frame-src`; plugin hosts to
`script-src`, `connect-src` and `frame-src` only;
- the response's nonce (and `'strict-dynamic'` where it applies) to `script-src`, which is therefore always sent;
- on a site's public pages, the embed hosts that site switched on (below), each to its own directive.
A **blank value in `external/application.yml`** (`runway.csp.default-src: ""`) leaves that directive out. For
`style-src`, `img-src`, `font-src` and `connect-src` the browser then uses `default-src`; with `default-src` blank
too, those are unrestricted. `base-uri`, `form-action` and `frame-ancestors` do **not** fall back to
`default-src`: blank removes that protection (`frame-ancestors` is what stops other sites from framing yours).
On the Server settings screen a blank field restores the default instead (a form field cannot say "nothing"); to
omit a directive, set its key to `""` in `application.yml`, and the console then shows the field locked.
`object-src 'none'` is always sent and has no key.
-`runway.csp.report-uri` — where browsers send violation reports: Runway's own collector at `/__csp-report` by
default, which writes them to the log at `WARN`. Any URL is used as given, so a report collector of your own
works too. A blank value in `application.yml` (`runway.csp.report-uri: ""`) sends no reporting directive at all
(no `report-uri`, `report-to` or `Reporting-Endpoints`), so `report` mode then only shows violations in each
visitor's browser console. On the Server settings screen a blank field restores `/__csp-report`.
-`runway.csp.upgrade-insecure-requests` — `true` adds `upgrade-insecure-requests`: the browser fetches every
`http://` image, script or style of a page over `https://` instead. Turn it on only once every host your pages
load from serves `https`, or those resources stop loading.
**What `script-src` looks like.** The console and login/recovery pages get a fresh nonce per request
plus `'strict-dynamic'`. **Public site pages** get `'nonce-<x>' 'strict-dynamic'`
too, where the nonce is **derived from the page version** (its ETag): every visitor and every cache
sees the same value until the page changes, so shared caching (`public, max-age=…`) and `304`
revalidation keep working exactly as before. The response edge adds that nonce to **the scripts the
allowlist policy would have run** — a `<script src>` on the site's own origin (relative URLs included) or
on a host the policy names (`runway.csp.script-src`, `runway.csp.extra-hosts`, and plugin hosts such as
reCAPTCHA's) — wherever it comes from: the site's templates, plugin widgets, head contributors. With the
shipped `script-src 'self'`, an **inline**`<script>…</script>` is never stamped, and a script on any other
host is never stamped either, so both stay blocked in `enforce` mode exactly as they were before this
release; a `nonce` attribute already written in the markup is overridden, so a copied nonce cannot unlock a
script either. One exception: if you wrote `'unsafe-inline'` into `runway.csp.script-src` yourself (and no
`'nonce-…'`, `'sha…-…'` or `'strict-dynamic'` token next to it), the old policy ran inline scripts, so
inline scripts are stamped too and keep running. The stamp never runs a script the old policy blocked: a
script on a host outside the policy stays unstamped either way. Add any of those three tokens and the
exception ends: inline scripts are no longer stamped. `'self'` and the host allowlist
stay in the header as the fallback for browsers that predate `'strict-dynamic'`. *Why the stamp follows the
allowlist:* under `'strict-dynamic'` the browser runs a script only if it carries the nonce, so stamping
everything would have turned scripts the allowlist blocked — markup injected into a page included — into
scripts that run. *Why `'strict-dynamic'` at all:* a script the allowlist trusts may now load further
scripts itself (`document.createElement('script')`) on any host — reCAPTCHA's loader fetching its own
chunks is the case it exists for — while a modern browser no longer lets the allowlist alone authorize a
parser-inserted script. So add a host to `extra-hosts` only if you also trust what its scripts load.
Responses with no page version — error pages, plugin endpoints, the maintenance page — keep the plain
`'self'` + host-allowlist policy. A page larger than the 8 MiB rewrite buffer is sent unrewritten with
the allowlist policy and `Cache-Control: no-store`. So is a page whose rendered markup **already contains
its own nonce** (in any spelling): markup copied the public value in — for example into an
`<iframe srcdoc>`, whose document inherits the page's policy — and the log shows a `WARN` *"Public page …
already contains its own CSP nonce"*. Find the content that carries it (a widget's settings, a site
parameter, a plugin's data: the inputs that do not change the page version) and remove it. *Why:* the
stamp can override a `nonce` on a `<script>` tag but not one inside an attribute value, so that response
simply gets no nonce to match.
**The secret: `external/csp-nonce.key`.** 32 random bytes, created on the first page request that needs
it, mode `600`, owned by the service user. It is not a credential (it cannot sign anyone in), but keep it
private: without it the nonce of a page version cannot be computed in advance from the ETag alone.
- **Rotate** it by deleting the file and restarting the service: every nonce changes, and — because
the page version folds a fingerprint of the secret — every page's ETag changes with it, so no browser
or CDN can pair an old page body with a new header. Expect one full re-render per page afterwards.
- **Several nodes** (clustering, §2): give every node the same file (copy it, `600`, same owner) so a
`304` from one node matches a page cached from another. With different files each node simply has
its own ETags — still correct, just fewer `304`s.
- **If the file is unusable** (unreadable, truncated), public pages fall back to the allowlist policy and
an ERROR is logged once at the first page request; nothing breaks. Fix or delete the file and restart.
**Switches.**`runway.csp.public-strict-dynamic: false` puts public pages back on the host allowlist
(the console keeps its nonces); `runway.csp.strict-dynamic: false` rolls back everything. Either
change moves every public page's ETag once (the page bodies change).
**What changes in `enforce` mode, compared with the allowlist policy.**
| Script | Before (allowlist) | Now (`public-strict-dynamic: true`) |
|---|---|---|
| `<script src>` on the site's origin or an allowlisted host | runs | runs (stamped) |
| inline `<script>…</script>` in a template, or injected into the page | blocked | blocked (never stamped) — unless `script-src` has `'unsafe-inline'`: then it ran before and runs now (stamped) |
| `<script src>` on a host outside the policy | blocked | blocked (never stamped) |
| a script added with `document.write` | runs if its host is allowlisted | **blocked** |
| an inline-SVG `<script href>` (no `src`), or a `<script src>` with text inside | its file ran if allowlisted | **blocked** (never stamped) — unless `script-src` has `'unsafe-inline'`: then it is stamped, as long as the URL it names is allowed |
| a script an allowed script inserts with `document.createElement` | runs if its host is allowlisted | **runs, any host** (`'strict-dynamic'`) |
| `<link rel="modulepreload">` / `prefetch` / `preload as="script"` on a host outside the policy | not fetched | **removed from the page** (never fetched) |
**What a site's designer should know.** Scripts loaded from the site itself or from an allowlisted host
keep working: they are stamped automatically. With the shipped `script-src 'self'`, inline `<script>`
blocks do not run under `enforce` — move the code into a `.js` file the page loads
with `<script src>`. (If the operator put `'unsafe-inline'` into `script-src`, they run.) A script added by
`document.write` is blocked (use `<script src>` or `document.createElement('script')` instead); inline
`onclick=` handlers and `javascript:` links are blocked too. Write script URLs plainly: a URL the edge
cannot read unambiguously (a backslash, a character reference in the host, three or more leading slashes
such as `///cdn.example/x.js`, a cross-origin `<base href>` before a relative URL) is not stamped, so it is
blocked. A stamped script is written `<script src="…"></script>` with nothing between the tags: a
`<script src>` that also carries text is not stamped (inside an inline `<svg>` the browser ignores `src`
and runs that text), and neither is a script without `src` — `href`/`xlink:href` do not count, because an
HTML `<script href>` runs its text. **Inline-SVG scripts** (`<svg><script href="…">`) are therefore
blocked under `enforce`; load the code from the page with a normal `<script src>` instead, and keep scripts
out of an SVG's `<title>` or `<style>` too (the edge reads those as text and leaves the script unstamped, so it is
blocked). **Preload hints:**`<link rel="modulepreload" href="/js/app.js">` next to the module's own
`<script type="module" src="/js/app.js">` keeps working — the preload is fetched once and reused, the stamped
script runs, its `import`s run, and the browser reports nothing (checked in Chrome 155). A classic
`<link rel="preload" as="script">` is the exception: the browser refuses the preload itself (a CSP message in
the console, and a violation report where the browser sends one), then loads and runs the stamped
`<script src>` normally — drop such hints rather than read the message as an attack. **A hint to a host outside
the policy is removed from the page:** the edge deletes every `<link>` whose `rel` holds `modulepreload` or
`prefetch`, or `preload` with `as="script"` (or a worker/worklet/`xslt``as`), when its URL fails the same rule
as a stamped script — the site's own origin, or a host the policy names. *Why:* under `'strict-dynamic'` the
browser fetches such a hint from any host (it ignores the host list for requests that are not parser-inserted;
Chrome 155 does it for every `prefetch` too), so injected markup could make every visitor's browser report the
visit to a host of the attacker's choosing, which the allowlist policy blocked. Allowed hints are left exactly
as written; stylesheet, font and image hints (`as="style"`, `as="font"`, …) have their own directives and are
untouched. To preload a module from a CDN, add the CDN to `extra-hosts` (it then also runs that CDN's scripts). A
foreign hint the edge cannot remove — inside an SVG `<title>`/`<style>` or another element it reads as text, or
inside an `<iframe srcdoc>` — makes that response fall back to the allowlist policy, without a nonce and with
`Cache-Control: no-store` (nothing is logged above `DEBUG`: `logging.level.mx.quest.runway.head=DEBUG` shows
*"hides a foreign script preload"*); remove the hint or write it in the page's normal markup. The same fallback
applies to a page whose markup the edge cannot read the way a browser will — malformed or deliberately tangled
markup where the reading depends on context the edge does not track (a raw-text element or `<; this
section is the platform operator's view.
**Every site always has a superadmin.** Creating a site is a single action that provisions the site
**and** its first **site-superadmin** (you supply that account's username and password on the create
form) — a tenant-realm identity that fully manages the site but can never reach the application realm.
The application superadmin, conversely, never operates *inside* a tenant. This invariant holds for the
wizard-seeded first site too, and the Sites list shows each site's superadmin(s) so you can see it at a
glance. (To hand a site a *different* or additional superadmin later, use the **Site master users**
screen — **Sites → Site master users**.)
**Creating a site.** The create form on **Sites → Manage sites** asks for:
- **Site id** — letters, digits, `.`, `_` and `-`, starting with a letter or digit (`acme`, `blog-2`). It becomes
the site's folder name under `sites/` and never changes.
- **Name** — the display name; the site manager can change it later.
- **Hosts** — the hostnames the site answers on, comma-separated (the rules are under *Editing a site's hosts*,
below). Empty is allowed: the site is then reachable only as the catch-all default. **The first host is the one
its links are built on** unless you set a base URL (below).
- **Default language** and **other languages** — language tags such as `en` and `es, pt-BR`. The default is added
to the list for you here (unlike *Edit*, below, which refuses a list without it).
- **Born from template** — the site template it is seeded from (§10.1).
- **The superadmin** — username, password and an optional recovery email for the site's first superadmin. A
username already used by another site superadmin is refused before the site is created; if the superadmin cannot
be created, the site is removed again, so a site never exists without one.
The base URL is not on this form; set it afterwards in the row's **Edit hosts** dialog if the first host is not
the right origin.
**Site master users** (`/__app/masters`) lists every site superadmin with the sites it manages. From it
the application superadmin or a wildcard admin can create one, **edit** its display name and recovery
email, reset its password, assign or unassign a site, **suspend or resume** it, and delete it. Give every
site superadmin a **recovery email**: without one it cannot use *Forgot your password?* (**§8.3**), and an
operator has to reset the password for it. The create form asks for it; *Edit* adds or changes it later
(recorded as `master.edited`). *Suspend* works like an application user's (**§9**): the
superadmin cannot sign in to **any** of its sites, every open session of it ends on its next request, and
its password and site assignments are kept, so *Resume* restores exactly what it had. Use it when a site's
management must be locked out without losing the account — an investigation, an unpaid contract. Unlike
deletion, suspending a site's **only** superadmin is allowed: it is undone with one click, and the site's
other users keep working. Both actions are recorded in the activity log (`master.suspended`,
`master.resumed`, with the superadmin's username).
*Assign* and *Unassign* take one site id, typed into the field; Assign refuses an id no site has. The superadmins
and their sites are kept in `external/site-users.yml` (`sites:` under each). A `sites:` entry of `"*"` assigns that
superadmin to **every** site, including sites created later. The console never writes `"*"`; it exists only if
someone put it in the file by hand, and such a superadmin then signs in to every site's `/login` and is listed as a
superadmin on every row of the Sites list. A hand edit of this file applies after a restart.
**Lifecycle.** A site is **active**, **suspended** (public requests short-circuit; the operator can
resume it), or deleted. Deleting a site removes its entire folder and is irreversible — take a backup
first (Site-Manager guide §12).
**The site's file, `sites/<id>/site.yml`.** Everything on this screen and on the site manager's **Site config** is
kept here. Prefer the console, which checks every value; a hand edit is not checked when it is read, and it applies
only at a site reload or a restart (**§12.2**). The keys, as the file writes them:
| Key | Values | Set on |
|---|---|---|
| `id` | the folder name; never change it | create |
| `name` | the display name | Edit (here) or Site config |
| `hosts` | a YAML list of hostnames, the primary first (rules under *Editing a site's hosts*) | Edit hosts |
| `defaultLocale`, `locales` | language tags with a hyphen, such as `pt-BR`; `pt_BR` in a hand edit reads the same. The default is put first in `locales` if it is not there already | Edit (here) or Site config |
| `baseUrl` | an origin such as `https://www.example.com`, or `null` for the first host | Edit hosts |
| `status` | `ACTIVE` or `SUSPENDED`, in capitals | Suspend / Resume |
| `maintenance`, `maintenanceMessage` | `true`/`false`, and the plain-text message | Settings → Maintenance (the site manager) |
| `editorial` | `advisory`, `enforced` or `reviewed` | Site config (the site manager) |
**Editing a site's name and languages.** Use the row's **Edit** action to change the site's **display
name**, its **default language** and its **available languages** (a comma-separated list of language
tags such as `en, es, pt-BR`; the default must be one of them — here, unlike on the create form, it is never
added for you). This is the
same change a site manager can make on their own **Site config** screen, with the same rules, so the two
can never disagree; you use it when the site manager cannot (a site with no active manager, or a site you
are setting up). Changing the default language re-homes the site's message bundles so the base file keeps
the default language's text, and existing pages keep their URL paths — tell the site manager to review
page paths after a default-language change (SITE-MANAGER-GUIDE §5). The site's **editorial level** (advisory, enforced or reviewed) is
not on this form: it is the site manager's choice on **Site config**, and an operator edit leaves it as it is. The change is live on the next
request and is recorded in the activity log (`site.updated`). Restricted, like the other lifecycle
actions, to the application superadmin or a wildcard admin. The site **id** never changes (it is the
site's folder name and stable identity).
**A site's storage limit.** Every site shares the data disk, so one site that uploads without limit can fill it for
all of them. The **Edit** dialog's **Storage limit** caps what a site's files may take: everything under its
`static/` folder, which is what the site manager uploads on **Static files** and **Documents**. There are two
levels, and `0` means no limit at either:
| Level | Where you set it | Applies |
|---|---|---|
| The platform default | **Settings → Server settings → Site storage**, field "Storage per site (bytes)"; key `runway.static-files.default-max-bytes` (default `0`) | after a restart |
| One site's own limit | **Sites → Edit**, field "Storage limit": a size such as `5GB` or `500MB`, `0` for no limit, empty for the platform default | at once |
Both default to no limit, so an upgrade changes nothing until you set one. The row on Sites shows each site's limit
and where it comes from ("this site" or "platform default"); the site's **Static files** screen shows the site
manager the usage against it, read-only. **The limit only refuses new uploads**: an upload that would go over it is
refused with a message saying so. It never deletes, hides or stops serving a file. If you lower a site's limit below
what it already stores, the site keeps every file, its Static files screen warns that it is over, and the site
manager can still delete (and replace a file with one no larger) until it fits. A site's own limit is stored in
`external/platform.yml` (`siteStorageCeilings:`), never in the site's folder, so it does not travel in a site backup,
and it is removed when the site is deleted. **A restore is never refused by the limit**: it brings the site back
whole, and only the next upload is checked. What the limit does not count (pages, messages, logs, plugin files) is in
[KNOWN-LIMITATIONS.md](KNOWN-LIMITATIONS.md). Each change is recorded in the activity log
(`site.storage-ceiling-changed`).
**Who sees this screen.** The superadmin and System admins, with every action on it. A System operator
needs **View tenancies** (`VIEW_TENANCIES`) to see the list — read-only, with no create, edit, lifecycle,
demo or CAPTCHA action — or **Manage site hosts** (`MANAGE_SITE_HOSTS`), which also shows the list
because host editing happens on it (**§9**).
**Editing a site's hosts.** The Sites list shows each site's routing **hosts** (the hostnames that
resolve to it). Use the row's **Edit hosts** action to change them — enter a comma-separated list;
entries are lowercased, trimmed and de-duplicated, each is validated as a hostname, and a host already
bound to **another** site is rejected (two sites can never claim the same host). The same rule applies
wherever a site gets hosts: creating a site, installing a demo, and creating a site from a backup refuse a
malformed host or one another site answers on, before anything is created. Restoring a backup brings back the
the same `SHA256SUMS`. Install one by uploading its zip on **Plugins** (below), then restart.
> ### ⚠️ Never park an old plugin version inside `external/plugins/`
>
> The instinct when upgrading a plugin is to keep the previous version beside the new one so a rollback is
> easy — `external/plugins/search.pre-2.0.0/`, say. **Do not.** The loader scans that directory and
> reads each `plugin.yml`; the parked copy still declares the same `id:`, so the scan sees a **duplicate plugin
> id** and **fails fast at startup**.
>
> The result is that the platform refuses to boot *because someone was being careful* — and it happens during a
> rollback-safety step, which is the worst possible moment to discover it. The folder name is irrelevant: the
> id inside the descriptor is what collides.
>
> Park the old version **outside** the scan directory (`/opt/runway-backups/`, anywhere off the tree), or keep
> the release zip and re-extract it if you need to roll back.
Optional features arrive as **plugins**, each a folder under `external/plugins/<id>/`. Manage them
from the operator console at **Plugins** (`/__app/plugins`) — the console's headline screen. The
model is deliberately simple and safe: **install/enable/disable/uninstall change only the
`external/plugins` tree on disk (or the folder `runway.plugins.root` names, when set — the loader and the
console always use the same one); nothing takes effect until you restart.** The DI context, security
chains, template resolvers, and MVC mappings are built once at boot; rebuilding them live is the
fragile path, so Runway does not hot-reload. A malformed, disabled, or blocked plugin is logged and
skipped, and a plugin that breaks the startup itself is quarantined and the platform relaunched without it
(below) — so a bad plugin costs you that plugin, not the platform ("degrade-don't-crash"). The exception is
the essential `protection` plugin, which fails closed instead (end of this section).
**Authority.** Every plugin **mutation** (upload, enable, disable, uninstall, restart) is a platform
operation reserved to the application **superadmin or a wildcard admin**; the read-only listing is
open to any signed-in operator.
**Install / upgrade.** On **Plugins**, use *Upload* to install a plugin package; upgrading is the
same action with a newer package. Uploading larger than 1 MB is fine — the platform accepts up to
256 MB (**§8**). Then click the **restart** action (or `systemctl restart runway`) to apply. Confirm:
the row's badge reads **Loaded** after the restart. Each file inside the package may unpack to at most
`runway.plugins.max-entry-bytes` (128 MiB by default; **Plugins → Settings**, applies after a restart): a guard
against a small archive that expands to fill the disk. A larger file stops the upload with *"Install failed: a zip
entry exceeds the per-entry limit of N bytes"* and nothing is installed. Raise it only for a plugin that really
ships a file that big. In `application.yml`, `0` or a negative value refuses every package that holds a non-empty
file.
A package whose `plugin.yml` says `id: protection` is
**refused** (*"… essential security-floor plugin; it is delivered with each Runway release by the installer"*):
the essential plugin is exempt from the plugin checks and cannot be disabled or removed from the console, and that
exemption goes by id — so the only copy Runway treats as essential is the one its installer lays down. To repair it,
copy `seed/plugins/protection/` from the Runway home over `external/plugins/protection/` or re-run the release's
installer (**§12**).
**A plugin's files per site.** A plugin can keep its own files in each site's folder (`sites/<site>/plugins/<plugin>/`).
Each file it writes or reads whole there may be at most `runway.plugins.site-files.max-write-bytes` (16 MiB by
default; **Plugins → Settings**, applies after a restart; `0` or a negative value means the default). Past it, that
one operation of the plugin fails with an error naming the key; what a visitor or site manager sees depends on the
plugin, and a failure the plugin does not handle shows up on its row as **Failures** (below) and in the log.
**Enable / disable / uninstall.** Use the row actions. *Disable* parks a plugin (it stays on disk but
won't load); *Enable* un-parks it; *Uninstall* removes its folder entirely. Each shows an
"— restart to apply" message and needs a restart to take effect.
**The drift banner and status badges.** Because changes apply on restart, the screen shows a
**restart-required** banner whenever the on-disk state differs from what is currently running. Each
row carries a badge (first match wins):
| Badge | Meaning |
|---|---|
| **Loaded** | Running this boot and the disk still wants it — steady state, no restart pending. |
| **Pending** | Drift — newly uploaded, re-enabled, or disabled/removed-but-still-running. Restart to apply. |
| **Blocked** | Well-formed and enabled, but Runway will not load it. The reason is printed in the row; blocking cascades to anything that requires it. The causes: an unmet `requires:` (target missing, disabled, wrong version, or itself blocked) or a `conflicts:` rival; an unmet **`requiresSpi:` floor** (the plugin needs a newer kernel SPI level than this Runway provides); a plugin **built for the pre-1.0 plugin contract** (no `requiresSpi:`, or one below `0.4.0`); a plugin that **uses Runway's internal classes** (it also carries the *Uses host internals* badge); a plugin that **breaks the rules for Runway's Spring context** (a servlet filter, a security chain, a bean named outside its own prefix); and a **quarantined** plugin, which broke a previous startup (*Retry* clears it — see *Plugin health and quarantine* below). |
| **Disabled** | The operator parked it (`enabled: false`) — it will not load. |
| **Malformed** | The folder is present but its `plugin.yml` is missing/unparsable/invalid, or its id ≠ folder name. The reason is shown. |
To clear a **Blocked** row, satisfy its requirement (install/enable/upgrade the target, remove the
conflicting plugin, or — for an SPI floor — upgrade Runway or install an earlier build of the plugin; for a
pre-1.0 or host-linked plugin, install the plugin's release made for Runway 1.0) and restart. A blocked plugin is
never a failed startup: the platform runs without it. The one exception is the essential **protection** plugin: if
it is installed but does not load, for any reason, tenant pages answer `503` until it is fixed (§12).
**The 1.0 plugin contract.** In Runway 1.0 the plugin contract is frozen (SPI `1.0.0`): a plugin is built
against `runway-spi` only and declares the SPI level it needs. A plugin built for the pre-1.0 contract is blocked
with the reason *"was built for the pre-1.0 plugin
contract"*; install the release made for 1.0. Code-less library plugins (`lucene-provider`) are
not affected.
**Plugin health and quarantine.** Each row also shows how the plugin is behaving in the
running platform, so a plugin that misbehaves is visible on this screen instead of only in the log:
- **Failures: N** — calls into the plugin that threw since the last restart (a widget, a `<head>` contributor,
a quality check, an endpoint, a content source, a lifecycle hook, a backup import, a scheduled task). Each was **contained**:
the page got an empty fragment instead (served `no-store`, so the gap is never cached), a quality check
became a warning that never blocks publishing, an endpoint answered `500`. *Details* shows the last error and
when it happened. The log has the full stack the first time per plugin and contribution, then at most one
line a minute with a count; the metric `runway.plugin.contribution.failures{plugin,axis,key}` counts them all
(§14). A few failures after a transient fault are harmless; a count that keeps rising is a plugin to update
or report.
- **Refused contribution** — something the plugin offered was refused at startup: a key or route that collides
with the kernel's or another plugin's (the later plugin loses; both are named in the log), or a route that is
not an exact tenant-realm path. The plugin's other contributions load.
- **Uses host internals** — the plugin was built against Runway's internal classes instead of the published
plugin contract (the SPI). Such a plugin is **Blocked** (the reason is in the row) and the badge
stays on it so the cause is visible at a glance; install its release made for Runway 1.0. The essential
`protection` plugin (it ships with the kernel) and a code-less plugin (`lucene-provider`) never carry it.
**Quarantine — a plugin that breaks the startup.** Some plugin faults happen while the platform is being
assembled, before any request — two beans with one name, a constructor that throws. Without a guard such a
plugin would stop the whole platform at every boot. Instead, when the failing bean belongs to a non-essential
plugin, Runway:
1. writes `external/plugin-quarantine/<id>.yml` (the plugin's version, a checksum of its jars, the reason and
the time) and logs an `ERROR` saying the plugin is **QUARANTINED**;
2. exits with code **42**, the relaunch code. The systemd unit relaunches on it (`RestartForceExitStatus=42`),
as does the launcher's detached mode; under a supervisor that does not, start it again by hand;
3. comes back up **without** the plugin: its row reads **Blocked — "quarantined: it broke the platform's
startup at … (reason)"**.
The platform is therefore down only for the length of one failed start plus the relaunch. To try the plugin
again, use **Retry** on its row (platform authority; journaled as `plugin.retried`) and restart: if it breaks
the startup again it is quarantined again and the platform comes back without it. Installing a different build
clears the quarantine by itself (the marker no longer matches the jars). A startup failure that cannot be pinned
on one plugin is an ordinary failed start (exit code 1, no marker) — a kernel fault is never hidden behind a
plugin — and the essential plugin is never quarantined: it fails closed instead (below).
**The SPI floor (`requiresSpi:`).** A plugin built against a newer SPI than the kernel it is dropped into does
not fail cleanly on its own: it loads, registers, and then throws `NoSuchMethodError` the first time the
affected path runs — possibly on a public page request long after startup, naming a method you have never
heard of. A descriptor may therefore declare a minimum SPI level (`requiresSpi: ">=1.0.0"`), and a kernel that
understands the key refuses that one plugin at startup with a reason naming both levels and which side to
move, while every other plugin boots normally. Only a minimum is accepted: a value that is not `>=X.Y.Z`
(a `<=` ceiling included) makes the plugin **Malformed** rather than quietly unprotected, because a floor that
fails open reads as protection that is not there. From SPI `1.0.0` a plugin with code **must** declare a floor of
at least `0.4.0`; a missing one marks a plugin built for the pre-1.0 contract (above).
**Application-level plugin settings.** A plugin can declare typed settings the platform renders as a
form; edit them from the plugin's *Settings* link (`/__app/plugins/{id}/settings`). Values are stored
per plugin in `external/plugin-settings/<id>.yml` — **not** in `application.yml` — and apply on
restart. Each public page's ETag folds every running plugin's app-level settings as the restarted application
bound them, so a setting that changes what a plugin renders (an analytics key that adds a script) reaches every
browser and CDN after the restart instead of being revalidated away as `304`. `secret`-typed values are stored encrypted (`ENC(...)`), which requires
`runway.security.secret-key` to be set (**§8**); until it is, secret settings can't be saved and the
form tells you so. (Per-*site* plugin settings are a separate, tenant-realm concern, edited in the
site console.)
**What the settings file may hold.** A save writes every setting the plugin declares and nothing else, so a key
you added to the file by hand that the plugin does not declare is **gone after the next save** of that form. When
the server starts it reads only files named for an installed plugin (`<plugin id>.yml`), and from each only the keys
under `runway.plugin.<id>.`; any other key is ignored with a `WARN` naming it. (These files rank above
`application.yml`, so without that limit a file meant for one plugin could set any server property.) A file of
another name in the folder — the protection plugin keeps its login panel in `protection-app.yml` — is a plugin's own
data, not configuration. The shape of a file is the one shown for protection in §12.4.
A blank secret field keeps the stored secret, **except** when the plugin binds that secret to
other settings (`secretBoundTo`, e.g. an SMTP password to host, port and username) and one of them changed in
the same save: then the stored secret is removed, the form asks for it again, and the log line and activity
entry name the cleared key (never its value). This stops anyone who may edit a form but not read the secret
from redirecting it to a server they control; it applies to per-site forms the same way.
A plugin may lay its forms out in sections with a help line under each field, collapse rarely needed
fields under **Advanced**, and hide fields until the switch they depend on is on (their values are kept).
Two things on the *site* forms depend on your app-level values, and both show what is **running**, not
what was saved since the last restart: a choice set to *inherit* says what it currently resolves to, and
a per-site switch that needs a platform switch you have off says so at the field.
**Essential (security-floor) plugins.** A small, code-defined set of plugin ids are treated as
**essential** — their failure to load puts the platform into **fail-closed degraded mode** rather
than booting open. Today that set is exactly **`protection`** (the abuse-defense plugin — **§12**). A
plugin cannot promote *itself* into this set: the descriptor's `essential: true` is advisory and
ignored (with a warning) for any id not on the kernel's list. If an essential plugin is missing or
fails to arm, the kernel serves **tenant hosts a `503`** while keeping the **application realm
reachable** so you can fix it. Ordinary (non-essential) plugin failures never do this — they are just
skipped.
Authoring plugins is covered in [PLUGIN-DEVELOPMENT.md](PLUGIN-DEVELOPMENT.md).
> **Bundled plugins.** The installer bundles the **essential `protection` plugin**, seeds it into
> `external/plugins/protection/` on a fresh install, and refreshes it on every upgrade — it moves in lockstep
> with the kernel (your settings, which live outside the folder, are never touched; the previous jar and
> descriptor are kept as `*.bak`, and template/i18n files you edited are backed up); see **§12** and **§15**. That is the only plugin shipped with the platform; every
> other plugin (search and search-lucene, for example) is installed
> separately, so `external/plugins/` otherwise starts empty.
### 11.1 The database plugins (PostgreSQL or MariaDB)
Runway keeps its own data — sites, pages, users, settings — on files, and that does not change. The **database
plugins** let *other plugins* keep their data in a database server: one per installation, PostgreSQL or MariaDB,
chosen in settings. Nothing uses them unless a plugin that needs a database is installed (the first one is the
`runway-demo-database` guestbook example).
| Plugin | What it is |
|---|---|
| `database` | The generic plugin: the connection pool, the settings, one schema per site, migrations, backups, the **Database** screen. Requires Runway 1.1.0 or later. |
| `database-postgresql` | The PostgreSQL provider: bundles the pgjdbc driver. PostgreSQL **14 or later**, database encoding `UTF8`. |
| `database-mariadb` | The MariaDB provider: bundles MariaDB Connector/J (LGPL-2.1; its unmodified sources are published next to the zip). MariaDB **10.11 or later**; MySQL is not supported. |
Install `database` and the provider for your server (installing both providers is harmless: the setting picks one),
then restart. A plugin that needs the database declares it, so without `database` it shows as **Blocked** with the
reason, and Runway runs normally.
**What Runway creates.** Every name starts with the **namespace** (setting `namespace`, default `rw`):
-`<ns>_app` — Runway's own registry tables (`rw_…`) and data that belongs to no site;
-`<ns>_s_<site>_<n>` — one per site, created the first time a plugin uses the database for that site. `<n>` is a
generation number that is never reused: a site that is deleted and created again under the same id gets a new
schema, never the old data.
On PostgreSQL these are **schemas** inside the database you name in the settings. On MariaDB, where a schema *is* a
database, they are **databases** next to the one you name, which only serves as the place to connect to and stays
empty. If several Runway installations share a server, give each its own namespace.
**Preparing the server.** The account needs to create and drop what it owns, and nothing more:
A MariaDB account without the pattern grant connects but cannot create the namespace's databases: the **Database**
screen stays at *Connecting* with an "Access denied" error until the grant exists.
**Settings** (**Plugins → database → Settings**, Runway-wide, applied on **restart**):
| Setting | Meaning |
|---|---|
| `provider` | `postgresql` or `mariadb`. |
| `host`, `port` | One server: a host name or an IP address (no lists, no options). A blank port means 5432 / 3306. |
| `database` | The database to connect to (see above). |
| `username`, `password` | The account. The password is stored encrypted. It is **bound** to provider, host, port, database, username, TLS and the CA certificate: change any of them without typing the password again and the stored password is removed, so it can never be sent to a server someone else chose. |
| `tls` | `verify-full` (default: encrypted, the certificate and the host name checked against the Java trust store or `caCertificate`), `require` (encrypted, the server **not** checked), `disable`. Use `disable` only for a database on the same host or a private network you trust. |
| `caCertificate` | Advanced. The PEM certificate of the CA that signed the server's certificate, when the Java trust store does not know it. |
| `namespace` | Advanced. Default `rw`; lower-case letters and digits, up to 12. Changing it later starts from empty schemas: the old ones stay on the server. |
| `poolMax` | Connections plugins may hold at once (default 10). One site may use at most half, so a busy site cannot starve the others. |
| `statementTimeoutSeconds` | A plugin's statement that runs longer is stopped (default 10). Migrations, backups and restores have their own 30-minute limit. |
| `backupBudgetMiB` | The compressed size a site's database data may reach in its backup (default 128). |
| `collation` | Advanced, MariaDB only: for plugins' tables. Blank means `utf8mb4_uca1400_ai_ci`. Runway's own identifier columns are always binary. |
**Runway never fails to start because of the database.** Nothing connects while Runway starts; the plugin connects
right after, on its own thread, retrying with back-off. Until it succeeds, plugins that need it say so (for example
the guestbook shows "This example needs the database …"), and everything else works.
**The Database screen** (**Settings → Database**, needs `CONFIGURE_PLATFORM`, which the master and wildcard
administrators hold) shows:
- the status: *Connected*, *Connecting* (with the last error), *Not configured* (with the setting at fault), *No
provider*, or *Server not supported*; the provider, server version, driver, pool use and the number of sites with
data;
- **Test running connection** (the live pool) and **Test these settings** (typed values, one throwaway connection,
nothing saved). Answers are fixed categories — unreachable, TLS failure, authentication failed, database missing or
no access, unsupported server — and the driver's own message goes only to the server log, never with a password.
A blank password in the test reuses the saved one only for exactly the same provider, server, database, account and
TLS settings;
- **Plugin tables needing attention**, with recovery actions (below);
- the plugins using the database, the nodes seen in the last five minutes, the largest site backup against the
budget (a warning from 75%), and the last failed restore.
Each site's dashboard shows one line: whether the site keeps data in the database, its size, and the last database
restore.
**Plugin tables needing attention.** Each plugin brings its tables up to date by itself the first time it uses a
schema (its *migrations*). If that cannot happen, only *that plugin* in *that schema* stops — other plugins and other
sites carry on — and the screen lists the case:
| Problem | Meaning | Action |
|---|---|---|
| Script failed | A migration script stopped at a statement (the detail names it). On PostgreSQL nothing of it was kept, nor of the plugin's other scripts that ran with it (the detail lists them); on MariaDB the statements before it were. | Fix the cause (often a permission, or data the script did not expect), then **Retry**. On MariaDB it continues from the failed statement; on PostgreSQL it runs the whole script again, and the scripts rolled back with it, so do not run part of it by hand first. **Mark applied** only if you completed the script by hand, on PostgreSQL every script the detail lists. If the detail says a script *was never applied* although a later one was, apply it by hand and **Mark applied** (**Retry** cannot run it), or restore the schema. |
| Script changed | A script already applied is no longer the one the installed plugin ships. Released scripts must not change: report it to the plugin's author. | **Accept shipped checksum** once you know the change is harmless. |
| Newer than installed | The schema was migrated by a newer version of the plugin (a downgrade, or nodes on different versions), or data a restore kept for the plugin (when it was not installed) is from a newer version. | Install that version or later; kept data then loads on the plugin's first use. |
| Kept data cannot be loaded | A restore kept data for a plugin that was not installed then (in `deferred/<plugin>/` in the site's folder), and it cannot be read now, or the plugin's tables are already past its version. The plugin is refused on that site rather than started empty. | Fix the cause the detail names (often the folder's permissions) and the next use loads it. To go on without that data, remove `deferred/<plugin>/` from the site's folder, or restore the backup again. |
Every recovery action is written to the server log with the operator's name.
**Clusters.** Every node needs the same `external/plugin-settings/database.yml` and the same platform secret key
(`runway.security.secret-key`), because the password is stored encrypted with it. The database is shared, so a site
deleted on one node has its schema dropped once, by that node. To change the server or the provider, stop **every**
node first.
**Backups and restore.**
- A site's **full backup** carries its database data (every plugin's tables in that site's schema), in a portable
format: a backup taken on PostgreSQL restores on MariaDB and the other way round. If the database is unreachable
when a backup runs, the backup **fails** and names the site — a backup is complete or it is not a backup.
- A **transfer copy** of a site carries **no** database data, and the copy gets its own, empty schema. Plugins are
asked to keep in the database only data that a transfer may leave behind (visitors' entries, caches); content
that must travel stays in files.
- A restore builds the data in a **new** schema next to the live one and switches the site to it only when
everything is loaded; the old schema is dropped later by a cleanup that runs every 15 minutes and waits until it
has been retired for at least 10. If anything fails, the new schema is
dropped, **the previous data stays live**, and the failure shows on the **Database** screen and the site's dashboard
("Last database restore"). The site's files are restored either way.
- A restore is refused when an installed plugin is **older** than the backup's data (upgrade it first). Data of a
plugin that is **not installed** is kept in the site's folder and loaded when that plugin is installed, at the
backup's version or later; an older one is refused with "newer than the installed plugin" and the data waits.
- The backup budget (`backupBudgetMiB`) caps a site's database data in one backup; above it, the backup fails with a
message, and you back that data up with the database's own tools.
-`<ns>_app` (Runway-wide data) is in **no** site backup. Back it up with the database's own tools (`pg_dump -n
rw_app`, `mariadb-dump rw_app`). The **Database** screen names the plugins that keep data there.
**Moving to another server or provider.** Take a full backup of each site, change the settings, restart, then
restore each site. Runway-wide data (`<ns>_app`) does not move this way: copy it with the database's tools if a
plugin keeps data there.
**Removing.** Uninstalling the database plugins leaves the schemas on the server. Drop them there (every name starts
with the namespace) once you no longer need the data.
outside the folder and are never touched. There is no supported opt-out: setting `enabled: false` in its
`plugin.yml` counts as a broken floor (`503`) and the next upgrade puts the shipped descriptor back, and removing the
folder runs the sites without abuse defense until the next installer run seeds it again.
**Where each part is set.**
| What | Where | Applies |
|---|---|---|
| Rate limit (burst capacity, refill per second), auto-block (on/off, threshold, window, duration), exemptions (allowlist), remember-this-device | **Plugins → Essential Protection → Settings** (`/__app/plugins/protection/settings`), each field with its help line; stored in `external/plugin-settings/protection.yml` | after a restart |
| Operator login: honeypot, lockout (attempts, window, lockout time), CAPTCHA (provider, keys, score) | the **Login protection** panel below those settings; stored in `external/plugin-settings/protection-app.yml` | at once |
| Manual blocks (an IP or CIDR, for a time or indefinitely) and the live auto-blocks | **Activity → DoS activity** (`/__app/dos`) | at once |
| A site's own login: honeypot and CAPTCHA | that site's console, **Settings → Essential Protection** (`/__admin/protection`); the operator can force a site's CAPTCHA off from **Sites** | at once |
The lockout thresholds on the Login protection panel count failed logins **per IP across every login**, the
operator's and every site's. The rate limit and auto-block run before the site is known, so they are one
policy for the whole server. A refill of 0 is refused (it would never let an address recover). The
`runway.plugin.protection.login.*` properties only seed a fresh install; once the panel has been saved, the
panel's values apply and the log says so at startup if those properties are still set. Who can open these:
the master, a wildcard admin, or an operator granted **Configure protection** (`protection|settings`).
**Rate limit and auto-block, in detail.** Each field's range and default is in
[SETTINGS-REFERENCE.md](SETTINGS-REFERENCE.md) (essential protection plugin); this is how they work together. Every
client address gets a bucket that holds `rate-limit.capacity` requests (default 120) and refills at
`rate-limit.refill-per-second` (default 2; decimals are allowed). Each request takes one. A request that finds the
bucket empty is answered `429` with `Retry-After: 1`. So by default an address can send 120 requests at once and then
keep up 2 a second for as long as it likes. While `rate-limit.auto-block.enabled` is on (the default), every such
`429` is also counted: an address that collects `auto-block.breach-threshold` of them (default 60) within
`auto-block.window-seconds` (default 60) is blocked for `auto-block.block-seconds` (default 900), and gets `429` with
the remaining time in `Retry-After` until the block ends. Turned off, an address over the limit only ever gets `429`s
and is never blocked automatically. Auto-blocks live in memory: they end on their own, and a restart clears them.
These keys (all under `runway.plugin.protection.`) are read at startup, so a change applies after a restart; the form
marks a saved value as pending until then. The form refuses a value outside its range. A value written into
`protection.yml` by hand is not checked; the plugin corrects only these:
| Key, set by hand | 0 or a negative value |
|---|---|
| `rate-limit.capacity` | works as 1. |
| `rate-limit.refill-per-second` | works as 0: an address that has spent its burst never gets requests back. This is why the form refuses it. |
| `rate-limit.auto-block.breach-threshold` | works as 1 (the first `429` blocks). |
| `rate-limit.auto-block.window-seconds`, `rate-limit.auto-block.block-seconds` | works as 1 second. So every auto-block has an end. |
| `remember-device.days` | works as 1; a value above 365 works as 365. |
Other values above the form's range are used as written.
**There is no `blocklist` key.** `runway.plugin.protection.blocklist` is read by nothing: an address listed there is
not blocked. The settings page lists such a key under "The file has keys this plugin no longer declares", and the next
save of the form removes it. Block an address on **DoS activity** instead.
**Blocking an address by hand (Activity → DoS activity).** The **Block an address** form takes an IP or a CIDR
(required), a reason (optional; shown in the list, "manual" when blank) and a duration in seconds (default 900; `0`
blocks it until you unblock it). It refuses your own address (as the server sees it) and any address on loopback or on the
allowlist. It does not refuse a CIDR that contains your address, so check a range before you block it: blocking one
that holds your own address locks you out of the console too. A loopback or allowlisted address is never blocked,
even inside a blocked range. A manual block applies at once and answers `403` with no
`Retry-After`: there is no honest time to offer. **Unblock** on its row lifts it. Manual blocks are kept in
`external/blocklist.yml` and survive a restart:
```yaml
entries:
- ip: "203.0.113.7" # an IP or a CIDR
reason: "scraper"
untilEpochSeconds: 0 # 0 = until unblocked; otherwise the Unix time (seconds) the block ends
```
The file is read only at startup. Every manual block or unblock on the screen, and a manual block running out,
rewrites it from what is in memory. So a hand edit needs a restart, and one made while the service runs is lost at
the next such change. Entries
whose end time has passed are dropped when the file is read. The screen also lists the busiest rate-limited addresses
and the blocks that ended since the last restart (the newest 100, in memory only).
**The Login protection panel, field by field.** It governs the operator sign-in. The panel's first save creates
`external/plugin-settings/protection-app.yml`; the file keys are below.
| Field | File key | Values | What it does |
|---|---|---|---|
| Enable the hidden honeypot field | `honeypotEnabled` | on (default) / off | Adds a hidden field a person never sees or fills. A sign-in that fills it is refused with the ordinary "Invalid username or password", so a bot cannot tell why, and it counts as a failed attempt. It also guards the **Forgot your password?** form (without counting toward the lockout there). |
| Max attempts | `maxAttempts` | whole number; default 5 | Failed sign-ins from one address, within the window, that lock it. A wrong password, the honeypot and a failed CAPTCHA all count. |
| Window (seconds) | `windowSeconds` | default 300 | How far back failures are counted. |
| Lockout (seconds) | `lockoutSeconds` | default 900 | How long the address is then refused, even with the right password; the sign-in page comes back saying there were too many failed attempts from that network and to wait a few minutes. A successful sign-in clears the address's count. |
| Require a CAPTCHA challenge | `captcha.enabled` | on / off (default) | Asks for a Google reCAPTCHA on the operator sign-in and on its **Forgot your password?** form. It is asked only when this is on **and** both keys are set; with a key blank it does nothing. |
| Provider | `captcha.provider` | `recaptcha-v2` (default; the "I'm not a robot" box) / `recaptcha-v3` (invisible, scored) | Must match the type you registered the keys for. Any other value in the file (blank or a typo) is treated as `recaptcha-v2`. |
| Site key (public) | `captcha.siteKey` | from the reCAPTCHA admin console | Put into the sign-in page. Register every host name you open the console on with the key, or the challenge cannot be solved there (§12.3). |
| Secret key | `captcha.secretKey` | from the reCAPTCHA admin console; stored as `ENC(...)` | Used only on the server, to check the answer with Google. A blank field keeps the stored secret, so the panel cannot empty it: turn the CAPTCHA off instead. Saving a secret needs `runway.security.secret-key` (§8); without it the save is refused with a message and nothing changes. If the stored secret cannot be decrypted any more (that key was changed), the CAPTCHA counts as not configured and is not asked; the log warns. |
| Score threshold (reCAPTCHA v3) | `captcha.scoreThreshold` | 0.0 to 1.0; default 0.5 | v3 only: a response scoring below it is refused. Higher is stricter. The field takes 0 to 1, and left empty it saves 0.5. The server does not check the range: a value above 1 written by hand refuses every v3 sign-in, and one below 0 refuses none for its score. |
If Max attempts, Window or Lockout is left empty on the panel, or is 0 or below in the file (set by hand), its
default applies (5, 300 or 900). If Google cannot be reached, or
answers with an error status, the challenge is let through and a warning is logged: a provider outage must not lock
everyone out, and the honeypot and lockout still apply. The panel applies at once. Editing `protection-app.yml` by
hand needs a restart (it is read at startup), and the next save on the panel replaces it; the break-glass in §12.3
relies on exactly that.
**The `runway.plugin.protection.login.*` properties seed a fresh install only.** Until the panel has been saved once,
there is no `protection-app.yml`, and the operator sign-in uses these properties, read at startup:
`/opt/runway` is the release the service runs, so its `seed/` is always the matching copy — after a rollback too,
when it is the older release's plugin (the same files as the `.bak` pair, §15). Re-running the running release's
installer does the same and keeps the previous files as `*.bak` — `sudo ./runway-<version>.bin -y`. One case needs
the `.bin` instead, because `/opt/runway/seed/` is not the running release's: a kernel jar replaced by hand (`seed/` is still the
earlier release's). Extract the running release (`./runway-<version>.bin --extract DIR`) and copy
`DIR/runway-<version>/seed/plugins/protection/` over `/opt/runway-data/external/plugins/protection/` the same way. A hand copy does not update the
installer's record of what it laid down (`external/plugin-manifests/protection.sha256`), so the next upgrade may
back up a template or i18n file you never edited, with a warning; the backup is safe to delete. **Confirm** the
copy with the two `cmp` lines in §15 *Verify the upgrade*, not with the version on **Plugins**: a hand-copied or
partially restored folder shows the same version as the release's own copy.
**Request bodies before sign-in (kernel, always on).** A visitor who is not signed in can make the server read at
most **`runway.endpoints.max-form-bytes`** (256 KiB by default) of request body, on every path: the sign-in forms
of both realms, `/setup`, the password-recovery forms, the CSP report endpoint, any console path, and every plugin
route. A larger body is answered **`413`**, and a declared length over the cap is refused without reading it.
Signed-in users keep the larger limits their work needs: up to 16 MiB for a console form (the Messages editor can
post a whole site's message grid) and `runway.endpoints.max-body-bytes` (10 MiB) for a plugin route. "Signed in"
means signed in now: the account is re-checked first, so the open session of a user you suspend or delete (or whose
password was changed) is held to the cap from its next request on. *Why:* without the cap
any visitor could make the server parse a 16 MiB form before the `403` (the CSRF check reads the form
first), and a plugin route read 10 MiB before its handler decided access. The kernel's own anonymous forms are under
a kilobyte, so the cap never touches them; raise it only for a plugin whose public forms carry more. The log line
`… refused before sign-in: the body … over the N-byte cap` names each refusal. **One exception:** a
`multipart/form-data` upload to a kernel path is parsed before security — streamed to temporary files, not held in
memory — under `spring.servlet.multipart.max-request-size` (256 MB, sized for a backup restore upload); it is bounded,
but not by this cap.
**Bandwidth quota (kernel, active now).** Independent of that plugin, you can cap a site's **outbound**
traffic over a rolling 30 days. There are two levels, and `0` means no cap at either:
| Level | Where you set it | Applies |
|---|---|---|
| The platform default | **Bandwidth → Settings**, field "Monthly cap per site (bytes)"; key `runway.bandwidth.quota.default-monthly-bytes` | after a restart |
| One site's own cap | **Sites → Edit** on that site's row, field "Monthly bandwidth cap": a size such as `50GB` or `500MB`, `0` for no cap, empty for the platform default | at once |
The row on Sites shows each site's cap and where it comes from ("this site", "platform default" or "set on the
server"), and the site's own **Bandwidth** screen shows it to the site manager, read-only, with a warning while the
site is over it. A site's cap is stored in `external/platform.yml` (`siteQuotas:`), never in the site's folder, so it
does not travel in a site backup, and it is removed when the site is deleted. Units are base-1024 (`1GB` = 1024³
bytes), as on the Bandwidth screen.
You can also set either level in the host's `application.yml`; a value there wins, and the console shows that field
per-site: # per-site caps (bytes; 0 = unlimited); use [brackets] for ids with dots
acme: 10737418240 # 10 GiB / 30 days for site "acme"
```
When a site's last-30-day served bytes exceed its cap, its **public** traffic returns `503` with a `Retry-After`,
while `/__admin`, `/login` and the application realm stay reachable, so neither the site manager nor you are locked
out. It is **operator-set only** (a site cannot raise its own cap) and evaluated in O(1) per request: a cached
decision recomputed on the metering cadence (once a minute by default) and right away when you change a site's cap on
Sites, so raising a cap reopens a blocked site immediately. This throttles application-layer egress abuse; it is
**not** a volumetric/network defense — that stays upstream at the proxy/edge.
### 12.1 Per-site health probe (`runway.health.*`)
Each tenant host serves `/__health`, a cheap per-site liveness probe (see `OPERATIONS.md` §2). Settings:
| Key | Default | What it does |
|---|---|---|
| `runway.health.enabled` | `true` | Serve the probe at all. |
| `runway.health.token` | *(blank)* | Bearer token unlocking the **detail** body (cause, site id, checks). Unset = detail disabled. **A secret** — set it on Settings → Server settings (stored encrypted) or in the external `application.yml` (already `600`). A blank console field keeps a stored token; §8.5 says how to remove one. A wrong/absent token silently returns the public body, never a `401`. |
| `runway.health.content-check` | `true` | Also verify the site can render (home page routable + `_master.html` present), so the probe cannot report green for a site whose every request 500s. |
| `runway.health.content-check-ttl-seconds` | `10` | How long a content result is reused before re-checking. Evicted immediately on a site change. `0` or a negative value (possible only in `application.yml`) means `10`. |
The **path is fixed and not configurable** — a configurable path could not be reserved against tenant content, and
a kernel path a tenant can occupy is a defect, not a convention.
### 12.2 Site reload without a restart (`runway.reload.*`)
Per-site state is read through snapshot caches invalidated when the *platform* writes a site. Editing
`sites/<id>/site.yml`, a per-site plugin config, or dropping in icon files **out of band** therefore changes
nothing until the caches are refreshed — silently. `POST /__reload/site/<id>` refreshes them without a restart.
What a reload re-reads: the site record and its host routing, per-site plugin settings, SEO, icons and the web
manifest, template parameters (`params.yml`), widget-instance config (`widget-instances.yml`), messages, users and
permissions, documents — and the site's **parsed templates** (its pages, `_master` and fragments). Template files
(`.html`, `.th.xml`, `.meta.yml` — pages, masters and fragments alike) and message bundles
(`i18n/messages*.properties`) edited on disk need no reload — they show on the next request by themselves
(Operations §5.2); the reload evicts them anyway, so "reload this site" after editing its files never leaves a
doubt.
**The rule of thumb: content is live, configuration applies at the reload.** Templates (pages, masters, fragments)
and messages edited on disk are served on the next request. Configuration — `site.yml`, `seo.yml`, `manifest.yml`,
icons, `params.yml`, `widget-instances.yml` and `plugins/<plugin>.yml` — applies when you save it in the console or
reload the site, and **not before**: until then the site keeps serving the configuration it has loaded, *and its
pages keep their ETags*. Each public page's ETag folds every one of these inputs — its own files, every template of
the site that is not a page (a fragment edit moves every page's ETag), the messages, the loaded configuration above,
and what its links to other pages and content are built from — so it moves at the moment a change takes effect,
together with the page: a browser or CDN that revalidates gets the new page then, and never a new ETag on the old
page (which it would otherwise keep, revalidating it to `304`). Content a **plugin** serves follows that plugin's own
rules. *Why not make configuration live
too:* a `site.yml` edit changes host routing, locales and caches that only a reload rebuilds consistently; applying
half of it on the next request would be a site in two states at once. Only that site's templates are evicted; other
sites keep their warm cache. `POST /__reload/sites` does the same for every site. In a cluster the reload is relayed to every node.
*Two things the ETag does not do.* A page with a content widget requested **with a query string** (the search
plugin's `?q=` results) carries no ETag at all and is sent `Cache-Control: private,
no-cache`: the widget may answer from data the kernel cannot see (a search index), so it is rendered fresh every
time. And public pages send no `Last-Modified`: a date could not move with configuration, so `If-Modified-Since`
alone never answers `304`.
*"Not before" holds while the site's configuration stays cached.* The per-site configuration caches are bounded —
512 sites for SEO, manifest, icons and template parameters, 256 for widget-instance config, and 512 (site, plugin)
pairs for per-site plugin settings (reached at 74 sites when seven running plugins declare `siteSettings:`).
Past that, an entry evicted for room is re-read from disk on the next request, so on a node with more sites than that
a hand edit can apply before the reload, at a moment you do not choose. It is still consistent — the ETag folds the
value as loaded, so page and ETag move together — but if you rely on "edit now, reload later", edit in the console or
keep such nodes below those sizes.
| Key | Default | What it does |
|---|---|---|
| `runway.reload.enabled` | `true` | Master switch. Still inert until a token is set. |
| `runway.reload.token` | *(blank)* | Bearer token. **Blank ⇒ the endpoint answers `404`** — absent, not merely locked. **A secret**: set it in the external `application.yml` (already `600`). |
Three gates, in order: **inert unless configured** (`404`), **loopback only** (`404` — no firewall rule, no ACL,
no exposure decision), then a **constant-time token compare** (`403` on a wrong token — unlike the read-only
health probe, this endpoint mutates, so it fails loudly rather than appearing to succeed).
Chosen as a token endpoint rather than a CLI verb or a signal deliberately: it needs nothing from the host's
privilege model, so it works for an operator whose steady state is scoped file access with no console
credentials. Arming it costs one restart; after that, reloads are restart-free.
> **⚠ If a reverse proxy fronts this instance, set `runway.proxy.trusted-cidrs`.** The loopback gate reads the
> client address *as resolved by the trusted-proxy filter*. When `trusted-cidrs` is empty that filter leaves the
> raw TCP peer address in place — which is correct for a directly-exposed instance, but a proxy configured to
> originate upstream connections from loopback (HAProxy's `source 127.0.0.1`) makes **every** proxied request
> arrive from `127.0.0.1`. The gate would then admit internet traffic, leaving only the bearer token in front of
> the endpoint. Set `trusted-cidrs` to the proxy's address so the real client is resolved — or block `/__reload`
> at the proxy, or leave `runway.reload.token` blank to keep the endpoint absent. The app logs a warning at
> start-up whenever the endpoint is armed and `trusted-cidrs` is empty.
### 12.3 Recovering from a CAPTCHA lock-out
CAPTCHA is the one login defense a *misconfiguration* can lock you out with: an invalid site key, a key whose
registered domains don't include the host you browse, or a reCAPTCHA **v3** score threshold set too high renders a
challenge that can never be solved, so the login it guards can no longer succeed. There are two recovery paths, by
which realm is affected — and neither loses the configured keys.
> **Prefer reCAPTCHA v2 (the checkbox) over reCAPTCHA v3.** v3 has no checkbox — it silently assigns each request
> a 0–1 *score* and Runway rejects anything below the configured threshold (default 0.5). A key whose registered
> domains don't include the host you actually browse (e.g. a reverse-proxy hostname), or a fresh key with no
> traffic reputation, scores low and gets rejected even for a real person — a self-inflicted lock-out that looks
> like a bug. reCAPTCHA **v2** is binary pass/fail and far more predictable, especially on low-traffic or
> development hosts. (**Google reCAPTCHA is the only CAPTCHA provider**; Runway auto-allowlists reCAPTCHA's domains in its CSP, so a blocked-widget CSP error is
> not a factor. The score gate remains a v3 property.)
- **A site locked itself out (a site manager's broken CAPTCHA).** You (the operator) rescue it from the
application **Sites** screen (`/__app/sites`): any site with login CAPTCHA switched on shows a **Disable
CAPTCHA** action. Clicking it turns *that site's* login CAPTCHA off so its manager can sign in again and fix
the keys. It is **non-destructive** — the site's provider and keys are preserved (the secret stays encrypted),
so the manager can correct and re-enable them — **master/wildcard-gated**, recorded in the activity log, and
applies immediately (no restart). It does not touch the honeypot, the app-scope lockout, or the IP blocklist
(those are already operator-managed at `/__app/dos`).
- **You locked yourself out of the application console (a broken *app-login* CAPTCHA).** There is no higher
console to rescue the application realm from, so recovery is a **break-glass on the server** (you have
filesystem access to the deployment): edit the app-scope protection file
`external/plugin-settings/protection-app.yml` and set the CAPTCHA off —
```yaml
captcha:
enabled: false
```
then restart the service (`systemctl restart runway`). The app login stops enforcing CAPTCHA on the next boot;
sign in, correct the keys on the app protection panel, and re-enable it. Your provider and keys in that file are
untouched. (This is why it is worth verifying a new CAPTCHA site/secret pair against its provider **before**
turning it on for the application login.)
**Validated under load.** In a defense test, a single-IP flood offering **~11,700 req/s (2.45 M requests over
3.5 min)** was **~100 % shed** — only ~120 requests reached the app, which stayed **near-idle (~8 % CPU)**, kept
serving legitimate traffic, and emitted **no `5xx`** (excess was rejected/`429`-ed, not errored); both the edge and
the app recovered immediately. The layered floor did it: an upstream proxy's per-IP connection/request rate-limit
in front of the plugin's per-IP token-bucket (default **capacity 120, refill 2/s** — strict and effective at these
rates). **Note for the proxy layer:** if you rate-limit per source IP at the proxy (recommended), make the
stick-table **dual-stack** (e.g. HAProxy `type ipv6`, which also stores IPv4 as `::ffff:`-mapped keys) — an
IPv4-only table silently lets an IPv6 flood past the proxy tier onto the app's token-bucket alone.
### 12.4 Exempting your own high-volume clients
| Key | Default | What it does |
|---|---|---|
| `runway.plugin.protection.allowlist` | *(empty)* | CIDRs (or bare IPs) the abuse floor never throttles and never auto-blocks. **Loopback is not exempt from the rate limit unless you list it** (it is only never *blocked*): behind a same-host reverse proxy whose forwarded address is not trusted, every request arrives from `127.0.0.1`, and an automatic exemption would switch the limit off for everyone. List `127.0.0.1/32` only for a same-host probe that must never see a `429`, knowing that it then exempts anything arriving from loopback. |
Set it on **Plugins → Essential Protection → Settings**, section **Exemptions** (one entry per line, or separated by
commas), or in the file below; either way it applies **after a restart**. An entry that is not a valid IP or CIDR is
skipped without a warning, so check each one. An address on this list also cannot be blocked by hand: the
**DoS activity** screen refuses it (§12).
**Set this before you point any audit, prober, load test or first-party crawler at your own site.** The
floor cannot tell a legitimate high-volume client from an abusive one, and the auto-escalation fires with no
human in the loop: 60 breaches in 60 s earns a 900-second block. An SEO audit run against your own site can
lock the auditing IP out for fifteen minutes and report failures and warnings that are
**every one a `429` rather than a real defect** — even from a clean deployment, where it reads like a
> **If you are blocked, stop — do not keep probing.** Once an address is auto-blocked, requests no longer
> reach the rate limiter at all; they hit the blocklist. So the `rate-limit` counter freezes while
> `blocklist-auto` keeps climbing, and continued probing simply confirms the block rather than measuring it.
> Wait out `block-seconds`, or restart the service (auto-blocks are in-memory and clear on restart; manual
> operator blocks are persisted and do not).
### 12.5 Edge-rejection visibility
| Key | Default | What it does |
|---|---|---|
| `runway.protect.log-rejections` | `true` | Write a line to the `runway.protect` logger for each edge `403`/`429`. Before this existed a rejection appeared in **no** log at all — it short-circuits outside the access log. Turn it off only if you collect rejections elsewhere; the metric keeps counting either way. |
| `runway.protect.log-rejection-window-seconds` | `60` | Suppress repeat lines for the same *(client IP, reason)* pair for this long. A flood guard, not a preference: logging every rejection lets a flood the limiter absorbs in O(1) become an unbounded stream of disk writes. Suppressed rejections are counted and reported on the next line for that pair. |
| `runway.logs.access-log-user-agent` | `false` | Append the `User-Agent` to each public access-log line. Off by default because that log is one line per request, and an upgrade should not silently change the size or shape of an operator's log stream. Edge-rejection lines always carry the agent regardless — those are rare and undiagnosable without it. |
The two `runway.protect.*` keys are on **Settings → Server settings**, group **Protection logging** (or in
`external/application.yml`, which wins), and apply after a restart. The form takes a window of 1 to 86400 seconds; a
value of 0 or below set by hand works as 1 second. The rejection lines are written at `WARN`, so the logger's level is
a second switch over the same lines: setting the `runway.protect` logger to `ERROR` (or `OFF`) silences them too,
either on **Activity → Logs → Log levels** (at once, and kept across restarts) or with
`logging.level.runway.protect: ERROR` in `external/application.yml` (after a restart). Prefer
`runway.protect.log-rejections: false` for that, so there is one place to look; leave the level alone otherwise, or
the lines vanish while the setting still says they are written.
Both agent values are sanitised and truncated before they reach a log line: a `User-Agent` is untrusted client
input, and a raw newline in one fabricates what reads as a separate, trustworthy log entry.
`runway_edge_rejections_total` is registered **at zero for every outcome the active guard can produce** when
the process starts, so it is in the scrape from the first second and a dashboard reads `0` rather than
"No data".
See `OPERATIONS.md` §3.1 for how to read the output — including which status each rejection reason answers
with (auto-blocks are `429` + `Retry-After`, operator bans are `403`) — and `monitoring/README.md` for
`runway_edge_rejections_total`.
## 13. Backups & restore
Each site is backed up as a **complete, self-contained `.zip`** — its data, presentation
(templates and static assets), configuration (users, roles, permissions, per-plugin settings),
and any plugin-generated per-tenant data. Because a backup is complete, it restores on the same or
any later platform version and renders identically; it is also a site's **portable copy**.
**Who takes them.** In this release backups are a **per-tenant (site-manager) feature**, on the
tenant console (**Backups**, `/__admin/backups`), for the site's own data only:
| Who | Save on the server / list / delete | Download a transfer copy | Download a **full** backup (fresh or saved) | Restore |
|---|---|---|---|---|
| Site superadmin, or the *Administrator* (`ADMIN`) tier | yes | yes | yes | yes |
| A user **granted** *Manage backups* (`MANAGE_BACKUPS`) | yes | yes | **no — `403`** | no — `403` |
| Anyone else | no | no | no | no |
A full backup is complete by design, so it carries every account's Argon2id password hash and the site's
`ENC(...)` plugin secrets; a delegated holder could otherwise take those off the server. The screen hides the full-download buttons from a delegated
holder and explains why; the routes answer `403` regardless. A backup the holder saves on the server stays
there for an administrator — or the platform operator, on `/__app/backups` — to download or restore. See the
*Site Manager & Designer Guide* §12 for the end-user workflow.
**Pending editorial work travels with the site.** On a site whose manager has turned on review
(*Site Manager & Designer Guide* §10), changes waiting for approval are kept beside their pages under
`sites/<id>/templates/.pending/<slug>/`. They are site content, never served, listed or indexed: a backup
carries them, a restore brings them back with their pages, and a site created from a backup keeps its
editorial level (the `editorial:` key of `site.yml`). A **transfer copy leaves the whole `.pending` folder out**
(below): each review record names site accounts and carries the reviewer's note, and the drafts are
unpublished work — not something to hand to a third party.
**Operator backups.** The platform operator has an application-realm counterpart at
**`/__app/backups`** (superadmin-gated): back up, download and restore **any** site, and — the
inverse of restore — **create a new site from an uploaded backup** (give it a new id, name and
hosts; the content comes from the archive). Because a backup carries a site's users and hashes,
this screen is superadmin-only, and the download of another site's backup is a privileged action.
**Creating a site from a backup, in detail.** The **new id** follows the site-id rule (§10) and must be free. A
blank **name** keeps the name in the archive. **Hosts** are separated by commas or spaces and checked like any
site's: a malformed host, or one another site answers on, is refused before anything is created, and the page says
*"Those hosts cannot be used:"* followed by the reason. Empty hosts are allowed (the site is
then reachable only as the catch-all default). Everything else comes from the archive: the languages, the base URL
(set it again in **Edit hosts** if it named the old site's host), the editorial level, the content, and the site's
own users with their password hashes and permissions. The new site starts **active**. Its **superadmins** do not
come with it: they live in `external/site-users.yml`, outside the site folder, so assign one on **Site master
users** (§10) — until then only the site's own users (and a superadmin assigned `"*"`, §10) can manage the new site.
**Backup vs transfer copy — two different files.** A backup must be complete or it is not a backup, which
means it carries the site's user accounts (with their password hashes), its per-plugin credentials, and the
hostnames it answers on. That is exactly what you want for recovery and exactly what you must not hand to
anyone else.
Both consoles therefore offer a second action, **transfer copy** (`/__admin/backups/download-transfer` and
`/__app/backups/<siteId>/download-transfer`). It produces the same archive format, restorable the same way,
with:
- `users.yml` and `permissions.yml` **omitted** — accounts, hashes and grants;
- traffic history (`stats/bandwidth.csv`) and logs — absent, as from **every** backup: they are transient
per-site data that no backup carries;
- every per-site plugin value that is **declared** secret, stored `ENC(...)`, or **named** like a credential
(`secret`, `password`, `passwd`, `token`, `credential`, `apiKey`, `privateKey`) — **blanked** at any depth,
including inside nested maps and lists, and kept as an empty key so the recipient sees what to fill in;
- `site.yml` hostnames and base URL replaced with a reserved `<siteId>.example.com` placeholder;
- **participant exports skipped** — a plugin's out-of-folder state, which is either regenerable (a search
index) or personal data that must not travel;
- **plugin personal data omitted** — every file a plugin declares as personal in its
`plugin.yml` (`siteData.personal`: the search terms visitors typed, …), and the
**whole** `plugins/<id>/` folder of any plugin that is not installed and loaded when the copy is made. The second
rule is the fail-safe one: without a loaded plugin's declaration nobody can tell what in its folder is personal,
so none of it travels;
- **pending editorial work omitted** — the whole `templates/.pending/` folder: the
unpublished revisions waiting for review and their `review.yml` records, which name the accounts that
submitted and returned them (often email addresses) and the reviewer's free-text note. The recipient gets the
site as published. The archive's `manifest.yml` lists every omission under `omitted:`, and the site's
**Backups** screen shows, under the transfer button, what a copy made now would leave out. Restoring a transfer
copy works as before: the omitted files are simply absent, and every plugin treats an absent file as empty.
A **full backup keeps everything**, personal data included — it is for recovering this site, and a backup that
silently dropped submissions would not restore the site you had. Treat backup files accordingly. Note also that
the *settings* files (`plugins/<id>.yml`) keep the secret-blanking rule above, so a non-secret setting such as a
recipient address still travels; only the declared data files are left out.
**Four independent nets, because any one of them misses.** A declared `siteSettings` schema is the most
precise, but it only helps for plugins that use the generic settings form — the bundled **protection** plugin
declares no schema and persists its own nested record, so declaration alone covered none of it. `ENC(...)` is
self-identifying and needs no schema. The **name** net covers a plugin that stores a secret in plaintext and
declares nothing, which neither of the others can see. And all three run **at every depth**, because a
top-level-only walk would copy the protection plugin's encrypted CAPTCHA secret through
verbatim.
A bare `key` is deliberately **not** a secret-name: a CAPTCHA *site* key is public — it ships in the page
markup — and blanking a working setting is its own kind of harm. It is still origin-bound and useless to the
recipient, so a transfer copy is *safe to send*, not *ready to run*: the recipient supplies their own keys.
Every blanked path is written to the log at `INFO` when the archive is produced, so what the sanitiser did —
and by implication what it did not — is visible to whoever is about to hand the file over.
The archive's `manifest.yml` records `purpose: RESTORE` or `TRANSFER`. **An archive with no `purpose` reads as
`RESTORE`** — every archive written before the field existed is complete, and the opposite default would mean
treating a file full of secrets as though it had been cleaned.
**Backups from a newer Runway.** The manifest also records the archive's `formatVersion` (currently `1`; an
archive without one is format 1). Restore, on either console and
when creating a site from a backup, refuses an archive whose format is **newer** than this release reads, with
the message *"This backup was made by a newer version of Runway … Upgrade Runway, then restore it."* Nothing is
changed. This protects a site from a restore that would silently drop data the older release does not
understand. The other direction always works: an archive from an older release restores on a newer one (the
promise and its limits are in [CONFIGURATION-AND-DATA-STABILITY.md](CONFIGURATION-AND-DATA-STABILITY.md) §3).
**Where they live.** Server-saved backups are stored at the deployment root under
`backups/<siteId>/` as timestamped `backup-YYYYMMDD-HHMMSS-SSS.zip` files. `backups/` is one of
the three **version-independent data directories** — alongside `external/` (config and site
data) and `logs/` — that survive in-place upgrades; keeping the archives out of `external/`
prevents them from bloating an `external/`-level sync. Include `backups/` in your host-level
backup rotation, and treat each `.zip` as sensitive (it contains the site's user records and
plugin secrets — never web-served). "Download now" backups are streamed to the operator's
browser and never touch the server.
**Retention (auto-prune).** So a site's `backups/<id>/` folder does not grow without bound, a
retention policy prunes older stored backups after each new one is written. It is configured
app-wide (never per tenant) in `application.yml`:
```yaml
runway:
backups:
retention:
max-count: 30 # keep at most the newest N per site; 0 = unlimited
max-age-days: 0 # also drop backups older than N days; 0 = no age limit
max-entry-bytes: 268435456 # 256 MiB — reject any single restore entry larger than this (zip-bomb guard)
schedule:
enabled: false # opt-in: back up EVERY site automatically
cron: "0 30 2 * * *" # 6-field Spring cron (sec min hour day month weekday) — 02:30 daily
offsite-dir: "" # blank = off; else an absolute dir every backup is mirrored into
```
Both limits apply independently (a backup is pruned if it is beyond the newest `max-count`
**or** older than `max-age-days`). The default keeps the newest **30** per site with no age
limit. Pruning only ever removes a site's *own* stored backups, never the live site data, and
the just-written backup is never pruned — so an explicit "Save on server" is always retained.
This governs only the server-stored archives; downloaded `.zip` files are yours to keep.
The same policy is on **Backups → Settings** in the console (except `offsite-dir`, which only the server sets);
either way it applies after a restart.
**Automatic backups (opt-in).** Set `schedule.enabled: true` and a `cron` and Runway backs up
**every** site on that schedule — each site isolated, so one site's failure never stops the
rest, and each run is pruned by the retention policy above. Left off (the default) no backup is
ever scheduled; a manual console backup is always available regardless. The `cron` has six fields — second,
minute, hour, day of month, month, day of week (`0 30 2 * **` is 02:30 every day, `0 0 3 * * SUN` 03:00 on
Sundays) — and Spring's shorthands `@daily`, `@weekly`, `@monthly`, `@yearly`, `@hourly` and `@midnight` work too.
The times are in the **server's time zone** (the Java default, shown on About Runway). The console refuses an
invalid expression; one set in `application.yml` stops startup while `schedule.enabled` is `true`, and is not read
at all while it is `false`. The backup runs on the
platform's shared scheduler pool (`spring.task.scheduling.*`, §8), which is always on because plugins
schedule work of their own.
**Off-host mirror.** Set `offsite-dir` to an absolute path — ideally a **mounted remote share**
(NFS/SMB/rclone-mount) or a second disk — and every newly-created backup (manual *or* scheduled)
is copied there as `<offsite-dir>/<siteId>/<name>.zip`, so a copy survives loss of the deployment
host. It is **best-effort**: if the target is unwritable (share unmounted) the local backup still
succeeds and a warning is logged. Off-host copies are pruned by the same retention policy. (Runway
does not push to object storage such as S3/GCS directly — mount it, or run a sidecar sync from the
off-host directory.) Under the installed systemd unit the service may write only inside `/opt/runway-data` (§6):
for a folder elsewhere, add it to `ReadWritePaths` in a drop-in, or every copy fails with that warning.
**What's included / excluded.** Included: everything under `sites/<id>/` plus each installed
plugin's per-tenant data. **Excluded by design:** the platform's own configuration, other
tenants' data (isolation — a backup can only ever contain the one site), and anything outside
the site folder reached via a symlink (symlinks are not followed when archiving, so a backup
cannot smuggle in host files).
**Restore safety.** Restore validates the archive is a genuine, complete site backup **before**
it swaps anything in, then swaps atomically. A corrupt, empty, or non-Runway file is rejected
with the live site untouched; an interrupted restore (e.g. a crash mid-swap) is **rolled
forward automatically on the next start-up** — the platform never leaves a site half-restored
or missing. Every entry is read under a **per-entry decompression cap** (`max-entry-bytes`
above, default 256 MiB), so a crafted "zip-bomb" archive — a tiny entry that inflates to
gigabytes — is refused instead of exhausting the server's memory or staging disk. Raise the cap
only if a site legitimately stores single files larger than that; a value of `0` (or negative)
falls back to the 256 MiB default rather than rejecting every entry. A site's **storage limit** (§10) does not apply
to a restore: a backup whose files are over the site's limit restores whole, and the site's Static files screen then
says it is over, so only new uploads wait. A site created from a backup has the platform default limit until you set
its own (the limit lives in `platform.yml`, not in the backup).
## 14. Monitoring & metrics
A **`/actuator/health`** endpoint **is** available — unauthenticated in both normal and wizard
mode — so you can wire a liveness/readiness probe today (`curl http://<host>:8080/actuator/health`
→ `{"status":"UP"}`). It carries a custom **`storage`** health indicator that checks the external data
directory is present and writable (a lost/read-only mount flips health to `DOWN`); per-indicator details
show only to an authenticated operator, so the public probe reveals only `UP`/`DOWN`. Runway also exposes a
**Prometheus scrape endpoint at `/actuator/prometheus`**, carrying the JVM/HTTP metrics plus Runway gauges
target-down, per-site 5xx/latency, dropped log lines, suspended sites and high heap), and a `README.md` with
the scrape config. Import the dashboard, reference the rules from `prometheus.yml`, and tune the thresholds.
See Operations §2 for the step-by-step.
Beyond the endpoints above, observe the service with `systemctl status runway`, `journalctl -u runway`,
and the launcher log at `/opt/runway-data/logs/runway.out`.
### The activity log (operator audit journal)
The app console's **Activity → Logs** screen (`/__app/logs`) is the platform's audit journal: who did what, and
when. It is the application-realm counterpart of each site's own **Logs** screen, which keeps that site's public
traffic and its managers' actions (see the Site manager guide, §3).
**What is recorded.** One entry per action, with a stable dotted *action key*:
| Area | Action keys |
|---|---|
| Sign-in and recovery | `login.success`, `login.failure` (with the client IP), `logout`, `recovery.requested` (a reset link was issued to that account), `recovery.completed` (the account's password was reset through the link), `account.password-changed`, `account.profile-changed` (own name or recovery email), `account.password-check-failed` (a wrong current password on the Account page) |