π Tools Cache Mount
Share caches across your machines. Host-side shell tooling that NFS-mounts shared caches β Docker, Ollama, npm, Hugging Face β across the machines on your Tailscale, VPN, or LAN.
Install & availability
The Hub app is available, but it is only a status page. Install it from the Companion Hub App Store. The tooling that does the work isnβt publicly available yet β see the status note below.
| Hub App Store | Search Tools Cache Mount β Install |
| Container internal port | 80 |
| Minimum Hub version | 0.2.27 |
| Architecture | linux/amd64 and linux/arm64 (multi-arch) |
| State / env | None β the container holds no state and takes no configuration |
Overview
Tools Cache Mount is host-side shell tooling, not a Hub service. Its install scripts run on each of your machines and NFS-mount shared cache directories β Docker BuildKit caches, Ollama models, npm, Hugging Face β from a central NFS server reachable over your Tailscale, VPN, or LAN. Once mounted and pointed-to, every machine reuses the same downloaded models and build caches instead of fetching its own copy.
Installing the Hub app does not mount anything. The container is a static status / reference page describing the tooling. The actual mounting is done by running the install scripts on each client host. This page documents the real workflow.
Status: developer preview. You canβt install the tooling yet. The scripts
have no public download, and their source repository is private, so you can
run them only if Companion Intelligence gives you access. To ask about access
or follow progress, join the DiscordΒ . The Hub
container doesnβt include the scripts, and the Hub status page tells you to
git clone the private repository, so the steps below need that access.
Current capabilities
What Tools Cache Mount provides today:
- Per-host install scripts (
linux_install.sh,macos_install.sh) that set up NFS mounts of shared caches - Sharing of Docker (BuildKit
type=local), Ollama models, npm, and Hugging Face caches - Auto-mount on boot via fstab
_netdev(Linux) or a launchd retry timer (macOS) - A status / reference page served by the Hub container
You must provide the NFS server. No server ships with this app. You need an NFS server on your network exporting /srv/cache/<name> directories; the client scripts mount from it.
How it actually works
- Stand up an NFS server (your responsibility) exporting
/srv/cache/<name>for each cache you want to share (e.g.docker,ollama,npm,huggingface). - Create
cache-mounts.confon each client host by copyingcache-mounts.conf.example, and setCACHE_SERVERto that NFS server. - Run the install script on each client (
linux_install.shormacos_install.sh). It configures the NFS mounts and auto-mount. - Re-point your tools at the mounted caches β mounting alone changes nothing.
The same four steps, as the data path from your NFS server to each tool on a client host:
flowchart TD
NFS["Your NFS server<br/>exports /srv/cache/docker, ollama, npm, huggingface"] -->|"NFS over Tailscale, VPN, or LAN"| MNT
subgraph HOST["Each client host"]
CONF["cache-mounts.conf<br/>CACHE_SERVER = your NFS server"] --> INST["linux_install.sh<br/>or macos_install.sh"]
INST --> MNT["NFS mounts + auto-mount<br/>fstab _netdev on Linux<br/>launchd retry on macOS"]
MNT -->|"re-point each tool"| TOOLS["OLLAMA_MODELS Β· HF_HOME<br/>npm config set cache Β· BuildKit type=local"]
endDefault cache layout
| Cache | Server export | Linux mount | macOS mount |
|---|---|---|---|
docker | /srv/cache/docker | /mnt/cache/docker | /Volumes/cache-docker |
ollama | /srv/cache/ollama | /mnt/cache/ollama | /Volumes/cache-ollama |
npm | /srv/cache/npm | /mnt/cache/npm | /Volumes/cache-npm |
huggingface | /srv/cache/huggingface | /mnt/cache/huggingface | /Volumes/cache-huggingface |
Configuration
The scripts read cache-mounts.conf from the repository root, whichever directory you run them from. Set CACHE_MOUNTS_CONFIG=/path/to/conf to use a different file.
| Variable | Default | Purpose |
|---|---|---|
CACHE_SERVER | none | Hostname or IP of the NFS server, reachable on your VPN or LAN. Required. |
CACHE_NAMES | docker ollama npm huggingface | Caches to mount, separated by spaces or commas |
CACHE_EXPORT_BASE | /srv/cache | Export root on the server |
CACHE_EXPORT_<NAME>, CACHE_MOUNT_<NAME> | derived | Per-cache overrides, for example CACHE_EXPORT_HUGGINGFACE and CACHE_MOUNT_HUGGINGFACE |
Auto-mount details
| Auto-mount | Linux | macOS |
|---|---|---|
| Install script | linux_install.sh | macos_install.sh |
| Mechanism | An fstab entry with _netdev (fstab, not a systemd automount unit) | A launchd job that retries every ~5 minutes to (re)establish the mount |
| Mounts when | On boot, once the network is up | At each retry, until the mount is established |
| Needs | The NFS server reachable once networking is up | Passwordless sudo to run the mount |
| NFS client | nfs-common on Ubuntu and Debian. The install script installs it with apt-get. | Built in |
On Linux, linux_install.sh backs up /etc/fstab to /etc/fstab.cache-mounts.bak.<timestamp>, adds the entries, and mounts now. Rerun it after you change the configuration, because it writes the resolved server and export paths into /etc/fstab. To mount or unmount by hand, use linux_mount.sh, linux_unmount.sh, macos_mount.sh, or macos_unmount.sh.
Re-pointing tools (required)
Mounting a cache does nothing until each tool is told to use it:
| Tool | What to set |
|---|---|
| Ollama | export OLLAMA_MODELS=/mnt/cache/ollama (Linux) or /Volumes/cache-ollama (macOS) |
| Hugging Face | export HF_HOME=/mnt/cache/huggingface (Linux) or /Volumes/cache-huggingface (macOS) |
| npm | npm config set cache /mnt/cache/npm |
| Docker | BuildKit type=local cache sharing: docker buildx build --cache-to type=local,dest=/mnt/cache/docker/buildkit --cache-from type=local,src=/mnt/cache/docker/buildkit β¦ |
Docker caching here is BuildKit type=local cache sharing, not Docker
image-layer caching. You opt in per build with BuildKit cache flags pointing
at the shared local cache directory. For real image-layer caching, the
repositoryβs Docker cache notes describe running a registry pull-through proxy
on the cache server as an optional upgrade.
Use Cases
- Download a model once and share it across every machine on your Tailnet
- Share a BuildKit local cache so CI/build hosts donβt rebuild identical layers
- Keep npm and Hugging Face caches consistent across a small fleet
Setup
Provide an NFS server
Stand up an NFS server on your Tailscale/VPN/LAN exporting /srv/cache/<name> for each cache you want to share. (No server ships with this app.)
Create cache-mounts.conf
On each client host, copy cache-mounts.conf.example to cache-mounts.conf and set CACHE_SERVER to your NFS server. Set CACHE_NAMES if you donβt want all four caches.
Run the install script
Run linux_install.sh (Linux) or macos_install.sh (macOS) on each client. This sets up the NFS mounts and auto-mount (fstab _netdev on Linux; a launchd retry on macOS that needs passwordless sudo).
Re-point your tools
Set OLLAMA_MODELS, HF_HOME, npm config set cache β¦, and use BuildKit type=local cache sharing for Docker so the tools actually use the mounted caches.
Troubleshooting
Installed the Hub app but nothing is shared The Hub container is only a status/reference page. Run the install scripts on each host to actually mount the caches.
Tools still download their own copies
Mounting isnβt enough β re-point each tool (OLLAMA_MODELS, HF_HOME, npm cache, BuildKit type=local).
Mount doesnβt come back after reboot (macOS) The launchd retry needs passwordless sudo to run the mount. Verify the sudoers entry, then wait for the next ~5-minute retry.
Mount missing on Linux boot
Confirm the fstab entry includes _netdev and the NFS server is reachable once networking is up.