Skip to main content

Configuration

Spotter is configured using environment variables. You can set these in your shell or use a .env file.

Required Configuration

VariableDescription
SPOTTER_NAVIDROME_BASE_URLRequired. The URL of your Navidrome instance (e.g., https://music.example.com)

OpenAI

VariableDescription
SPOTTER_OPENAI_API_KEYRequired. OpenAI API key for AI-powered metadata enrichment

Server Configuration

VariableDescriptionDefault
SPOTTER_SERVER_PORTThe HTTP port the server listens on8080
SPOTTER_SERVER_HOSTThe host address to bind to0.0.0.0

Security Configuration

VariableDescriptionDefault
SPOTTER_SECURITY_ENCRYPTION_KEY64-character hex key for encrypting OAuth tokens at restNone
SPOTTER_SECURITY_JWT_SECRET32+ character secret for signing JWT authentication tokensNone
SPOTTER_SECURITY_SECURE_COOKIESSet Secure flag on session cookies (requires HTTPS)true
Production Requirement

When deploying with HTTPS (recommended), keep SPOTTER_SECURITY_SECURE_COOKIES=true (the default). Only set to false for local development over HTTP.

Database Configuration

Spotter requires PostgreSQL in production. SQLite is available for local development only.

VariableDescriptionDefault
SPOTTER_DATABASE_DRIVERDatabase driver (postgres, sqlite3)sqlite3
SPOTTER_DATABASE_SOURCEConnection string for the databasefile:spotter.db?cache=shared&_fk=1

PostgreSQL (recommended):

SPOTTER_DATABASE_DRIVER=postgres
SPOTTER_DATABASE_SOURCE=host=localhost port=5432 dbname=spotter user=spotter password=yourpassword sslmode=disable

Sync Configuration

VariableDescriptionDefault
SPOTTER_SYNC_INTERVALHow often to sync data from providers (Go duration format)5m

Theme Configuration

VariableDescriptionDefault
SPOTTER_THEME_AVAILABLEComma-separated list of available DaisyUI theme nameslight,dark,cupcake
SPOTTER_THEME_DEFAULTDefault theme for new usersdark

Provider Configuration

Spotify (Optional)

VariableDescriptionDefault
SPOTTER_SPOTIFY_CLIENT_IDSpotify Client ID for API accessNone
SPOTTER_SPOTIFY_CLIENT_SECRETSpotify Client SecretNone
SPOTTER_SPOTIFY_REDIRECT_URLOAuth callback URL for Spotifyhttp://127.0.0.1:8080/auth/spotify/callback

Last.fm (Optional)

VariableDescriptionDefault
SPOTTER_LASTFM_API_KEYLast.fm API KeyNone
SPOTTER_LASTFM_SHARED_SECRETLast.fm Shared SecretNone
SPOTTER_LASTFM_REDIRECT_URLCallback URL for Last.fm authNone

Lidarr (Optional)

VariableDescriptionDefault
SPOTTER_LIDARR_BASE_URLBase URL to your Lidarr instanceNone
SPOTTER_LIDARR_API_KEYAPI Key for your Lidarr instanceNone
SPOTTER_LIDARR_QUEUE_MAXMax Lidarr queue depth before pausing submissions50
SPOTTER_LIDARR_SUBMIT_INTERVALHow often the submitter checks and drains the queue3m

Metadata Enrichment Configuration

VariableDescriptionDefault
SPOTTER_METADATA_ENABLEDEnable/disable metadata enrichmenttrue
SPOTTER_METADATA_INTERVALHow often to run metadata enrichment1h
SPOTTER_METADATA_ORDERComma-separated enricher priority orderlidarr,musicbrainz,navidrome,spotify,lastfm,fanart,openai

OpenAI Configuration

VariableDescriptionDefault
SPOTTER_OPENAI_BASE_URLBase URL for OpenAI API (use for LiteLLM or compatible proxies)https://api.openai.com/v1
SPOTTER_OPENAI_MODELModel to use for AI enrichmentgpt-4o
SPOTTER_METADATA_AI_PROMPTS_DIRECTORYDirectory containing prompt templates./data/prompts

MusicBrainz Configuration

VariableDescriptionDefault
SPOTTER_METADATA_MUSICBRAINZ_USER_AGENTUser-Agent string for MusicBrainz API requestsSpotter/1.0.0 (...)

Fanart.tv Configuration

VariableDescriptionDefault
SPOTTER_METADATA_FANART_API_KEYFanart.tv personal API keyNone

Image Download Configuration

VariableDescriptionDefault
SPOTTER_METADATA_IMAGES_DOWNLOADWhether to download images locallytrue
SPOTTER_METADATA_IMAGES_DIRECTORYDirectory to store downloaded images./data/images
SPOTTER_METADATA_IMAGES_MAX_WIDTHMaximum image width (for resizing)1000
SPOTTER_METADATA_IMAGES_MAX_HEIGHTMaximum image height (for resizing)1000
warning
Docker: mount /app/data

When running in Docker, the default images directory (./data/images) resolves to /app/data/images inside the container. Mount /app/data as a persistent volume or all downloaded artwork will be lost when the container restarts. See the Docker deployment guide.

Vibes Engine Configuration

VariableDescriptionDefault
SPOTTER_VIBES_DEFAULT_MAX_TRACKSDefault maximum tracks per mixtape25
SPOTTER_VIBES_MIN_TRACKSMinimum tracks for a valid mixtape5
SPOTTER_VIBES_MAX_TRACKSMaximum allowed tracks (hard limit)100
SPOTTER_VIBES_HISTORY_DAYSDays of listening history to include in context30
SPOTTER_VIBES_MAX_HISTORY_TRACKSMaximum history tracks to include in prompt50
SPOTTER_VIBES_MODELAI model for mixtape generationFalls back to openai.model
SPOTTER_VIBES_TEMPERATUREAI temperature for generation (0.0-2.0)0.8
SPOTTER_VIBES_MAX_TOKENSMaximum tokens for AI response4000
SPOTTER_VIBES_TIMEOUT_SECONDSTimeout for AI generation requests120
SPOTTER_VIBES_MIN_MATCH_CONFIDENCEMinimum confidence for track matching0.7

Playlist Sync Configuration

VariableDescriptionDefault
SPOTTER_PLAYLIST_SYNC_SYNC_INTERVALHow often to sync enabled playlists to Navidrome1h
SPOTTER_PLAYLIST_SYNC_DELETE_ON_UNSYNCDelete Navidrome playlist when sync is disabledfalse
SPOTTER_PLAYLIST_SYNC_MIN_MATCH_CONFIDENCEMinimum confidence for fuzzy track matching (0.0-1.0)0.8
SPOTTER_PLAYLIST_SYNC_INCLUDE_UNMATCHED_TRACKSInclude unmatched tracks as placeholdersfalse

Example .env File

# ===================
# Required
# ===================
SPOTTER_NAVIDROME_BASE_URL=https://music.example.com
SPOTTER_OPENAI_API_KEY=sk-your-openai-api-key

# ===================
# Server Configuration
# ===================
SPOTTER_SERVER_PORT=8080
SPOTTER_SERVER_HOST=0.0.0.0

# ===================
# Security Configuration
# ===================
# Generate with: openssl rand -hex 32
SPOTTER_SECURITY_ENCRYPTION_KEY=your_64_char_hex_key_here
# Generate with: openssl rand -base64 32
SPOTTER_SECURITY_JWT_SECRET=your_32_char_jwt_secret_here
# Set to false for local HTTP development
SPOTTER_SECURITY_SECURE_COOKIES=true

# ===================
# Database Configuration
# ===================
# PostgreSQL (recommended for production)
SPOTTER_DATABASE_DRIVER=postgres
SPOTTER_DATABASE_SOURCE=host=localhost port=5432 dbname=spotter user=spotter password=yourpassword sslmode=disable
# SQLite (local development only)
# SPOTTER_DATABASE_DRIVER=sqlite3
# SPOTTER_DATABASE_SOURCE=file:spotter.db?cache=shared&_fk=1

# ===================
# Sync Configuration
# ===================
SPOTTER_SYNC_INTERVAL=5m

# ===================
# Theme Configuration
# ===================
SPOTTER_THEME_AVAILABLE=light,dark,cupcake
SPOTTER_THEME_DEFAULT=dark

# ===================
# Spotify Integration (Optional)
# ===================
SPOTTER_SPOTIFY_CLIENT_ID=your_spotify_client_id
SPOTTER_SPOTIFY_CLIENT_SECRET=your_spotify_client_secret
SPOTTER_SPOTIFY_REDIRECT_URL=http://localhost:8080/auth/spotify/callback

# ===================
# Last.fm Integration (Optional)
# ===================
SPOTTER_LASTFM_API_KEY=your_lastfm_api_key
SPOTTER_LASTFM_SHARED_SECRET=your_lastfm_shared_secret
SPOTTER_LASTFM_REDIRECT_URL=http://localhost:8080/auth/lastfm/callback

# ===================
# Metadata Enrichment
# ===================
SPOTTER_METADATA_ENABLED=true
SPOTTER_METADATA_INTERVAL=1h
SPOTTER_METADATA_ORDER=lidarr,musicbrainz,navidrome,spotify,lastfm,fanart,openai

# MusicBrainz (User-Agent required, no API key needed)
SPOTTER_METADATA_MUSICBRAINZ_USER_AGENT=Spotter/1.0.0 (https://github.com/joestump/spotter)

# Fanart.tv (Optional - for high-quality artwork)
SPOTTER_METADATA_FANART_API_KEY=your_fanart_api_key

# Image Download Settings
SPOTTER_METADATA_IMAGES_DOWNLOAD=true
SPOTTER_METADATA_IMAGES_DIRECTORY=./data/images
SPOTTER_METADATA_IMAGES_MAX_WIDTH=1000
SPOTTER_METADATA_IMAGES_MAX_HEIGHT=1000

# ===================
# OpenAI / AI Enrichment
# ===================
SPOTTER_OPENAI_BASE_URL=https://api.openai.com/v1
SPOTTER_OPENAI_MODEL=gpt-4o
SPOTTER_METADATA_AI_PROMPTS_DIRECTORY=./data/prompts