Files
alfred-proxy/SYSTEMD.md
jknapp 44ac8b6d1c Initial commit: Alfred Proxy with OAuth, TTS, and FCM push notifications
- Environment-based configuration (no hardcoded secrets)
- OAuth authentication via Authentik
- ElevenLabs TTS integration via SAG CLI
- FCM push notification support
- User preferences sync system
- Multi-user support with per-user context files
- No internal IPs or service accounts in tracked files
2026-02-09 11:13:01 -08:00

1.1 KiB

Alfred Proxy Systemd Service

Service Management

# Status
systemctl --user status alfred-proxy

# Start
systemctl --user start alfred-proxy

# Stop
systemctl --user stop alfred-proxy

# Restart
systemctl --user restart alfred-proxy

# Enable (auto-start)
systemctl --user enable alfred-proxy

# Disable (no auto-start)
systemctl --user disable alfred-proxy

# View logs
journalctl --user -u alfred-proxy -f

# View proxy-specific logs
tail -f /tmp/alfred-proxy.log

Auto-Restart

The service is configured with:

  • Restart=always - Always restart on failure
  • RestartSec=5 - Wait 5 seconds between restarts

Error Handling Improvements

Added to server.js:

  1. Global exception handler - Catches uncaught exceptions
  2. Global rejection handler - Catches unhandled promise rejections
  3. Proper interval cleanup - Clears ping intervals on disconnection

These prevent the service from crashing on unexpected errors.

Service File Location

~/.config/systemd/user/alfred-proxy.service

To modify: edit the file, then run:

systemctl --user daemon-reload
systemctl --user restart alfred-proxy