mirror of
https://github.com/furyhawk/home_stack.git
synced 2026-07-21 18:26:54 +00:00
Llama.cpp Server Persistence
This directory contains scripts and configurations for keeping the llama-server running across VM restarts and crashes.
Options for Persistence
1. Docker (Recommended)
The most isolated and portable way to run the server.
- Configure: Edit docker-compose.yml.
- Start:
docker compose up -d - Why: Handles dependencies, automatic restarts, and isolation.
2. Debian VM (Systemd)
Native way to run as a persistent background service on Debian/Ubuntu.
- File: llama-server.service
- Setup:
- Copy to system:
sudo cp llama-server.service /etc/systemd/system/ - Reload systemd:
sudo systemctl daemon-reload - Enable and Start:
sudo systemctl enable --now llama-server
- Copy to system:
- Check health:
sudo systemctl status llama-server - View logs:
- Real-time:
journalctl -u llama-server -f - Since boot:
journalctl -u llama-server -b
- Real-time:
3. macOS (LaunchAgent)
Native way to run on a macOS host.
- File:
~/Library/LaunchAgents/local.llama.server.plist - Setup:
- Load it:
launchctl load ~/Library/LaunchAgents/local.llama.server.plist - Start it:
launchctl start local.llama.server
- Load it:
- Check health:
launchctl list | grep llama
4. Simple Script (Manual)
For quick testing without system integration.
- Script: start.sh
- Run:
./start.sh - Note: Uses
nohupto prevent termination when your SSH session closes, but will NOT restart after a VM reboot.