Files
llmgw/deploy/systemd/llmgw-mirror.service
T
Ilker ManapandClaude Opus 5 afb3797e57 Document the mirror that exists rather than the one you assemble
The page described nginx and a curl loop, which was accurate when the mirror
was a directory somebody kept by hand. It is a subcommand now, so it says so:
the two listeners and why they are two, the API and what each endpoint answers,
and the certificates coming from the authority the fleet already has.

nginx stays, further down. It serves a directory perfectly well and anyone
already running it should not be told to install something to replace it.

The systemd unit spells out --base in a comment because it is the flag that
goes wrong quietly: it ends up in catalog entries, and a wrong one makes
`mirror unused` call files unreferenced while they are in use.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-27 09:43:02 +02:00

30 lines
918 B
Desktop File

[Unit]
Description=llmgw model mirror
After=network-online.target
Wants=network-online.target
[Service]
# --base is what a catalog entry will say, so it has to be the address nodes
# reach this machine on — not localhost, and not the name only this host knows
# itself by. Getting it wrong makes `mirror unused` report files as unreferenced
# when they are in use, and the next step after that list is deletion.
ExecStart=/usr/local/bin/llmgw mirror serve \
--dir /srv/models \
--listen :8081 \
--api-listen :8082 \
--base http://models.internal:8081
User=llmgw
Group=llmgw
Restart=on-failure
RestartSec=2s
NoNewPrivileges=true
ProtectSystem=strict
ProtectHome=true
PrivateTmp=true
# The one writable path. The mirror serves reads to the whole fleet and writes
# only what its own API was asked to fetch, so nothing else needs to be.
ReadWritePaths=/srv/models
[Install]
WantedBy=multi-user.target