# Spotify Tracker Deployment Guide ## Quick Setup 1. **Clone and deploy:** ```bash git clone cd spotify-tracker chmod +x deploy.sh sudo ./deploy.sh ``` 2. **Configure Caddy:** ``` spotify.tougie.live { reverse_proxy localhost:8888 } ``` 3. **Update Spotify App Settings:** - Go to https://developer.spotify.com/dashboard - Set redirect URI to: `https://spotify.tougie.live` ## Service Management ```bash # Check service status sv status spotify-tracker # Start/stop/restart service sv start spotify-tracker sv stop spotify-tracker sv restart spotify-tracker # View logs tail -f /var/log/spotify-tracker/current ``` ## API Endpoints After deployment, these endpoints will be available: - `https://spotify.tougie.live/auth` - OAuth setup page - `https://spotify.tougie.live/current` - Current track (JSON) - `https://spotify.tougie.live/phantombot` - Current track (text for PhantomBot) - `https://spotify.tougie.live/health` - Health check ## Configuration The service runs as user `spotify-tracker` and stores: - Config: `/home/spotify-tracker/.config/spotify-tracker/` - Logs: `/var/log/spotify-tracker/` - Binary: `/opt/spotify-tracker/target/release/spotify-tracker` ## Troubleshooting 1. **Check service status:** `sv status spotify-tracker` 2. **View logs:** `tail -f /var/log/spotify-tracker/current` 3. **Restart service:** `sv restart spotify-tracker` 4. **Check permissions:** Ensure `spotify-tracker` user owns `/opt/spotify-tracker`