Skip to content

About

☀️ Central ArchiveBox hub that can run shared services used by many servers, e.g. Tailscale VPN exit node, TLSNotary attestation, HTTP/3 caching proxy, central search index, favicon service, LocalAI LLM inference service, and more...

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Repository files navigation

ArchiveBox

ArchiveBox Hub

Shared services for a fleet of ArchiveBox servers.

TLSNotary · Favicons · LocalAI · Proxy · Sonic · Gatus · Tailscale · ...

Get started · Services · Tailscale setup · Ports & domains

MIT License Docker Compose abx-plugins

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.

ArchiveBox Servers A, B, and C connect to one ArchiveBox Hub and its shared plugins.

Initial setup

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.io with 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 -d to run in the background; each plugin mounts data/<plugin>/ at /data. The hub prepares these directories for UID/GID 911: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
    + ...

Running ArchiveBox Hub homepage and embedded status checks.

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 --version

Configuration

Set hub variables in /opt/archivebox.hub/.env, then run docker compose up -d --force-recreate hub nginx. Start from .env.example.

HUB_BASE_URL

  • 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.

HUB_PLUGINS_ENABLED

  • 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.

HUB_SERVICE_URLS

  • 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.

HUB_TLS

  • Default: letsencrypt for an HTTPS base URL, off for HTTP · Use off behind another TLS terminator; nginx then serves plain HTTP internally.

ACME_EMAIL

  • Default: [email protected] · Set another email address in .env to receive Let’s Encrypt notices for this hub.

HUB_BIND

  • Default: 0.0.0.0 · Set 127.0.0.1 to keep nginx’s published ports on loopback when using Cloudflare Tunnel or another local ingress.

Services

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
... ... ...

🔏 tlsnotary

ArchiveBox captures the website and sends separate attestation requests to the TLSNotary verifier.

Get signed attestations of page contents from a shared verifier, with a browser UI for inspecting receipts.

TLSNotary verification UI running on the hub.

  • Endpoint: https://HOST:5781 · Plugin source.
  • Compose mounts ./data/tlsnotary at /data; the gateway runs as 911:911 and 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.

Configuration

TLSNOTARY_MAX_SESSIONS

  • Default: 1 · Set a positive integer to admit more simultaneous proofs only after provisioning enough verifier RAM.

TLSNOTARY_MIN_AVAILABLE_MEMORY_MB

  • Default: 1024 · Set the minimum free memory (at least 512 MiB) required to admit a proof, preserving headroom for other hub services.

TLSNOTARY_VERIFIER_MAX_AGE

  • Default: 4h · Set a timeout duration such as 2h to recycle the verifier process and bound retained memory.

TLSNOTARY_GATEWAY_IMAGE

  • Default: ghcr.io/archivebox/tlsnotary-gateway:latest · Set an image tag or digest to pin the signing gateway and key-initialization image.

🧠 localai

OpenCode sends authenticated inference requests to LocalAI.

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.

Configuration

LOCALAI_API_KEY

  • 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 .env to replace it.

LOCALAI_IMAGE

  • 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.

LOCALAI_CPUS

  • Default: 2 · Set a positive CPU count, including fractions, to allocate CPU inference capacity without exhausting the hub.

LOCALAI_MEMORY

  • Default: 4g · Set a Docker memory limit such as 8g large enough for the installed models and their context windows.

⚡ proxy

ArchiveBox routes through a WireGuard sidecar to the proxy plugin running on ArchiveBox Hub, then to upstream websites.

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, and no-store responses 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.

Configuration

PROXY_WIREGUARD_ENDPOINT

  • Default: the HUB_BASE_URL hostname plus :5787 · Set a directly reachable hostname:port for the proxy’s generated client configuration when using a separate UDP hostname or NAT mapping; set HUB_SERVICE_URLS["proxy-wireguard"] to the matching wireguard://hostname:port for its homepage link.

ArchiveBox through WireGuard

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.

HTTP proxy client

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/

