Skip to content

Install locally

This guide installs an authenticated Hivemind instance for evaluation on your computer. It creates a durable authority store, a default tenant and a first owner; each agent receives its own credential and space grants. Finish with the readiness checkpoint.

The authenticated stack uses an external S3-compatible bucket and a persistent Core data volume. Hivemind does not bundle an object store. For a single-person, loopback-only instance without authentication, see the alternative below.

Prerequisites

  • Docker Engine and Compose, and the Core release image you intend to run.
  • A private S3-compatible service and a new empty destination. It must apply Hivemind's PutObject and DeleteObject requests exactly (their conditions may be honored or ignored), list completely and support ordinary multipart upload; see S3 destination admission.
  • Chat and embedding profiles for consolidation and long memory. Short memory can run without them, but health will report degraded.
  • A verified email address for the first owner and a configured identity provider for the first sign-in.

Browser sign-in requires HTTPS that Core can trust. In this guide the WAF serves https://localhost:8080 on loopback with a certificate from its own local certificate authority, which you trust once on your computer (step 4). If HTTPS terminates in your own upstream proxy instead, configure that proxy as described in the production guide.

1. Prepare the release and configuration

git clone https://github.com/Lesur-ai/hivemind.git
cd hivemind
git checkout <release tag>

Put the S3 access key pair in a private file, with mode 0600 and two lines, S3_ACCESS_KEY_ID= and S3_SECRET_ACCESS_KEY=. Then create the protected configuration file with the configuration helper (Python 3.14). The authority-store installer allocates the bucket in step 2, so the helper does not ask for one:

python scripts/configure_dev_env.py \
  --s3-endpoint-url <s3-endpoint-url> --s3-region <region> \
  --s3-signature-mode sigv4 --s3-credentials-file <credentials-file> \
  --s3-bucket-from-installer

Use --s3-signature-mode sigv4 for MinIO, AWS S3 and most current S3 services, and dual for a service that needs SigV2 object requests, such as Dell ECS. The helper writes .env with mode 0600, refuses to overwrite an existing file and prints no secret. It sets the S3 endpoint, region, signature mode and key pair (S3_ENDPOINT_URL, S3_REGION_NAME, S3_SIGNATURE_MODE, S3_ACCESS_KEY_ID, S3_SECRET_ACCESS_KEY), leaves S3_BUCKET_NAME empty until step 2, generates ADMIN_BOOTSTRAP_KEY and NEO4J_PASSWORD, and sets HIVEMIND_MESH_ENABLED=false. Core refuses to start while S3_BUCKET_NAME is empty. The current Compose stack requires ADMIN_BOOTSTRAP_KEY; the authority-store installer creates the owner and the key is not the owner's store credential.

Add the inference profiles to .env; the provider profile guide describes the supported settings. Do not put secrets in command arguments or source control.

Then configure the WAF's HTTPS listener on loopback:

  1. In .env:

    • set SITE_ADDRESS=https://localhost:8080, so the WAF serves HTTPS for the name localhost with a certificate from its local authority;
    • set WAF_PORT=127.0.0.1:8080, so that listener is published on loopback only;
    • keep HIVEMIND_MESH_ENABLED=false, as the helper wrote it, because a local evaluation instance is not a Mesh peer. Leave the other HIVEMIND_MESH_* values empty.
  2. In docker-compose.yml, uncomment the caddy_data and caddy_config volume lines of the waf service and the matching caddy_data: and caddy_config: entries under the top-level volumes:, so the local authority and its certificates survive restarts. Leave the 80:80 and 443:443 port lines commented.

Keep the Core private volume (hivemind_core_data) across restarts.

2. Create the authority store

Pull the intended Core image and export its reference, for example export HIVEMIND_IMAGE=registry.example/hivemind@sha256:<digest>. Follow the fresh-install procedure for the Compose initialization jobs and installer command. Supply the first owner's email and use a new destination; the installer refuses a populated or ambiguous target. It records a private intent before touching S3 and publishes the store only after destination admission. Preserve any interrupted intent and objects for investigation rather than retrying against them as an empty target.

Set S3_BUCKET_NAME in .env to the bucket returned by the installer. Configure the identity provider and its secret as described in the fresh-install procedure. The first owner becomes active only after a login verifies the same email address.

3. Start the stack and let the WAF attest HTTPS

Core accepts browser sign-in only when HTTPS is attested by an explicitly trusted immediate proxy. Here that proxy is the WAF container on the stack's internal network. Without this setting, every browser sign-in is refused.

  1. Start the stack and list its services:

    scripts/authority-compose.sh
    docker compose -f docker-compose.yml -f docker-compose.auth17.yml ps
    

    The script starts the store overlay with the locally inspected immutable Core image digest for startup audit. It never builds or pulls, so prepare the other images first, as in Deploy a test server.

  2. Find the stack's network and read its subnet:

    docker network ls --filter name=hivemind-network
    docker network inspect -f '{{range .IPAM.Config}}{{.Subnet}}{{end}}' <network-name>
    
  3. Add that subnet to .env as a JSON list, for example AUTH_BROWSER_TRUSTED_PROXIES=["<subnet>"]. Use the actual subnet, never all private address ranges.

  4. Apply it by running scripts/authority-compose.sh again.

