Regenerate /self-hosting: the password command people follow

Follows flamenet-e2e 40fd2f5. The published page still tells self-hosters to
generate POSTGRES_PASSWORD with `openssl rand -base64 32`, which breaks the
relay about three times in four, so the correction is not live until this ships.

The drift guard caught this unprompted, for the second time today:

    self-hosting.leaf  from flamenet-e2e/SELF-HOSTING.md  (a4ed8fd6… != 0f36788a…)

Which is the whole point of it. The source was fixed in another repository and
the page it feeds would otherwise have stayed stale and served — the exact
failure that left the missing `docker network create web` live for a day.
This commit is contained in:
Paul Hitt
2026-08-31 14:48:19 -04:00
parent 1fc5f8d1d2
commit 10ef95199e
+14 -2
View File
@@ -3,7 +3,7 @@
<!-- GENERATED by Scripts/build-doc-pages.sh from flamenet-e2e/SELF-HOSTING.md.
Edits made HERE are deleted the next time that script runs.
Change the markdown source and re-run it.
source-sha256: a4ed8fd6048d30cd -->
source-sha256: 0f36788aea97abd7 -->
<article class="band doc doc-generated">
<div class="wrap wrap-narrow">
<h1 id="self-hosting">Self-hosting</h1>
@@ -52,12 +52,24 @@ told.</p>
cd flamenet-relay
cp .env.example .env</code></pre>
<p>Generate the three secrets <code>.env</code> asks for:</p>
<pre class="bash"><code>openssl rand -base64 32 #("#") POSTGRES_PASSWORD
<pre class="bash"><code>openssl rand -hex 32 #("#") POSTGRES_PASSWORD
openssl rand -base64 32 #("#") FN_AT_REST_SECRET
openssl genpkey -algorithm ed25519 -out issuer.pem
openssl pkey -in issuer.pem -outform DER | tail -c 32 | base64 #("#") FN_ISSUER_PRIVATE_KEY
openssl pkey -in issuer.pem -pubout -outform DER | tail -c 32 | base64 #("#") FN_ISSUER_PUBLIC_KEY</code></pre>
<p>🔴 <strong><code>-hex</code> for the database password, not
<code>-base64</code>, and this one is not cosmetic.</strong> It is
interpolated into
<code>postgres://flamenet:&lt;password&gt;@db:5432/flamenet</code>,
where base64's <code>/</code>, <code>+</code> and <code>=</code> are all
meaningful. A password containing <code>/</code> makes that URL invalid
and the relay dies at start-up with a bare <code>Code=-1000</code> and
the connection string echoed back at you — which reads like the database
is unreachable rather than like the password needs escaping.
<code>openssl rand -base64 32</code> produces one of those roughly
<strong>three times in four</strong>, so following the old instructions
usually failed.</p>
<p>Then create the proxy network the compose file attaches to, and
start:</p>
<pre class="bash"><code>docker network create web