Operate
Service commands
Use these to check status, restart, or remove the gateway. Replace service status with the other subcommands as needed.
$HOME/.local/bin/anava-local-gateway service status --state-dir "$HOME/.config/anava-local"
$HOME/.local/bin/anava-local-gateway service restart --state-dir "$HOME/.config/anava-local"
$HOME/.local/bin/anava-local-gateway service stop --state-dir "$HOME/.config/anava-local"
$HOME/.local/bin/anava-local-gateway service start --state-dir "$HOME/.config/anava-local"
$HOME/.local/bin/anava-local-gateway service uninstall --state-dir "$HOME/.config/anava-local"
service uninstall removes the launchd or systemd user service file only. It keeps your gateway configuration, identity, certificate, and connection file in place.
After any restart, run a sample
Restarting the gateway or Ollama unloads the model from memory. The next call is a cold call and takes longer than a warm one. Run a sample detection from the camera after any restart before relying on production timing.
Rotating the shared secret and certificate
To rotate the private identity and shared secret deliberately:
- Stop the service.
- Move or remove
gateway.logandgateway-error.log. - Run
initwith--rotate. - Restart the service.
- Import the new connection file into the camera.
Rotation refuses to touch any unexpected file in the state directory instead of deleting it. If it refuses, inspect the directory before proceeding.
Freeing memory
Stopping or uninstalling the gateway does not unload the model from Ollama. If another application on the same machine needs that memory, release the model explicitly:
ollama stop gemma3:4b
What normal operation looks like
- Single-shot detection completes in about 2.8-2.9 seconds warm on comparable hardware.
- The gateway asks Ollama to keep the model resident after a successful call, so idle time between camera triggers does not by itself cause a cold load.
- Second-stage verification, if enabled, adds one more model call per detection.
- There is no cloud fallback. A gateway or model failure is reported to the camera as a Local failure, not silently retried against the cloud.
Dedicated hosts
Use a machine that is not also running other GPU or CPU-heavy workloads. Competing processes on the same machine increase latency and make it unpredictable.
Related: anava.ai/edge/local