The federated suite now installs Superbrain like every other house app:
pull images, run installapp, no source tree on the host.
Images (Docker Hub, federatedcomputer namespace, one shared tag per
release + :latest, linux/amd64 + linux/arm64):
superbrain-app Go API (scratch)
superbrain-web Next.js standalone
superbrain-migrate NEW self-contained db image: db/ baked in, entrypoint
db/bootstrap.sh waits for postgres, applies
schema.sql AS DB_USER on an empty database (object
ownership — migrations must be able to ALTER), then
always runs the checksummed ledger. Fresh install and
upgrade become the same command. The dev compose runs
the same bootstrap.sh (verified: non-empty DB skips
schema, applies pending migrations).
Release CI (.github/workflows/release.yml): semver tags without v prefix
(the suite's VERSION_RX); a smoke job bootstraps a throwaway PostgreSQL
with the migrate image (fresh schema + complete ledger + idempotent re-run)
and runs Go build/vet/unit BEFORE the publish job pushes — a broken db/
can never reach a tag the upgrade flow will pull. Requires
DOCKERHUB_USERNAME/DOCKERHUB_TOKEN secrets. Dockerfile stays legacy-
builder compatible (no BUILDPLATFORM cross-compile): dev hosts build
locally; CI builds each arch natively under qemu.
Federated integration:
- lib-superbrain.sh: compose pulls federatedcomputer/superbrain-*:
${IMAGE_VERSION} (bookstack quoting), no build: keys, no
IMAGE_VERSION_HOLD; compose generation extracted into
render_superbrain_compose (install + update share it); schema.sql
pre-apply and host image builds removed; IMAGE_VERSION is the only
VERSION= line in the generated .env (upgrade_app's sed matches every
occurrence — the file says so in words that don't contain the pattern).
- service file: CONTAINER=federatedcomputer/superbrain-app (must equal the
first image: repository — upgrade_app compares it), VERSION=1.0.0.
- services/superbrain/upgrade/pre hook (listmonk pattern): pre-upgrade
pg_dump into .update-backups (5 retained) + pulls web/migrate at the
target version (upgrade_app pulls only the app image).
- install.sh: registry messaging, installs the upgrade hook, clone is only
for deploy files now.
- update.sh REWRITTEN for registry mode: the app dir no longer contains
source, so it runs from a repo clone — sync lib/service/hook (parse-
checked, backed up) -> re-render compose -> /federated/bin/upgrade
superbrain -> same-version compose safety pass -> health probe.
- STRATEGY.md interim-mode section replaced with the registry-mode record.
README: federated section updated (pulls, not builds; house upgrade flow)
and a new 'Environment variable reference' section — every variable the
stack reads, required/optional, defaults, grouped (core, compose, access
policy, OIDC, SMTP, AI, federated-only, tests-only), so generated .env
files stay correct as features are added.
28 KiB
Superbrain
A multi-user bookmark workspace: URLs with Markdown notes, tags, calendar dates, editable kanban boards, project collections with typed properties and saved views, pages, previews, sharing, contacts and email signals.
Run the whole app
Client setup guide: Running superbrain covers cloning, setup, first login, everyday commands, updates, and troubleshooting on Windows, macOS, and Linux.
Superbrain installs three ways — pick the one that matches your target:
- Self-hosted with Docker Compose (this section): one command on any Docker host. Default shape: email/password signup and login, optional Authelia, optional SMTP-backed password reset.
- Standalone remote server —
scripts/deploy.shprovisions a target machine end to end (nginx + Let's Encrypt + database backups). See Deploying to a server below. - Federated "core" suite host — a one-shot suite installer for operators running their own federated core (traefik, Authelia, shared postgres, pdns, superpanel). See Installing into a federated core suite below.
The TIER environment variable selects the product shape and derives the
auth defaults (explicit AUTH_MODE/SIGNUP_ENABLED override): unset =
both password login and Authelia; TIER=multi = hosted self-service
(signup, password login, self-reset); TIER=core = Authelia SSO only.
Details: web/docs/AUTHELIA.md §7.
Requires Docker with Compose v2 or newer. On a new installation:
git clone https://github.com/andrewthecodertx/superbrain.git
cd superbrain
cp .env.example .env
docker run --rm node:22-alpine node -e "console.log(require('node:crypto').randomBytes(32).toString('hex'))"
Put the generated value in AUTH_SECRET in .env, save the file, then run:
docker compose up -d --build # builds and starts PostgreSQL, Go and Next.js
On Windows PowerShell, use Copy-Item .env.example .env instead of cp.
- Web interface: http://localhost:3000. Sign up, then sign in.
- Go API: http://localhost:8080 (local access; endpoints in API.md).
- PostgreSQL:
db:5432inside Docker; not published on the host. - With
ADMIN_EMAILSempty, the first non-@example.comaccount becomes administrator and completes a one-shot bootstrap: afterwards signup never auto-promotes again, even if the last administrator is demoted or removed — recovery is operator-driven (ADMIN_EMAILS+ seed, or promotion by an existing admin). Addresses inADMIN_EMAILSare reserved for operator-provisioned accounts; automatic promotion requires a verified email. Existing accounts are preserved on restart. docker compose downstops the stack. It does not delete the database volume.
make run and make stop are optional shortcuts for the Compose commands.
docker-compose.full.yml is a compatibility alias for the same complete stack.
Existing Docker database
Set POSTGRES_VOLUME to its existing Docker volume name and
POSTGRES_VOLUME_EXTERNAL=true. The volume must contain the superbrain
database and superbrain role. Stop the previous PostgreSQL container before
mounting that volume in this stack.
db/schema.sql initializes a new, empty database once. db/migrations/
holds the ordered, checksummed additive migrations that db/migrate.sh runs
(ledger table _migration) before Go starts. Each migration is applied and
recorded in a single transaction under an advisory lock, so a crash never
leaves an applied file unrecorded (or vice versa) and a second concurrent
runner aborts instead of double-applying. Neither path drops a database.
Do not run the initial schema against an already initialized database, and do
not edit a migration that has been applied — add a new numbered file.
Migrations are additive (new columns/tables/indexes with defaults), so the
previous application release keeps working against a migrated database;
rolling the data itself back means restoring the pre-deploy dump (see
RUNNING.md), not reverting SQL. Because schema.sql and the chain are two
paths to the same schema, every schema change needs both a schema.sql edit
and a new migration; make db-converge (included in make check) fails
when they drift apart. The page-search migration enables the pg_trgm
extension (bundled with PostgreSQL and trusted, so the database owner can
install it); the index-backed page search depends on it.
Architecture
internal/: Go API, persistence, authorization and integrations. SQL values are parameterized; camelCase JSON matches the Next.js client contract.web/: Next.js UI and NextAuth browser sessions. Credentials are verified by Go. A server-side API proxy signs 60-second identity assertions; Go reloads roles and resolves admin impersonation on every data request. Signing out in the browser also revokes backend sessions ("sign out everywhere"): it bumps the user's token version, so prior assertions and Go cookie sessions stop working.- The frontend has no runtime Prisma client or direct database connection.
- Go also supports its own HttpOnly
superbrain_sessioncookie for direct API consumers. Administration uses the real user; data uses the effective user. - Containers share the Compose backend network. The app runs as non-root
with a read-only filesystem; the web container has temporary
/tmpstorage.
Features and integrations
- Bookmarks: create/edit/delete, tags, contacts, previews, calendar dates, alerts, Markdown downloads and public read-only links.
- Bookmark collections use cursor pagination; the UI follows every page so collections larger than 200 remain visible on all organization screens.
- Notion-style workspace shell: a Quick Find command palette (Ctrl/Cmd+K) jumps to any page, bookmark, tag or view and runs commands (new page, add bookmark, theme toggle); the slim top bar shows a breadcrumb path (workspace / section / page); sidebar sections collapse and page rows expose hover actions (pin, inline rename, delete).
- Pages: Markdown editing/autosave with a Notion-style slash-command block
menu (type
/for headings, to-dos, lists, quotes, dividers and code) and the[]+ space to-do shortcut, link collections, pinning, reorder/export. Saves are queued per page; unsaved drafts are kept in the current browser tab for recovery after a failed save, together with the server version they were based on. Page switching waits for pending saves. When another tab or device saved first, autosave pauses in an explicit conflict state — the editor offers overwrite, save-as-copy and discard, and typing alone never overwrites the newer version. - Kanban: custom columns, card moves, reorder; deleting a column moves cards.
- Collections: per-project workflow state over your existing bookmarks. The same link joins many collections without duplication, each with its own typed properties (text, number, select, multi-select, date, checkbox, URL), saved table/board views, server-side filters with typed operator allowlists, and manual ordering. Membership adds context — it never owns or publishes the bookmark: removing an item or a whole collection keeps the bookmark, and a bookmark whose share was revoked disappears from collections everywhere. Every mutating PATCH carries an expected version, so concurrent editors get a conflict instead of a silent overwrite; reordering and property deletion advance the affected items' and views' revisions too, and deletions are idempotent removals.
- Sharing: bookmarks, tags and calendar dates; recipients read shared content. Owners can revoke shares. Shared tags and dates expose the associated URLs. Tag sharing is group-wide: every recipient of a tag sees all bookmarks carrying it, including ones other recipients add. Shared readers get a narrowed response: the link and its reader-facing content only — never the owner's contact record, the other recipients, alerts, or mailbox watches.
- Public bookmark links deliberately publish the title, description, notes, due date, tags and preview; contacts, alerts, mailbox watches and the owner identity stay private. The share panel states this before you toggle.
- Remote preview images and favicons are loaded by your browser directly
from the third-party host, with
referrerPolicy="no-referrer"so the app URL is not disclosed; opening a page can still let those hosts observe the request. Server-side fetches (previews, CardDAV, IMAP) never touch private network ranges, including 6to4/Teredo/NAT64-wrapped addresses. Previews are pinned to HTTP/HTTPS ports 80/443 and mailbox connections to IMAP ports 143/993; CardDAV uses the explicitly configured HTTPS port. - Text fields have per-field caps in addition to the request-body limit, so an oversized bookmark title, tag name, note or page body is rejected instead of bloating every list and search.
- Alerts: browser notifications and in-app dismissal, polled every five minutes.
- Nextcloud: CardDAV REPORT sync using each user's app password. Credentials are used for that request only, not stored, and never travel plaintext: the Nextcloud URL must use https (redirects are not followed).
- IMAP: encrypted per-user settings, real login tests, sender/subject searches, email watchers, and Message-ID deduplication. Verified TLS is required — plaintext mailbox logins are rejected. Watcher ingestion is incremental: a durable per-source UID checkpoint processes bounded batches until caught up instead of re-scanning the last 50 matches. Configure integrations in Settings, then check watchers from a bookmark. Enabled email watchers also run every five minutes in the Go process, including watches enabled with the original mailbox-watch switch. The scheduler runs users with bounded concurrency, per-user failure backoff, and a database-backed lease so extra instances never double-poll a mailbox.
- Notifications: delivery channels (email via the server's SMTP relay, Slack webhooks, Matrix rooms, Telegram bots) and rules that fire when a new mailbox signal arrives or a bookmark comes due. Channel secrets are encrypted at rest and never echoed back; availability follows your plan. Configure in Settings → Notifications.
- AI automations ("hey superbrain"): describe an automation in plain
language — "when the round trip on https://… drops below $400, email
david@example.com" — and Superbrain compiles it into a task you review
and confirm before anything is saved. Two doors: the floating Ask
Superbrain assistant drawer (ephemeral chat on every screen; automation
requests come back as confirm-before-create proposal cards; Save to
page keeps a conversation) and Settings → Automations (form + task list
- delivery history). Tasks watch a public web page on a schedule (one extracted fact per check, e.g. a price threshold) or react to new mailbox signals, then notify a channel, email a recipient, or save a bookmark. The AI only ever proposes validated specs; actions are a fixed, bounded set (no logins, no bookings, no deletes, no multi-step chains yet), every fetch goes through the same private-range network guard as previews, and email actions are hard-capped. AI is bring-your-own-key per user (Settings → AI: provider, model, key — encrypted at rest) with an optional server-wide key for plans that include it; without any key, AI features report "not configured" and everything else keeps working. Details: RUNNING.md → "AI automations".
Connecting Authelia (OIDC)
Authelia is the primary sign-in path when configured. The trusted Next.js server handles the OIDC authorization-code flow, validates the ID token, and then exchanges the verified identity for a local Go user. Email/password sign-in remains available as a fallback. The full Authelia connection guide includes the client registration example and the identity-mapping details.
1. Register the app in Authelia
Use an Authelia installation with OIDC enabled and a valid HTTPS issuer URL.
Register superbrain as a confidential client with:
- Scopes:
openid,profile,email. - Grant type:
authorization_code; response type:code. - Token endpoint authentication:
client_secret_basic. - Redirect URI:
<PUBLIC_APP_URL>/api/auth/callback/authelia, for examplehttps://superbrain.company.tld/api/auth/callback/authelia.
Generate a client secret as described in the connection guide. Put its
hashed digest in Authelia and its plain value in the app's
OIDC_CLIENT_SECRET. The redirect URI must exactly match the public web URL
and callback path. It points to the Next.js server, not the Go API on port 8080.
2. Configure superbrain
Edit the root .env, replacing the sample values with your deployment values:
NEXTAUTH_URL=https://superbrain.company.tld
COOKIE_SECURE=1
OIDC_ISSUER=https://auth.company.tld
OIDC_CLIENT_ID=superbrain
OIDC_CLIENT_SECRET=<plain-client-secret>
Serve the web app through an HTTPS reverse proxy; the default Docker ports
bind to localhost. Keep your existing AUTH_SECRET unchanged. Apply the
environment changes with docker compose up -d --build, then check
Settings → OIDC. When all three variables hold real values, the Authelia
button is enabled.
3. How identity mapping works
The Next server owns OIDC verification and the callback. After Authelia returns
a verified identity, NextAuth's jwt callback calls the Go API's
POST /api/auth/oidc/identity endpoint with a short-lived service token
(typ=oidc-provision). Go resolves the OIDC subject to a local User through
the Account table:
- An existing provider link is authoritative.
- A matching local account with no password may be linked when Authelia asserts a verified email.
- A matching local password account returns
409 Account link required. Email alone is not proof of identity; an administrator links it explicitly withPOST /api/admin/oidc-link({userId,subject}). - Otherwise Go creates a password-less local user. The first external user on a fresh installation follows the same bootstrap-admin rules as signup.
The NextAuth session and every API assertion use the local User.id, never
Authelia's sub claim. A Go tokenVersion bump on sign-out revokes both the
NextAuth-backed assertions and Go cookie sessions.
The Go OIDC login/callback handlers in internal/oidc/provider.go remain 501
stubs. They are not the NextAuth callback implementation; the Next server drives
the flow. Config status (including an enabled flag) indicates that values are
present, not that Go itself runs an OIDC client.
Developer commands
make run # build and start the full Compose stack
make stop # stop the stack, keep the PostgreSQL volume
make build # Go compile
make vet # Go vet
make test # Go unit tests with race detection
make integration # Docker PostgreSQL + CardDAV/IMAP fixture tests
make db-shell # psql inside the database container
make logs # Go and Next.js logs
make migrate # ordered additive database migrations
make db-converge # schema.sql vs migration-chain drift check
make check # release validation (fails without DB coverage)
make audit # dependency advisory scans (needs govulncheck)
The same release gate runs automatically on every push and pull request
(.github/workflows/check.yml), including the browser smoke tests against
the composed stack. Pass YARN="corepack yarn" to make check when yarn
comes through corepack.
Integration tests create/drop random test schemas; they never clear app data. They exercise CRUD, sharing, ownership boundaries, impersonation, encryption, CardDAV sync, IMAP login/search and signal deduplication.
Frontend checks (from web/): yarn lint, yarn build, and
yarn eslint -c eslint.ssr.config.mjs .. Builds enforce TypeScript checks.
Browser smoke tests (with the stack running):
npm --prefix scripts ci
CHROMIUM_PATH=/usr/bin/chromium make e2e
These verify login, UI bookmark creation, Go-backed persistence, public links, Quick Find deep links, kanban, the collections workflow (membership without duplication, typed properties, table+board over one membership), page autosave/slash commands/exports and every application screen. Test accounts have unique names and only those accounts are deleted afterward.
Targeted browser regressions (after yarn build in web/):
npm --prefix scripts run test:regressions
These run an isolated Next server with API fixtures and test login CSRF, browser sign-out revocation, autosave switching/ordering/recovery (including drafts whose base version is unknown, which pause for review), pagination, and bookmark editing without creating or deleting application users.
Optional operator-provisioned account: set its address in ADMIN_EMAILS in
the root .env, run docker compose up -d, then:
docker compose exec -e SEED_EMAIL=admin@company.tld -e SEED_PASSWORD='<chosen-password>' app /superbrain --seed
This trusted command creates an admin for an allowlisted address. It never changes an existing account's password or role, or deletes data. Additional existing users can be promoted from the Admin screen.
Deploying to a server
Deployment is target-agnostic — there are no built-in host or domain defaults. Point DNS for your domain at the server, have an ssh alias (or host) ready, then run from the repository root:
HOST=app-server DOMAIN=superbrain.example.tld CERTBOT_EMAIL=ops@example.tld ./scripts/deploy.sh
(make deploy runs the same script with the same variables.) It records the
exact git revision, refuses dirty trees unless ALLOW_DIRTY=1, rsyncs the
source, and on the server: provisions Docker/nginx/certbot, writes .env on
first deploy, takes a pre-deploy database dump plus .env snapshot into
/var/backups/superbrain (15 retained), builds revision-tagged images, and
installs the nginx + Let's Encrypt reverse proxy from
deploy/nginx/superbrain.conf.template. Rollback means re-deploying an older
revision or restoring a pre-deploy dump; migrations are additive. See
RUNNING.md → "Running on a remote server" for the operator checklist.
Installing into a federated core suite
For operators running their own copy of the federated suite (traefik + Authelia + shared postgres + pdns + superpanel), Superbrain is a first-class suite app. On the core host, as root:
git clone https://gitea.federated.computer/Federated_Computer/brain.git /tmp/superbrain-repo
sudo bash /tmp/superbrain-repo/deploy/federated/install.sh
(Use whichever repository location you were given access to; the installer
re-clones it onto the host by default — override with SUPERBRAIN_REPO,
SUPERBRAIN_REF, or stage a local tree with SUPERBRAIN_SRC.)
The installer:
- Preflights the suite — Authelia is required (the core tier is
SSO-only: password login, signup and reset are disabled at the API),
plus the house mail relay credential for notification emails, the
coredocker network, and fixed-IP availability (override withSUPERBRAIN_{WEB,APP,MIGRATE}_IPon collision). - Installs the house integration —
/federated/lib/superbrain.sh,/federated/services/superbrain/serviceand theupgrade/prehook, then runs the standard/federated/bin/installapp superbrain: compose +.envgeneration (TIER=core), image pulls from Docker Hub (federatedcomputer/superbrain-{app,web,migrate}, one shared version tag, amd64 + arm64 — no source, no builds on the host), database + user on the shared postgres (the migrate image bootstraps the schema and runs the ledger itself), pdns record, monitors, superpanel catalog entry. - Registers the Authelia OIDC client — including the
claims_policythat putsemailin the ID token (without it every SSO login fails with AccessDenied), validated before Authelia is restarted. - Seeds and verifies — a password-less
admin@$DOMAINaccount (ADMIN viaADMIN_EMAILS; it links to your Authelia identity by verified email on first SSO login), then container/DNS/SSO/HTTPS checks and the operator's first-login instructions.
Prerequisites: Authelia with the OIDC provider configured, shared
postgresql, traefik, pdns, and the house mail relay (shared fcore
sender account). Full design record, IP plan, upgrade flow and incident
history: deploy/federated/STRATEGY.md.
Updating an installed core is the standard house flow — bump VERSION
in /federated/services/superbrain/service to the new release tag and run
/federated/bin/upgrade superbrain (the pre-hook backs up the database
and pulls all three images). Or one command, which also syncs the suite
files from the repo:
git clone https://gitea.federated.computer/Federated_Computer/brain.git /tmp/superbrain-repo
sudo bash /tmp/superbrain-repo/deploy/federated/update.sh [git-ref]
Releases are semver tags without a v prefix (1.0.0); CI builds and
pushes all three images under the same tag (plus :latest) for
linux/amd64 and linux/arm64. The migrate image is self-contained: it
detects an empty database, applies schema.sql as the superbrain user,
then runs the checksummed migration ledger — the host never needs the
source tree.
Environment variable reference
Everything the stack reads, so a generated .env (or hosting environment)
stays correct as features are added. .env.example carries the same list
with annotations. "Required" means the app refuses to start or the feature
is off without it.
Core (every deployment)
| Variable | Required | Default | Purpose |
|---|---|---|---|
AUTH_SECRET |
yes | — | Signs NextAuth JWTs, Go session cookies, proxy assertions and service tokens. Keep stable: rotating it signs everyone out and (without ENCRYPTION_KEY) invalidates stored IMAP passwords. openssl rand -base64 32 |
NEXTAUTH_SECRET |
no | AUTH_SECRET |
Alternative name; takes precedence when both are set (both sides use the same precedence) |
NEXTAUTH_URL |
yes in production | — | Exact browser-facing origin. Drives OIDC callbacks, the proxy's origin allowlist, cookie-secure derivation and password-reset links |
ENCRYPTION_KEY |
no | derived from AUTH_SECRET |
Dedicated key for stored credentials (IMAP passwords, notification channel secrets, BYO AI keys). Set it and rotating AUTH_SECRET no longer touches them. Back it up with the database |
COOKIE_SECURE |
no | derived from NEXTAUTH_URL scheme |
Set 0 explicitly only for local HTTP |
DATABASE_URL |
yes (Go) | — | postgres://user:pass@host:5432/db?sslmode=disable; DB_URL is the Makefile fallback |
Compose stack (repo docker-compose.yml)
| Variable | Required | Default | Purpose |
|---|---|---|---|
POSTGRES_PASSWORD |
yes | — | Fail-fast :? interpolation — compose refuses to start without it |
POSTGRES_VOLUME |
no | superbrain_pgdata |
Data volume name |
POSTGRES_VOLUME_EXTERNAL |
no | false |
true to mount a pre-existing volume |
APP_HOST_PORT / WEB_HOST_PORT |
no | 8080 / 3000 |
127.0.0.1 host bindings; when shifting WEB_HOST_PORT, NEXTAUTH_URL must match the browser-facing origin |
PORT |
no | 8080 |
Go listen port inside the container |
Access policy (tier & auth shape)
| Variable | Required | Default | Purpose |
|---|---|---|---|
TIER |
no | unset | core (Authelia-only) or multi (self-service signup); derives the three below. Invalid values fail startup |
AUTH_MODE |
no | tier-derived, else both |
both / password / oidc — overrides the tier. Invalid values fail startup |
SIGNUP_ENABLED |
no | tier-derived, else on | 0 closes self-service registration |
ALLOW_BOOTSTRAP_SIGNUP |
no | tier-derived, else on | 0 stops the first signup from claiming admin (set 0 on any exposed host) |
ADMIN_EMAILS |
no | empty | Comma-separated operator addresses: reserved at signup, ADMIN at first SSO login, ADMIN via --seed |
TRUSTED_PROXY |
no | unset | 1 only when the proxy overwrites X-Real-IP (bundled nginx template does; traefik does not) — enables per-client rate-limit identity |
Authelia OIDC (all three required for SSO; placeholders = off)
| Variable | Required | Default | Purpose |
|---|---|---|---|
OIDC_ISSUER |
for SSO | — | Exact issuer from Authelia's discovery document |
OIDC_CLIENT_ID |
for SSO | — | Must match the Authelia client |
OIDC_CLIENT_SECRET |
for SSO | — | The plain secret, not the digest |
Transactional mail (password reset + notification email channel)
| Variable | Required | Default | Purpose |
|---|---|---|---|
SMTP_HOST |
for mail | — | Relay host; unset disables reset (503) and email delivery |
SMTP_PORT |
no | 587 |
465 = implicit TLS; otherwise STARTTLS when advertised |
SMTP_USERNAME / SMTP_PASSWORD |
no | — | AUTH PLAIN when the relay requires it |
SMTP_FROM |
with SMTP_HOST | — | Envelope+header sender |
NETGUARD_TRUSTED_HOSTS |
no | empty | Comma-separated operator-pinned hostnames allowed to resolve to private addresses (split-horizon relays). Never user-supplied names |
AI (assistant, automations)
| Variable | Required | Default | Purpose |
|---|---|---|---|
AI_API_KEY |
for the server-wide key | — | Operator fallback key; per-user BYO configs (Settings → AI) take precedence, and free/standard plans are BYO-only |
AI_MODEL |
no | recursive/flint-v1.0:free |
Any model the provider serves |
AI_BASE_URL |
no | https://openrouter.ai/api/v1 |
Any OpenAI-compatible endpoint |
AI_PROVIDER |
no | openai-compatible |
or anthropic / gemini |
Federated suite installs only
| Variable | Required | Default | Purpose |
|---|---|---|---|
IMAGE_VERSION |
yes | 1.0.0 |
Shared tag for the three registry images; upgrade rewrites it. Must be the ONLY VERSION=-containing line in the file (upgrade_app's sed matches every occurrence) |
DB_HOST / DB_USER / DB_NAME / PGPASSWORD |
yes | — | Shared suite postgres coordinates, read by the migrate image's bootstrap |
API_BASE_URL |
yes (web) | — | Server-only DNS to the Go container (http://superbrain-app:8080) |
AUTH_TRUST_HOST |
yes (web) | — | true behind the reverse proxy |
Tests/fixtures only — never in production
| Variable | Default | Purpose |
|---|---|---|
TEST_DATABASE_URL |
unset (DB tests skip) | Integration test database |
INTEGRATIONS_ALLOW_PRIVATE |
unset | Allows private-range dials (loopback fakes, deliberate LAN deployments) |
INTEGRATIONS_ALLOW_INSECURE_IMAP |
unset | Permits plaintext IMAP for fixtures |
BASE_URL / CHROMIUM_PATH / E2E_KEEP_DATA |
see .env.example |
Browser suites |
Client test build
Use RUNNING.md for the client handoff. Test login, bookmark editing, tag/contact organization, calendar dates, kanban, a collections workflow (create a collection, add the same bookmark to two collections, give each a status, move a card on a board view), Markdown pages/exports, Quick Find (Ctrl/Cmd+K), slash commands in the page editor, and sharing with separate accounts.
Current integration boundaries:
- Authelia is the primary sign-in path when configured; email/password remains a fallback. Existing password accounts require explicit linking to an Authelia identity.
- IMAP and Nextcloud require the client's own service credentials.
- Alerts are browser-only and checked every five minutes while the app is open.
- Page autosave needs an API connection. Check the save indicator; use Save now after a failed save. Tab-local drafts are recovery aids, not backups.