4. Trust the local certificate

The WAF's local authority signs its certificate for localhost. Trust that authority's root certificate on this computer.

  1. Copy the root certificate out of the WAF and check the HTTPS listener with it:

    docker compose -f docker-compose.yml -f docker-compose.auth17.yml \
      cp waf:/data/caddy/pki/authorities/local/root.crt hivemind-local-ca.crt
    curl -fsS --cacert hivemind-local-ca.crt https://localhost:8080/health
    

    A healthy response shows the service is running. The startup conditional-write witness determines whether MID writes are qualified.

  2. Add the file to the trust store your browser uses:

    • macOS (Safari, Chrome, Edge). macOS asks for your password to change trust settings:

      security add-trusted-cert -r trustRoot \
        -k ~/Library/Keychains/login.keychain-db hivemind-local-ca.crt
      
    • Linux (Chrome, Chromium), with certutil from the NSS tools package (libnss3-tools on Debian and Ubuntu, nss-tools on Fedora). The first two commands create your certificate database only when it does not exist yet:

      mkdir -p "$HOME/.pki/nssdb"
      [ -f "$HOME/.pki/nssdb/cert9.db" ] ||
        certutil -d "sql:$HOME/.pki/nssdb" -N --empty-password
      certutil -d "sql:$HOME/.pki/nssdb" -A -t "C,," \
        -n "Hivemind local CA" -i hivemind-local-ca.crt
      
    • Firefox keeps its own list: in its settings, under Privacy & Security, Certificates, View Certificates, Authorities, import the file and allow it to identify websites.

    Restart the browser. Always use the name localhost, not 127.0.0.1: the certificate names localhost only.

  3. Give agents on this computer the same trust. They connect to https://localhost:8080/mcp. Clients built on Node.js, such as Claude Code, read extra authorities from NODE_EXTRA_CA_CERTS, for example NODE_EXTRA_CA_CERTS=/path/to/hivemind-local-ca.crt in the client's environment. For other clients, see their documentation.

The authority's private key stays in the WAF's caddy_data volume. Anyone who can read that volume can issue certificates your computer accepts for any site, so keep Docker access on this computer to yourself, and remove the trust when you delete the installation. A new caddy_data volume creates a new authority: repeat this step after it.

5. Provision access

Open https://localhost:8080/ and sign in as the first owner through the configured provider. In the Portal, create the tutorial space and a separate agent credential for each client. Give each agent Read + write on that space and keep credentials private; reserve Manage for a trusted operator. Imported 1.6 credentials are handled by the separate upgrade guide.

6. Verify readiness

Run the readiness checkpoint for both agents. Check that each client reports its own identity and allowed spaces, that a bearer without access is refused, and that the memory stack responds as specified. MCP system_about reports authority_source: store for the store runtime. Continue with Connect Claude Code and Connect Codex.

If startup or readiness fails, inspect the Core and Graph logs and the provider configuration. Do not reset a populated store or delete volumes to make a retry appear fresh. See the fresh-install recovery procedure and FAQ.

Troubleshoot

The sign-in page shows "Single sign-on status unavailable" and no "First time here? Set up your account" link. Cause: Core refuses every browser sign-in route, and /api/auth17/browser/providers answers 403 {"error":"browser_auth_refused"}, because no trusted proxy attests HTTPS: the WAF serves plain HTTP, or AUTH_BROWSER_TRUSTED_PROXIES does not contain the stack network's subnet. Fix: set SITE_ADDRESS as in step 1 and the trusted proxy as in step 3, run scripts/authority-compose.sh again, then check that curl -fsS --cacert hivemind-local-ca.crt https://localhost:8080/api/auth17/browser/providers answers with a providers list.

The browser reports an untrusted or invalid certificate. Cause: the browser does not trust the WAF's local authority, the address is not https://localhost:8080, or a new caddy_data volume created a new authority. Fix: open https://localhost:8080/ and repeat step 4.

Core does not start and its log says HIVEMIND_MESH_PUBLIC_URL is required and must be canonical. Cause: Mesh is enabled by default and needs a public URL. Fix: set HIVEMIND_MESH_ENABLED=false as in step 1 and run scripts/authority-compose.sh again.

Alternative: the loopback profile without authentication

For one person's computer, authentication can be turned off on a loopback-only instance. Every local program shares access and X-Hivemind-Agent is a self-declared label, not a verified identity. This profile cannot satisfy the tutorial's authenticated identity checkpoint. Follow the quickstart on one machine and Local mode for initialization, access limits and the limits of each storage profile. Do not expose its port through a network or tunnel.