Installing Superbrain

For administrators: add Superbrain to a Core, or run it on its own with Docker.

On a We host Core, Federated installs and updates Superbrain for you, and you can skip this page. It’s for You host administrators and for anyone running Superbrain on their own server.

There are three ways to run Superbrain:

WhereHowSign-in
On a CoreThe Core installer, run on the CoreCore SSO (Authelia) only
On any Docker hostDocker ComposeAccounts in Superbrain, or your own OpenID Connect provider
On a standalone serverThe deploy script, which adds nginx, Let’s Encrypt certificates, and database backupsAccounts in Superbrain, or your own OpenID Connect provider

On a Core

sudo bash -c "$(docker run --rm --pull always federatedcomputer/superbrain-migrate cat /deploy/install.sh)"

The installer uses what the Core already runs: Authelia for sign-in, the shared PostgreSQL database, the Traefik proxy, PowerDNS, and the Core’s mail relay. Superbrain is then published at https://superbrain.example.com, and people sign in with their Core accounts.

To update it later:

/federated/bin/upgrade superbrain

With Docker Compose

You need Docker with Compose v2 or newer.

  1. Get the code and create a settings file:

    git clone https://gitea.federated.computer/Federated_Computer/superbrain.git
    cd superbrain
    cp .env.example .env
    
  2. Generate a secret and put it in .env as AUTH_SECRET:

    docker run --rm node:22-alpine node -e "console.log(require('node:crypto').randomBytes(32).toString('hex'))"
    
  3. Start it:

    docker compose up -d --build
    
  4. Open http://localhost:3000, sign up, and sign in.

docker compose down stops Superbrain and keeps its database.

Settings

The most important settings in .env:

SettingWhat it does
AUTH_SECRETSigns sign-in sessions. Required.
NEXTAUTH_URLSuperbrain’s public address. Required in production.
TIERcore allows only single sign-on; multi allows people to sign up themselves. Leave it unset to allow both.
ALLOW_BOOTSTRAP_SIGNUPSet to 0 on any server others can reach.
ADMIN_EMAILSWho is an administrator
OIDC_ISSUER, OIDC_CLIENT_ID, OIDC_CLIENT_SECRETSingle sign-on with an OpenID Connect provider. Set all three.
SMTP_HOST, SMTP_FROMSending email notifications
ENCRYPTION_KEYEncrypts stored secrets, such as mailbox passwords

The full list is in the Superbrain README.