Skip to content

Run an index

The index is bobbin, the service behind the Tangled API. It keeps everything in memory and rebuilds it from a hydrant stream on every start, so it needs no database. It also needs a slingshot for records and identities.

Build it:

nix build .#bobbin

Configure it with environment variables:

VariableValue
BOBBIN_SERVICE_DIDRequired. The index’s own DID, for example did:web:index.example.com.
BOBBIN_HYDRANT_URLYour hydrant, for example wss://hydrant.example.com.
BOBBIN_SLINGSHOT_URLYour slingshot. Hydrant serves this too, so it is often the same host.
BOBBIN_MIRROR_URLYour knotmirror. Without it, repository pages have no code.
BOBBIN_BINDAddress to listen on. Defaults to 127.0.0.1:8090.
BOBBIN_CORS_ORIGINSOrigins of the web apps that call the index, for example https://tangled.example.com.
BOBBIN_TRUSTED_PROXIESIPs or CIDRs of your reverse proxy, so knots rate-limit per visitor.

Every other setting is optional. bobbin config-template prints all of them with their defaults, and you can put them in a TOML file passed with --config instead. Check the configuration, then start it:

./result/bin/bobbin validate
./result/bin/bobbin

Put a reverse proxy in front of it for TLS.