🔎 search_backend_sonic

Sonic client connects through a TCP tunnel to the shared index.

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.

Configuration

SONIC_CHANNEL__AUTH_PASSWORD

  • 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 .env to replace it; remote clients reach the loopback listener through an SSH/VPN tunnel.

📊 gatus

The browser displays Gatus while Gatus probes hub services and stores history.

Show hub service availability and response-time history, with checks generated from the enabled plugins and their advertised URLs.

Running Gatus dashboard with real hub service checks.

  • 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 in data/gatus/.
  • The homepage embeds this plugin’s dashboard in an iframe.

Configuration

  • 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.

🌐 tailscale

ArchiveBox shares a local Tailscale sidecar network and routes through the exit node to the Internet.

Offer a Tailscale exit node that routes a fleet’s archiving traffic through its host.

Configuration

TS_AUTHKEY

  • Default: empty · Set a Tailscale auth key in the hub’s .env for enrollment, or open the login URL printed in container logs; the worker example also requires its own auth key.

TS_HOSTNAME

  • Default: archivebox-hub · Set the hub’s name in the tailnet so workers can identify its exit node.

ArchiveBox through the 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.

🖼️ favicon

The favicon plugin requests an icon through nginx; besticon fetches example.com/favicon.ico.

Fetch and cache website icons through a self-hosted besticon service instead of using Google’s favicon fallback.

Running besticon service discovering real icons for github.com.

  • Endpoint: https://HOST:5783/icon?url=github.com&size=64.
  • nginx’s persistent cache lives under data/favicon/.

Configuration

  • In HUB_SERVICE_URLS, add "favicon":"https://icons.hub.example.org" to the shared JSON object to serve icons from a dedicated hostname.

...

Ingress and plugin discovery

Dedicated ports and separate domains

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.

Plugin discovery

  1. Find */hub/docker-compose.yml through abx_plugins.get_plugins_dir().
  2. Copy packaged deployment assets into data/plugins/<plugin>/hub/; persistent plugin state lives separately in data/<plugin>/.
  3. Select plugins with HUB_PLUGINS_ENABLED, then resolve their Compose services, ports, volumes, networks, and OCI title/source labels.
  4. 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 ports with app_protocol: http, target, and a stable published port; 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: udp and app_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.html with $SERVICE_URL for an embedded UI; Gatus supplies its own iframe and reads services.json to generate checks. Portless services can expose a link with the standard OCI org.opencontainers.image.url label.
  • Restart regenerates deployment files; make persistent changes in the source plugin or supported .env variables, 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.

Hosting an ArchiveBox Hub with Cloudflare

  • Uncomment argo in 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:404

Use matching hostnames in the tunnel configuration and HUB_SERVICE_URLS.

Local development

  • Use HUB_BASE_URL=http://walnut.local (substitute a reachable development hostname), HUB_TLS=off, and HUB_BIND=127.0.0.1.
  • Gatus must resolve that hostname to nginx; add the same Docker network alias when using a local name. .localhost resolves inside each container.
  • The screenshots show this local deployment and its retained check history.

Upgrades and migration

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_PROFILES settings with one complete HUB_PLUGINS_ENABLED list; use proxy for both proxy listeners.
  • docker compose down gracefully stops the controller and removes plugin containers while preserving bind-mounted state.
  • Use docker compose exec hub archivebox-hub down to 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 to data/<plugin>/. For LocalAI, also move the contents of its nested localai/ directory into data/localai/; for Gatus, move config/config.yaml to data/gatus/config.yaml. Keep keys, credentials, cache, and history together.
  • When upgrading the original statuspage deployment, move its state to data/gatus/ and change statuspage to gatus in .env.

About

☀️ Central ArchiveBox hub that can run shared services used by many servers, e.g. Tailscale VPN exit node, TLSNotary attestation, HTTP/3 caching proxy, central search index, favicon service, LocalAI LLM inference service, and more...

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Used by

Contributors

Languages