Deploy a test server¶
Deploy one shared Hivemind 1.7.0 instance on a single host, sign in, admit two or three colleagues without an external identity provider, and confirm that two agents on different machines share one space.
Before you start¶
What a test server is for. A small team evaluates Hivemind with real clients before production: people sign in with a local account (email, password and an authenticator app), agents use their own credentials, and everyone shares one test space. There is no OIDC provider, no OAuth MCP connector and no production hardening; those belong to the production guide.
What it must not be used for.
- Production work, or as the only copy of anything you need later.
- Personal, confidential or customer data.
- A public service: keep the host reachable by your team only, except for what certificate issuance needs.
- Project Mesh pairing: this guide disables Mesh.
- A future production instance: production is a fresh installation with its own bucket and store (see Next).
Host.
- One Linux host with Docker Engine 24 or later and Docker Compose 2.30 or later (the authority-store overlay needs it).
- A DNS name for the server, written
hivemind.example.orgon this page. With the bundled WAF obtaining a Let's Encrypt certificate, that name must resolve publicly and ports 80 and 443 must be reachable by the certificate authority. If the host must stay private, terminate TLS in your own upstream proxy instead, as described in the deployment guide; that variant is not detailed here. - A checkout of the Hivemind source at the 1.7.0 release tag, and the 1.7.0 Core release image available to pull from its registry.
Storage. Hivemind bundles no object store. You need an S3-compatible service with credentials for a bucket dedicated to this test server, or permission for the installer to create one. Before any install command, run the AWS CLI checks of the storage witness, and read the S3 operator support page: some services accept Hivemind's writes but ignore their conditions, which is a stated residual risk and one more reason to keep important data elsewhere.
Inference (optional for the first sign-in). A chat profile for
consolidation and an embedding profile for long memory. Without them the
server runs, people sign in and agents write and read short notes, but
/health reports degraded. See Choose inference providers.
People. The email address of the first owner (you), and of the two or three colleagues you will admit. Each person needs an authenticator app (TOTP).
Timing. The first owner must finish their account setup within 24 hours of the installation; plan steps 4 to 7 on the same day.
Steps¶
Run every docker compose command from the checkout's root directory with
both Compose files, so each job uses the same Core volume and environment that
Core uses. The first step sets this for your shell session.
1. Prepare the release and its images¶
-
Check out the release and select both Compose files for this shell:
git clone https://github.com/Lesur-ai/hivemind.git cd hivemind git checkout <release-tag> export COMPOSE_FILE=docker-compose.yml:docker-compose.auth17.yml -
Pull the Core release image and use its immutable digest reference, so the initialization jobs, the installer and the stack all run the same image:
docker pull registry.example/hivemind:<release-tag> export HIVEMIND_IMAGE=registry.example/hivemind@sha256:<digest> export HIVEMIND_PULL_POLICY=never -
Prepare the other images of the stack. The start script below never builds or pulls, so the WAF and Graph images are built from this checkout and the Neo4j and Qdrant images are pulled now:
docker compose build waf graph-memory docker compose pull neo4j qdrant
2. Write the configuration¶
-
Create the protected configuration file from the template:
cp .env.example .env chmod 600 .env -
Edit
.envand set:ADMIN_BOOTSTRAP_KEY: an independent random value of at least 32 characters. The Compose stack requires it, but with the authority store it admits nothing and is not the owner's credential.NEO4J_PASSWORD: another independent random value of at least 32 characters, starting with a letter or a digit.S3_ENDPOINT_URL,S3_ACCESS_KEY_ID,S3_SECRET_ACCESS_KEY,S3_REGION_NAMEandS3_SIGNATURE_MODEfor your S3 service.S3_BUCKET_NAMEis set after installation.SITE_ADDRESS=hivemind.example.org, so the WAF terminates TLS with a Let's Encrypt certificate for that name.WAF_PORT=127.0.0.1:8080, so the plain HTTP listener is published on loopback only.HIVEMIND_MESH_ENABLED=false, because this server is deliberately not a Mesh peer. Leave the otherHIVEMIND_MESH_*values empty.- The
INFERENCE_CHAT_*andINFERENCE_EMBEDDING_*families if you have them, following the provider profile guide.
Type secrets into the file, never into command arguments, and never commit
.env. -
Publish the TLS ports. In
docker-compose.yml, uncomment the80:80and443:443port lines of thewafservice, and itscaddy_dataandcaddy_configvolume lines together with the matchingcaddy_data:andcaddy_config:entries under the top-levelvolumes:, so certificates survive restarts.
3. Initialize the volumes¶
-
Initialize the operational volume:
docker compose run --rm --no-deps hivemind-operational-init -
Create a private parent directory for the installation record, owned by the container user (UID 10001) with mode 0700. The installer writes into a new child of it:
sudo install -d -o 10001 -m 0700 /srv/hivemind/private INSTALL_RECORD=/srv/hivemind/private/fresh-install
4. Create the authority store and the first owner¶
-
Run the installer with your own email as first owner:
docker compose run --rm --no-deps \ -v "$(dirname "$INSTALL_RECORD"):/data/install" hivemind \ python -m live_mem.auth_install_cli \ --store-path /data/core/authority.sqlite \ --owner-email owner@example.org \ --output-directory "/data/install/$(basename "$INSTALL_RECORD")"By default the installer allocates a new bucket. To use an empty bucket you prepared, add
--storage-profile portable --destination-bucket <bucket-name>. Keep--store-pathdirectly under/data/core. -
Read the JSON result. It names the selected bucket and the owner, and carries
local_setup: the one-time setup access for the owner's account. It works once and expires 24 hours after installation. Keep it privately; it is not stored in the installation record or in the bucket. Ifstorage_conditions_honoredisfalse, the S3 service ignored a write condition: acceptable for a test server only under the S3 support residual risk. -
Set
S3_BUCKET_NAMEin.envto the bucket from the result. -
Keep the installation record directory as evidence. If the installer refuses or is interrupted, do not delete its output or retry against the same bucket; see Troubleshoot.
The installer makes the first owner a deployment operator, creates the default tenant and writes the Core volume's private files. It creates no agent and no agent credential.
5. Start the stack¶
-
Start the store-backed stack with the inspected image digest:
scripts/authority-compose.sh -
List the services and wait until they are running:
docker compose ps
6. Let the WAF attest HTTPS to Core¶
Core accepts browser sign-in only when HTTPS is attested by an explicit
immediate proxy. Here that proxy is the WAF container on the stack's internal
hivemind-network network. Without this setting, every browser sign-in is
refused.
-
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> -
Add that subnet to
.envas a JSON list, for exampleAUTH_BROWSER_TRUSTED_PROXIES=["<subnet>"]. Use the actual subnet, never all private address ranges. -
Apply it by running
scripts/authority-compose.shagain.
7. Activate the first owner's account¶
Do this before the setup access expires. It turns the installation's one-time setup access into a signed-in deployment operator with a password and an authenticator.
- Open
https://hivemind.example.org/and choose First time here? Set up your account. - Paste the setup access from the installer into Setup access, then choose your password in New password and Repeat the password (12 to 1024 characters).
- Scan the QR code with your authenticator app, or open Can’t scan? Enter the setup key instead.
- Enter the six-digit Code from your authenticator.
- Save the eight recovery codes shown under Save your recovery codes, then tick I have saved these recovery codes. They are shown once.
If the setup access expired or was lost, issue a new one offline as shown in Troubleshoot.
8. Admit your colleagues¶
Protected actions ask you to confirm with your password and an authenticator code (Confirm it is you).
- Open Operator tools, Identity & Groups, tab Users, and select Create local user.
- Enter the colleague's Email and confirm. The user is created with no rights.
- In Hand over this setup access, copy the one-time setup access, give it to that person through a private channel, and tick I have handed it over. It works once and expires in 24 hours.
- The colleague opens the server, chooses First time here? Set up your account, and completes the same setup as in step 7. Until then the Users list shows Local setup pending; a lost or expired setup access is replaced from that user's drawer with Replace setup access….
- Repeat for each colleague.
- Name a second operator, so the server does not depend on you alone. Once that colleague's account is active, open their user drawer and choose Grant operator access… under Deployment role. Give no one else operator access.
9. Create the test space and give your colleagues access¶
Creating an account grants no rights, and only the creator of a space receives access to it. Each colleague therefore needs an explicit grant. The Portal offers a colleague as a recipient only once their account is active, so finish step 8 first.
- Open Spaces and select Create space.
- Enter a Display name and a Space ID, written
<space-id>below (lowercase letters, digits and single hyphens, up to 64 characters), then finish the dialog. You receive Manage on it as its creator. - Open Operator tools, Memory Operations, and open
<space-id>. - In its Access section, select Grant access….
- Choose User as Recipient type, the colleague as Recipient, Read + write as Access level, and enter a Purpose (recorded in the audit), then select Grant access. Do not choose Manage: people and agents get read and write for daily work.
- Repeat for each colleague. The space's Direct access list shows each of them with Read + write.
- Ask one colleague to sign in, open Account and check that
Granted rights lists
space: <space-id>with the actionsreadandwrite, and that<space-id>appears under Spaces.
The full grant reference, including groups and projects, is in Grant or remove access and Identity and access.
10. Create two agents and their credentials¶
Each agent gets its own identity and credential; never share one between agents, and never use your own operator session or credential for agent work.
- In Identity & Groups, tab Agents and credentials, select Create agent.
- Enter an Agent name, for example
<agent-a>, keep Association on Standalone — no user, choose<space-id>as Resource and Read and write as Access level. Do not choose Manage this resource. - Repeat for the second agent,
<agent-b>. - Under Credentials, select Issue credential, choose
<agent-a>and add a Description that names the machine. An operator-issued credential lasts at most seven days: leave Expiry (UTC, optional) empty for 24 hours, or enter a UTC time at most seven days ahead in the exact form2026-11-23T09:00:00.000000Z. - Copy the One-time token from Save this credential now, then select I have saved it. The token is shown once.
- Repeat for
<agent-b>.
Deliver each token privately to the person who runs that agent. Before a token expires, issue its replacement, update the client, then revoke the old credential, as in Change, rotate or remove an agent. For a longer test, a colleague with Read + write on the space can instead create an agent linked to their own account under Account, Agents, Create agent, with a token lifetime of up to 365 days; such an agent never exceeds its owner's rights.
11. Connect the two agents from two machines¶
On each of the two machines, connect one agent with its own token, using
https://hivemind.example.org/mcp as the server address:
Agent A runs on one machine, agent B on the other. Use the token from step 10
with the guide's Agent credential option. The guide's identity check and
the Verify section of this page expect the same system_whoami
answer.
12. Back up before experimenting¶
Take a backup before the team starts writing, and before any experiment you may want to undo.
-
Stop the writers, then Graph's two datastores. With Core, the worker and Graph stopped, nothing changes the memory or the stores; Neo4j and Qdrant are separate services that keep writing their own files while they run, so stop them too before you copy their volumes:
docker compose stop hivemind hivemind-worker graph-memory docker compose stop neo4j qdrant -
With your S3 provider's tooling, copy every current object of the test bucket off-host. The bucket holds the memory itself (notes, banks, trash) and
_system/, with the authority snapshots and exported audit history. Bucket versioning is not a backup. - In the same stopped window, with your usual Docker volume backup tool,
copy the whole Core private volume (
hivemind_core_data, which Compose prefixes with the project name) as one unit, and Graph's Neo4j and Qdrant volumes (neo4j_data,qdrant_data). Keep the copies encrypted and private: the Core volume holds the authority store, the private sign-in stores with their keys and Graph's credential. - Still in the same window, take the authority snapshot and the operational
snapshot with the two commands of
Back up and restore, and keep both
files with their manifests. A raw copy of the operational volume
(
hivemind_operational) is not a backup you can restore: the operational restore command accepts only a snapshot and its manifest. - Restart with
scripts/authority-compose.sh, which starts every service again, Neo4j and Qdrant included.
Copies taken in different windows are not one recovery point: record which bucket copy, volume copies and snapshot files belong together. Restore order is in Back up and restore and the fresh-install recovery procedure.
Verify¶
Check each layer separately.
Service reachability. From a team machine:
curl -fsS https://hivemind.example.org/health
HTTP 200 means the service answers through TLS.
Human sign-in. Sign out, then sign in with your email, password and a code from your authenticator. In Identity & Groups, tab Users, every colleague who finished setup shows Local password + TOTP under Sign-in methods; you and your second operator show Deployment operator in the user drawer.
Agent authentication. On each machine, ask the agent to call
system_whoami. For an agent created in the Portal, it answers
auth_type: auth17, a client_name that is the agent's UUID, not its display
name, and allowed_spaces listing the spaces it can read, here <space-id>.
Compare client_name with the Agent ID in the agent's details under
Identity & Groups, tab Agents and credentials. Its permissions list
is empty: that legacy field does not describe native grants, so it proves
neither read and write nor the absence of manage. Check the rights in the
Portal instead: in the Credentials list, open the agent's credential; its
Effective rights show <space-id> with read and write, without manage.
Then check that an invalid bearer is refused:
curl -s -o /dev/null -w '%{http_code}\n' -X POST \
-H 'Authorization: Bearer invalid' -H 'Content-Type: application/json' \
-d '{}' https://hivemind.example.org/mcp
The expected output is 401.
Shared space. Ask agent A to write a short note with short_note in
<space-id>, containing a sentence you will recognize. Ask agent B, on the
other machine, to call short_read on <space-id>: the result contains that
note. Each agent's
space_rules, mid_read_all and short_read succeed on <space-id> and fail
on a space it was not given.
Inference readiness. /health reports "status": "healthy" when the chat
and embedding providers are configured; degraded with "LLMaaS not
configured" means short memory works but consolidation and long memory cannot
run yet. long_status on <space-id> answers status: ok with
embedded: true. Core also checks the storage write witness at startup, which
/health does not report:
docker compose exec hivemind python -m live_mem.core.maintenance_cli status
Read storage_qualification in its output.
Troubleshoot¶
Every browser sign-in is refused, while /health answers.
Cause: Core does not trust the WAF to attest HTTPS. Fix: set
AUTH_BROWSER_TRUSTED_PROXIES to the subnet of the stack's network (step 6) and
run scripts/authority-compose.sh again.
The owner's setup access expired or was lost. Cause: the installer's setup access is single-use and lasts 24 hours. Fix: stop Core, issue a replacement, deliver it privately, and start the stack again:
docker compose stop hivemind hivemind-worker
docker compose run --rm --no-deps hivemind \
python -m live_mem.auth_install_cli local setup \
--store-path /data/core/authority.sqlite --user owner@example.org
scripts/authority-compose.sh
This revokes earlier unused setup accesses and refuses a user who already has local credentials. For a colleague, an operator uses Replace setup access… or Add local sign-in in the Portal instead.
Core image must have exactly one immutable RepoDigest.
Cause: HIVEMIND_IMAGE names a locally built image or one with several
registry digests. Fix: pull the release image and set HIVEMIND_IMAGE to its
@sha256: reference.
The start script fails because an image is missing. Cause: the script starts the stack without building or pulling. Fix: run the build and pull commands of step 1 from the same checkout.
The installer reports install_output_exists, install_refused_before_submission
or install_retained_intent.
Cause: the output path already exists, the destination was refused before any
S3 change, or an attempt may have changed S3. Fix: keep the record directory
and the bucket as they are, for investigation; start again with a new output
directory and a new destination. The
fresh-install guide
explains each case.
Graph does not start, or the adoption job reports core_volume_layout.
Cause: the store path is nested below /data/core. Fix: keep
AUTHORITY_STORE_PATH and --store-path directly in /data/core.
Short notes work but memory-bank (MID) writes, such as consolidation, fail with auth17_commit_unqualified.
Cause: the startup storage witness failed on your S3 service. Fix: read the
code with the maintenance_cli status command above or in the Core log line
storage_qualification, fix or replace the storage service, and restart Core.
/health reports degraded.
Cause: chat or embedding inference is not configured. Fix: configure both
families in .env and restart; short memory keeps working meanwhile.
Next¶
- Moving to production: install a new instance with the production guide, with its own bucket and store, and recreate spaces, people and agents there. Do not reuse this server's bucket or volume for production.
- Configure models for consolidation and long memory: Choose inference providers.
- Manage people, groups and grants day to day: Identity and access and Manage spaces.