Filesystem reverse-proxy downloads
Enable offloading on an fs storage pool and set ARKA_TRUSTED_PROXIES on each Arka replica to the dedicated reverse proxy addresses as seen by Arka. Use a separate private network or firewall rule so only those proxies can connect from the configured addresses. Arka uses the immediate peer address to enable offloading. Forwarding headers cannot enable it.
arkactl pools update "$POOL_ID" --fs-accel-enabled \
--fs-accel-header X-Accel-Redirect --fs-accel-prefix /internal-blobsExample for Nginx with a read-only mount of the same pool directory
server {
listen 443 ssl;
# Configure TLS certificates for the registry host.
location / {
proxy_pass http://arka:8080;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_cache off;
}
location ^~ /internal-blobs/ {
internal;
alias /mnt/arka-blobs/;
disable_symlinks on from=/mnt/arka-blobs/;
sendfile on;
etag off;
add_header ETag $upstream_http_etag;
add_header X-Content-Type-Options nosniff always;
add_header X-Frame-Options DENY always;
add_header Content-Security-Policy "default-src 'none'; sandbox; frame-ancestors 'none'" always;
}
}Give each enabled pool a distinct prefix and point each Nginx alias at that pool's own root. Run the Nginx worker with the filesystem identity that owns the blobs or grant it read access through filesystem ACLs. Arka creates blob files with owner-only access by default. The internal path consists of the prefix and the two digest shard directories. Nginx preserves the upstream content type and disposition on internal redirects. The internal location restores Arka's ETag from the upstream response.
For Apache with mod_xsendfile, select X-Sendfile, clear fsAccelPrefix, and configure XSendFilePath for the pool's canonical absolute root. Mount the pool at the same absolute path on Arka and Apache. Keep the blob directory out of the public document root.
Authenticated full GETs can use offloading after repository access and download-policy checks. Existing attachment dispositions are preserved and Arka supplies one when the response has none, so a proxy serves uploaded HTML and SVG as downloads. Explicit inline responses, HEAD, range requests, anonymous downloads and direct connections use the normal Arka response. Offload responses set Cache-Control: private, no-store.