Deploy & run
Two options, depending on who is running indice:
- On your laptop you can grab a prebuilt binary and run
indice serve. That’s the whole story for local use; see Install and Try it in a minute. - As a server — run the container image behind a TLS-terminating proxy. The batteries-included
compose.yamldoes this in one command with Caddy, which fetches and renews a Let’s Encrypt certificate for you.
Container image
Section titled “Container image”A multi-arch image (linux/amd64 + linux/arm64) is published to the GitHub Container Registry on every release:
docker run -p 8080:8080 -v indice-data:/data ghcr.io/edsu/indice:latest/data is indice’s home (archive/ + index/) — mount a volume so it survives restarts. The image runs the read-only server by default.
One command with Caddy (recommended)
Section titled “One command with Caddy (recommended)”compose.yaml runs indice behind Caddy:
# local / dev — plain HTTP on :80docker compose up -d
# production — set your domain and Caddy provisions HTTPS automaticallySITE_ADDRESS=archive.example.org docker compose up -dCaddy passes byte-range requests straight through so ReplayWeb.page’s ranged reads of large WACZs replay correctly through the proxy. Named volumes persist indice’s /data and Caddy’s certificates. (compose.yaml builds the image from the repo by default; to pull the published image instead, follow the comment in the file.)
Load archives by indexing into the running container:
docker compose cp your.wacz indice:/data/your.waczdocker compose exec indice indice index --collection "Your Collection" /data/your.waczManagement over the network
Section titled “Management over the network”The simplest management needs none of this: indice serve --manage on loopback (the local case) trusts every request — it’s just you on your machine, no login. docker compose up alone is read-only. To open the in-browser management surface to authenticated admins over the network, add one of two overlays, both built on the same forward-auth mechanism:
- Basic auth (below) — a single admin password, nothing else to run. The quickest way to get management over the network.
- Single sign-on (next section) — log in with GitHub / Google / OIDC via oauth2-proxy, with a real logout. The upgrade for multiple admins or existing SSO.
Basic auth
Section titled “Basic auth”compose.manage.yaml is an overlay that adds the write surface. It keeps the public site read-only and gates /manage + the write APIs behind HTTP Basic auth, forwarding the authenticated user to indice via forward-auth. Run it alongside the base file:
docker compose -f compose.yaml -f compose.manage.yaml up -dIt needs three values, e.g. in a .env file next to compose.yaml:
ADMIN_USER=youADMIN_PASSWORD_HASH='$2a$14$...' # single-quoted — see the note belowINDICE_AUTH_PROXY_SECRET=a-long-random-stringGenerate the password hash with Caddy:
docker run --rm caddy:2 caddy hash-password --plaintext 'yourpassword'Basic auth is a simple stopgap for one or a few admins. For real single sign-on, use the SSO overlay below instead.
Single sign-on (oauth2-proxy)
Section titled “Single sign-on (oauth2-proxy)”compose.sso.yaml + Caddyfile.sso put oauth2-proxy in front of the management surface, so admins log in with GitHub (or any OIDC provider) instead of a shared password. indice’s forward-auth is unchanged — oauth2-proxy performs the login and Caddy forwards the identity — and you get a real logout (/logout clears indice’s display cookie and oauth2-proxy’s session).
The example uses GitHub, which is the easiest to try: GitHub allows http://localhost callback URLs, so you can test the whole flow locally.
- Create a GitHub OAuth App (Settings → Developer settings → OAuth Apps → New) with Authorization callback URL
http://localhost/oauth2/callback(use yourhttps://your-domain/oauth2/callbackfor production). - Put its credentials in
.env:Terminal window GITHUB_CLIENT_ID=...GITHUB_CLIENT_SECRET=...OAUTH2_PROXY_COOKIE_SECRET= # a 32-char secret from: openssl rand -hex 16INDICE_AUTH_PROXY_SECRET=a-long-random-string# GITHUB_USER=you # allow-list a single login (defaults to edsu)# OAUTH2_PROXY_COOKIE_SECURE=true # in production (HTTPS)# OAUTH2_PROXY_REDIRECT_URL=https://your-domain/oauth2/callback - Run it alongside the base file:
Terminal window docker compose -f compose.yaml -f compose.sso.yaml up -d
Only the allow-listed GitHub user(s) can reach management; everyone else sees the read-only site. Clicking Log in sends you to GitHub; after authorizing you land back where you were with the workroom chrome. To widen access beyond one user, set OAUTH2_PROXY_GITHUB_ORG / OAUTH2_PROXY_GITHUB_TEAM (or switch OAUTH2_PROXY_PROVIDER to Google/OIDC/etc.) — see the oauth2-proxy docs.