* docs(deploy): correct docker admin bootstrap flow (no auto-generated password) Signed-off-by: Sai Asish Y <say.apm35@gmail.com> * docs(deploy): correct remaining generated-password and /data-persistence claims Signed-off-by: Sai Asish Y <say.apm35@gmail.com> * docs(deploy): scrub generated-password flow from remaining platform guides The Docker docs were corrected earlier, but fly / railway / render / modal / hf-spaces still told operators to read a generated admin password out of the logs / /data/admin-credentials — a flow that no longer exists (bootstrap never auto-generates a password; the first admin is claimed via the web Create-admin form or a pre-seeded OMNIGENT_ACCOUNTS_INIT_ADMIN_PASSWORD). - Rewrite the first-admin step in each guide to the real flow, and drop the fake "Created initial admin ... password: <generated>" log block. - Add a first-visitor security note (unauthenticated /auth/setup while no password-bearing account exists) to every public-facing guide; fold it into hf-spaces' "make the Space Public" step where the exposure is most direct. - render: correct the disk bullet (hashes live in Postgres, not on /data) and the render.yaml comment that called the anchor path a password file. Co-authored-by: Isaac <isaac@example.com> Signed-off-by: Pat Sukprasert <pattara.sk127@gmail.com> --------- Signed-off-by: Sai Asish Y <say.apm35@gmail.com> Signed-off-by: Pat Sukprasert <pattara.sk127@gmail.com> Co-authored-by: Pat Sukprasert <pattara.sk127@gmail.com> Co-authored-by: Isaac <isaac@example.com>
3.2 KiB
Omnigent on Hugging Face Spaces
Demo-grade target. On the free tier, Space storage is ephemeral — data (and the SQLite DB) reset on restart. Good for kicking the tires, not for keeping state. For persistence, add HF's paid persistent-storage, or point
DATABASE_URLat an external Postgres.
HF Spaces (Docker SDK) builds a Dockerfile at the Space repo root and runs it. The shim here just pulls the prebuilt image. No external database needed — the server runs on a SQLite file (a first-class backend), so a demo Space is two files plus two secrets.
Setup
-
Create a Docker Space on Hugging Face.
-
Add these two files at the Space repo root:
- the
Dockerfilefrom this directory (pulls the image), and - a
README.mdstarting with this front-matter (HF reads it):--- title: Omnigent emoji: 🤖 colorFrom: indigo colorTo: blue sdk: docker app_port: 8000 ---
- the
-
In the Space Settings -> Variables and secrets, set:
Name Kind Value PORTvariable 8000(pin it so the app andapp_portagree)HOSTvariable 0.0.0.0DATABASE_URLvariable sqlite:////data/artifacts/chat.dbOMNIGENT_ACCOUNTS_COOKIE_SECRETsecret openssl rand -hex 32(pin it: ephemeral disk would otherwise drop sessions on restart) -
The Space builds + boots. No admin credential is auto-generated: first boot prints a "No admin yet" line to the Space Logs, and the Space serves a web Create-admin form where you pick your own username + password. The base URL is auto-detected from
SPACE_HOST, so it needs no manual set. To create the admin directly instead, addOMNIGENT_ACCOUNTS_INIT_ADMIN_PASSWORDas a Space secret before first boot. -
Log in via the direct URL
https://<user>-<space>.hf.spacein its own tab — not HF's embedded preview. The session cookie isSameSite=Lax, which browsers won't send inside HF's cross-origin iframe, so logging in from the embedded view loops back to/login. The direct URL is top-level (same-site), so login sticks. Make the Space Public so the direct URL isn't gated — but note the Create-admin form is unauthenticated until the first admin is claimed, so a public Space can be claimed by the first visitor. Pre-seedOMNIGENT_ACCOUNTS_INIT_ADMIN_PASSWORD(step 4) or claim the admin immediately after it goes public.
Want persistence / multi-user later?
SQLite on a free Space is ephemeral (resets on restart). For data that survives,
swap DATABASE_URL for an owned external Postgres — the fastest is Neon:
- Go to pg.new and create a free Postgres. Sign in to keep it — an unclaimed instant database is throwaway and expires.
- Copy the connection string and set it as the
DATABASE_URLSpace secret (replacing the SQLite value). The entrypoint normalizespostgres://automatically; the pooled or direct connection string both work.
That makes data survive restarts and supports more than one instance. Note the first boot takes ~1 minute while migrations run against the remote database (subsequent boots are fast), so don't be alarmed if the Space sits in "Building / Starting" for a bit.