Shared services for a fleet of ArchiveBox servers.
TLSNotary · Favicons · LocalAI · Proxy · Sonic · Gatus · Tailscale · ...
ArchiveBox users run individual servers that capture and store web pages and provide the UI, API, and CLI for daily use. Some services make more sense to run on a separate server shared by a fleet, for example: the TLSNotary verifier, AI inference, VPN / caching proxy services, centralized search indexes, and others...
ArchiveBox Hub packages these shared components from abx-plugins into one deployment. A fleet can use public services where available, or self-host the stack for more privacy and control while each ArchiveBox server keeps its own archives.
Linux · Docker Engine · Compose v2.24+ or v5
git clone https://github.com/ArchiveBox/archivebox-hub /opt/archivebox.hub
cd /opt/archivebox.hub
echo 'HUB_BASE_URL=https://hub.archivebox.io' >> .env
docker compose up- Replace
hub.archivebox.iowith the hub's hostname and point DNS at the server. - Open TCP 80, 443, and the enabled service ports; the proxy’s WireGuard listener additionally uses UDP 5787.
- Allow at least 4 GiB RAM for TLSNotary plus the OS; inference models need additional memory and disk.
- First start builds the controller, pulls plugin images, generates signing keys, and obtains HTTPS certificates.
- Use
docker compose up -dto run in the background; each plugin mountsdata/<plugin>/at/data. The hub prepares these directories for UID/GID911:911; Tailscale runs as root to configure its TUN interface and routes.
Example service summary (all installed plugins are enabled by default):
[+] Starting ArchiveBox hub server...
+ Nginx gateway listening on https://hub.archivebox.io
+ TLSNotary listening on https://hub.archivebox.io:5781
+ LocalAI listening on https://hub.archivebox.io:5784
+ ArchiveBox Proxy listening on tcp://127.0.0.1:5785
+ ArchiveBox Proxy WireGuard listening on wireguard://hub.archivebox.io:5787
+ Sonic listening on tcp://127.0.0.1:5786
+ Gatus listening on https://hub.archivebox.io:5780
+ Tailscale available at https://login.tailscale.com/admin/machines
+ Favicon listening on https://hub.archivebox.io:5783
+ ...
Real Docker deployment on walnut.local, captured December 3, 2026; plugin deployments are discovered automatically...
docker compose exec hub archivebox-hub --version
docker compose exec hub archivebox-hub status
docker compose logs -f hub nginx
# One-off CLI container:
docker compose run --rm --no-deps hub archivebox-hub --versionSet hub variables in /opt/archivebox.hub/.env, then run docker compose up -d --force-recreate hub nginx. Start from .env.example.
- Required · HTTP(S) hostname without a path or port, e.g.
https://hub.archivebox.io; sets the homepage, service URLs, status checks, and certificate hostname.
- Default: all installed hub plugins, including future additions. Leave unset or blank to run all of them, or set a complete comma-separated list to run a subset; see Services for names.
- Default:
{}· Set a JSON object such as{"tlsnotary":"https://tlsnotary.archivebox.io"}to give a service its own domain while retaining its dedicated port; keys may be plugin or service names.
- Default:
letsencryptfor an HTTPS base URL,offfor HTTP · Useoffbehind another TLS terminator; nginx then serves plain HTTP internally.
- Default:
[email protected]· Set another email address in.envto receive Let’s Encrypt notices for this hub.
- Default:
0.0.0.0· Set127.0.0.1to keep nginx’s published ports on loopback when using Cloudflare Tunnel or another local ingress.
| Plugin | Endpoint | Selection |
|---|---|---|
🔏 tlsnotary |
HTTPS 5781 |
Default |
🧠 localai |
HTTPS 5784 |
Default |
⚡ proxy |
TCP 5785; WireGuard UDP 5787 |
Default |
🔎 search_backend_sonic |
TCP 5786 |
Default |
📊 gatus |
HTTPS 5780 |
Default |
🌐 tailscale |
Tailnet exit node | Default |
🖼️ favicon |
HTTPS 5783 |
Default |
| ... | ... | ... |
Get signed attestations of page contents from a shared verifier, with a browser UI for inspecting receipts.
- Endpoint:
https://HOST:5781· Plugin source. - Compose mounts
./data/tlsnotaryat/data; the gateway runs as911:911and retains its signing identity in/data/signing.pem. - The verifier is isolated on its own Docker network and currently requires amd64 or Docker’s amd64 emulation.
- Default:
1· Set a positive integer to admit more simultaneous proofs only after provisioning enough verifier RAM.
- Default:
1024· Set the minimum free memory (at least512MiB) required to admit a proof, preserving headroom for other hub services.
- Default:
4h· Set atimeoutduration such as2hto recycle the verifier process and bound retained memory.
- Default:
ghcr.io/archivebox/tlsnotary-gateway:latest· Set an image tag or digest to pin the signing gateway and key-initialization image.
Host inference for AI capture features and share installed models across a fleet.
- Endpoint:
https://HOST:5784/v1· LocalAI. - Install a model through LocalAI; models, backends, and configuration persist under
data/localai/. - Configure OpenAI-compatible clients, including supported OpenCode and Stagehand integrations, with the API URL, key, and installed model name.
- Default: generated by the LocalAI plugin and saved in
data/localai/api_key· Use this key in inference clients, or set a long random secret in.envto replace it.
- Default:
localai/localai:v5.1.1· Set a compatible LocalAI image tag or digest when choosing a different release/backend; GPU images also require the corresponding Compose device configuration.
- Default:
2· Set a positive CPU count, including fractions, to allocate CPU inference capacity without exhausting the hub.
- Default:
4g· Set a Docker memory limit such as8glarge enough for the installed models and their context windows.
Share a cache to reduce repeated upstream requests, or route capture traffic through the proxy’s WireGuard listener on the hub.
- Endpoints: HTTP CONNECT on loopback
127.0.0.1:5785; authenticated WireGuard on UDP 5787 · ArchiveBox Proxy. - Cache lifetime is 24 hours, subject to stricter origin policy; recording and archive replay are disabled.
- Cache keys include Cookie, Authorization, and all other end-to-end request headers;
Set-Cookie,private, andno-storeresponses are excluded. - Use Tailscale or SSH to reach the HTTP listener remotely; install the proxy’s CA on HTTPS clients.
- WireGuard peers receive network access through the proxy container; distribute their configurations only to trusted workers.
- Default: the
HUB_BASE_URLhostname plus:5787· Set a directly reachablehostname:portfor the proxy’s generated client configuration when using a separate UDP hostname or NAT mapping; setHUB_SERVICE_URLS["proxy-wireguard"]to the matchingwireguard://hostname:portfor its homepage link.
The proxy plugin README contains the complete worker Compose example, DNS configuration, and CA setup:
archivebox:
network_mode: service:wireguard
depends_on: {wireguard: {condition: service_healthy}}- All capture tools use the sidecar’s routes through their ordinary sockets.
- Verified with real ArchiveBox captures of Hacker News, including saved HTML and screenshots, with TLS verification enabled; repeated assets and separate cookie sessions exercised the cache.
docker compose -p archivebox-hub-plugins -f data/compose.json exec -T proxy archivebox-proxy --data /data --export-ca > proxy-ca.pem
HTTPS_PROXY=http://127.0.0.1:5785 curl --cacert proxy-ca.pem https://news.ycombinator.com/Run a shared Sonic full-text index for a fleet of ArchiveBox servers.
- Endpoint:
127.0.0.1:5786· Sonic. - The deployment is an infrastructure example; ArchiveBox still needs server ownership/permalinks and remote snapshot URLs/UUIDs before cross-server search can work in the UI, CLI, and API.
- Implementation scope and connection examples: Sonic plugin README.
- Default: generated by the Sonic plugin and saved in
data/search_backend_sonic/password· Use this password in Sonic clients, or set a long random password in.envto replace it; remote clients reach the loopback listener through an SSH/VPN tunnel.
Show hub service availability and response-time history, with checks generated from the enabled plugins and their advertised URLs.
- Endpoint:
https://HOST:5780· Gatus. - Public HTTP services are checked through their advertised URLs; LocalAI and native TCP services get reachability checks. Verify WireGuard with an enrolled peer.
- The Gatus plugin generates its own checks in
data/gatus/config.yaml; SQLite history persists indata/gatus/. - The homepage embeds this plugin’s dashboard in an iframe.
- In
HUB_SERVICE_URLS, add"gatus":"https://status.hub.example.org"to the shared JSON object to give the status page its own hostname; changes to any service URL automatically update its checks.
Offer a Tailscale exit node that routes a fleet’s archiving traffic through its host.
- Approve the advertised exit node in the Tailscale admin console and allow intended users in the tailnet policy.
- To also expose a separately installed proxy to tailnet users, configure optional Tailscale Serve forwarding.
- Enrollment and worker commands: Tailscale plugin README.
- Default: empty · Set a Tailscale auth key in the hub’s
.envfor enrollment, or open the login URL printed in container logs; the worker example also requires its own auth key.
- Default:
archivebox-hub· Set the hub’s name in the tailnet so workers can identify its exit node.
Use an ArchiveBox image containing the fix for tunnel interfaces without MAC addresses. Save this 17-line docker-compose.yml, set TS_AUTHKEY and HUB_EXIT_NODE, then run docker compose up -d:
services:
tailscale:
image: tailscale/tailscale:v1.106.3
restart: unless-stopped
environment: {TS_AUTHKEY: "${TS_AUTHKEY:?Set TS_AUTHKEY}", TS_EXTRA_ARGS: "--exit-node=${HUB_EXIT_NODE:?Set HUB_EXIT_NODE} --exit-node-allow-lan-access=false",
TS_USERSPACE: "false", TS_ACCEPT_DNS: "true", TS_AUTH_ONCE: "true", TS_STATE_DIR: /var/lib/tailscale}
volumes: ["./tailscale:/var/lib/tailscale"]
devices: ["/dev/net/tun:/dev/net/tun"]
cap_add: [NET_ADMIN]
ports: ["127.0.0.1:5797:5797"]
healthcheck: {test: [CMD, tailscale, status], interval: 5s, timeout: 5s, retries: 12}
archivebox:
image: archivebox/archivebox:latest
restart: unless-stopped
network_mode: service:tailscale
depends_on: {tailscale: {condition: service_healthy, restart: true}}
volumes: ["./data:/data"]- Open ArchiveBox at
http://localhost:5797; publish its port on the sidecar that owns the shared network. - Tailscale supplies exit-node routing and DNS; explicit HTTP caching uses the proxy configuration above.
Fetch and cache website icons through a self-hosted besticon service instead of using Google’s favicon fallback.
- Endpoint:
https://HOST:5783/icon?url=github.com&size=64. - nginx’s persistent cache lives under
data/favicon/.
- In
HUB_SERVICE_URLS, add"favicon":"https://icons.hub.example.org"to the shared JSON object to serve icons from a dedicated hostname.
...
HUB_BASE_URL=https://hub.archivebox.io
HUB_SERVICE_URLS={"tlsnotary":"https://tlsnotary.archivebox.io","favicon":"https://favicon.archivebox.io"}
# ... add other service domains to the same JSON object.| Dedicated port | Additional hostname |
|---|---|
https://hub.archivebox.io:5781 |
https://tlsnotary.archivebox.io |
https://hub.archivebox.io:5783 |
https://favicon.archivebox.io |
| ... | ... |
- Point all configured hostnames at the hub and allow port 80 for certificate validation.
- nginx retains each dedicated port and adds port 443 for the separate hostname; Let’s Encrypt covers those hostnames in the hub certificate.
- Domain handling reuses the port routes in fewer than 100 added lines.
- Find
*/hub/docker-compose.ymlthroughabx_plugins.get_plugins_dir(). - Copy packaged deployment assets into
data/plugins/<plugin>/hub/; persistent plugin state lives separately indata/<plugin>/. - Select plugins with
HUB_PLUGINS_ENABLED, then resolve their Compose services, ports, volumes, networks, and OCI title/source labels. - Generate nginx routes, homepage links, and
services.json; plugins own their containers, listeners, credentials, and service configuration.
- Internally, services without profiles or with a profile matching the plugin name run together; other profiles remain standalone deployment choices.
- HTTP entrypoints declare long-form
portswithapp_protocol: http,target, and a stablepublishedport; root paths and WebSockets are preserved. - HTTP ports: 5780–5784 and 5790–5799; choose a free port in 5790–5799 for new HTTP plugins. Native TCP/UDP listeners retain the bindings declared by their plugin.
- For example, the proxy declares its WireGuard listener with
protocol: udpandapp_protocol: wireguard; the controller preserves these Compose settings. - Duplicate service names or port/transport pairs fail before startup; HTTP entrypoints join the gateway network.
- A plugin can provide
hub/index.htmlwith$SERVICE_URLfor an embedded UI; Gatus supplies its own iframe and readsservices.jsonto generate checks. Portless services can expose a link with the standard OCIorg.opencontainers.image.urllabel. - Restart regenerates deployment files; make persistent changes in the source plugin or supported
.envvariables, then rebuild with an updated plugin revision. - Plugins run trusted Compose services through the controller’s Docker socket access. Run Compose from the checkout so host/container bind paths agree.
- Uncomment
argoin docker-compose.yml, based on the checked-in Cabbage configuration. - Create tunnel credentials and give root-only services separate hostnames:
HUB_BASE_URL=https://hub.example.org
HUB_TLS=off
HUB_BIND=127.0.0.1
HUB_SERVICE_URLS={"gatus":"https://status.hub.example.org","tlsnotary":"https://tlsnotary.hub.example.org","favicon":"https://icons.hub.example.org"}
# ... add other service domains to the same JSON object.# etc/cloudflared/config.yml
tunnel: YOUR_TUNNEL_UUID
credentials-file: /etc/cloudflared/YOUR_TUNNEL_UUID.json
ingress:
- hostname: hub.example.org
service: http://nginx:80
- hostname: status.hub.example.org
service: http://nginx:5780
- hostname: tlsnotary.hub.example.org
service: http://nginx:5781
- hostname: icons.hub.example.org
service: http://nginx:5783
# ... add other plugin hostnames above the final catch-all.
- service: http_status:404Use matching hostnames in the tunnel configuration and HUB_SERVICE_URLS.
- Use
HUB_BASE_URL=http://walnut.local(substitute a reachable development hostname),HUB_TLS=off, andHUB_BIND=127.0.0.1. - Gatus must resolve that hostname to nginx; add the same Docker network alias when using a local name.
.localhostresolves inside each container. - The screenshots show this local deployment and its retained check history.
Back up .env and data/, especially signing keys, proxy CAs, Tailscale identity, and status history.
git pull --ff-only
docker compose build --pull hub
docker compose up -d --force-recreate hub nginx- Replace the old
HUB_PLUGINS/HUB_PROFILESsettings with one completeHUB_PLUGINS_ENABLEDlist; useproxyfor both proxy listeners. docker compose downgracefully stops the controller and removes plugin containers while preserving bind-mounted state.- Use
docker compose exec hub archivebox-hub downto remove plugin containers directly. - After an abrupt controller exit, inspect them with
docker compose -p archivebox-hub-plugins -f data/compose.json ps. - Before upgrading an existing hub, stop it and move each
data/plugins/<plugin>/hub/data/directory todata/<plugin>/. For LocalAI, also move the contents of its nestedlocalai/directory intodata/localai/; for Gatus, moveconfig/config.yamltodata/gatus/config.yaml. Keep keys, credentials, cache, and history together. - When upgrading the original
statuspagedeployment, move its state todata/gatus/and changestatuspagetogatusin.env.


