Cache Server Setup

May 19, 2026 ยท View on GitHub

A cache is any static server that can answer:

GET <cache base>/<sha256>

Cache Document

name = "lan-mirror"
base_url = "https://cache.example.com/elda"
priority = 20
enabled = true
elda cache add lan-mirror=https://cache.example.com/elda --priority 20
elda cache ls

Static Layout

/var/www/elda-cache/
  6f1e...payload-digest
  7a93...payload-digest

Caddy

cache.example.com {
    root * /var/www/elda-cache
    file_server
}

Nginx

server {
    listen 443 ssl;
    server_name cache.example.com;
    root /var/www/elda-cache;

    location / {
        try_files $uri =404;
    }
}

Filling Caches Today

elda-populate cache push-local --cache lan-mirror --installed
elda-populate cache mirror-remote --remote yoka-main --channel stable --cache lan-mirror

Limitation: direct writes are file:// or local-path first. For production, mirror the filled directory with rsync, rclone, scp, or object-storage sync.

See patterns/lan-cache-mirror-only.md.