Automated music discovery integration for Last.fm and music management systems (Lidarr/Headphones)
6.6K
Streamlined Docker container for DiscoveryLastFM v2.1.0 - automated music discovery that integrates Last.fm with music management systems (Lidarr/Headphones).
š v2.1.0 with Auto-Update System! GitHub releases monitoring, CLI commands, and simplified Docker setup.
# Download all required files
curl -L -O https://raw.githubusercontent.com/MrRobotoGit/DiscoveryLastFM-Docker/main/docker-compose.yml
curl -L -O https://raw.githubusercontent.com/MrRobotoGit/DiscoveryLastFM-Docker/main/.env.example
curl -L -O https://raw.githubusercontent.com/MrRobotoGit/DiscoveryLastFM-Docker/main/Dockerfile
# Configure environment (REQUIRED variables already have dummy values)
cp .env.example .env
nano .env # Replace dummy values with your real credentials
# ā ļø IMPORTANT: These variables are REQUIRED for container startup:
# AUTO_UPDATE_ENABLED=true
# UPDATE_CHECK_INTERVAL_HOURS=24
# Start the stack (first run builds image with bash included)
docker compose up -d
# First, download Dockerfile and build the image
curl -L -O https://raw.githubusercontent.com/MrRobotoGit/DiscoveryLastFM-Docker/main/Dockerfile
docker build -t discoverylastfm-local .
# With Lidarr
docker run -d \
--name discoverylastfm \
-e LASTFM_USERNAME=your_username \
-e LASTFM_API_KEY=your_api_key \
-e MUSIC_SERVICE=lidarr \
-e LIDARR_API_KEY=your_lidarr_key \
-e LIDARR_ENDPOINT=http://your-lidarr:8686 \
-e AUTO_UPDATE_ENABLED=true \
-e UPDATE_CHECK_INTERVAL_HOURS=24 \
-v discoverylastfm_config:/app/config \
-v discoverylastfm_logs:/app/logs \
discoverylastfm-local:latest
# With Headphones
docker run -d \
--name discoverylastfm \
-e LASTFM_USERNAME=your_username \
-e LASTFM_API_KEY=your_api_key \
-e MUSIC_SERVICE=headphones \
-e HP_API_KEY=your_headphones_key \
-e HP_ENDPOINT=http://your-headphones:8181 \
-e AUTO_UPDATE_ENABLED=true \
-e UPDATE_CHECK_INTERVAL_HOURS=24 \
-v discoverylastfm_config:/app/config \
-v discoverylastfm_logs:/app/logs \
discoverylastfm-local:latest
ā ļø CRITICAL: These variables are REQUIRED for the container to start. Missing values will cause startup failure.
| Variable | Required | Default | Description |
|---|---|---|---|
LASTFM_USERNAME | YES | dummy_username | Your Last.fm username |
LASTFM_API_KEY | YES | dummy_api_key_replace_with_real_one | Last.fm API key (Get hereā ) |
AUTO_UPDATE_ENABLED | YES | true | Enable auto-update checking |
UPDATE_CHECK_INTERVAL_HOURS | YES | 24 | Update check interval |
MUSIC_SERVICE | YES | lidarr | Music service (lidarr or headphones) |
šØ Startup Error: Without these required variables, container fails with:
/usr/local/bin/docker-entrypoint.sh: line 270: syntax error near unexpected token 'else'
| Variable | Required | Default | Description |
|---|---|---|---|
LIDARR_API_KEY | YES | dummy_lidarr_api_key_replace_with_real_one | Lidarr API key |
LIDARR_ENDPOINT | NO | http://lidarr:8686 | Lidarr server URL |
LIDARR_ROOT_FOLDER | NO | /music | Music library path |
| Variable | Description | Default |
|---|---|---|
HP_API_KEY | Headphones API key | Required |
HP_ENDPOINT | Headphones server URL | http://headphones:8181 |
| Mode | Description | Usage |
|---|---|---|
sync | One-time discovery run | -e DISCOVERY_MODE=sync |
cron | Scheduled runs (default) | -e CRON_SCHEDULE="0 3 * * *" |
daemon | Continuous background | -e SLEEP_HOURS=6 |
test | Validation mode | -e DRY_RUN=true |
| Variable | Required | Default | Description |
|---|---|---|---|
AUTO_UPDATE_ENABLED | YES | true | Enable auto-update checking |
UPDATE_CHECK_INTERVAL_HOURS | YES | 24 | Check interval in hours |
BACKUP_RETENTION_DAYS | NO | 7 | Backup retention in days |
ALLOW_PRERELEASE_UPDATES | NO | false | Include pre-releases |
GITHUB_TOKEN | NO | `` | GitHub API token (optional) |
docker logs -f discoverylastfm
docker exec discoverylastfm /usr/local/bin/health-check
docker pull mrrobotogit/discoverylastfm:latest
docker compose up -d # Restart with new image
# Check for updates
docker compose exec discoverylastfm python DiscoveryLastFM.py --update-status
# Install updates
docker compose exec discoverylastfm python DiscoveryLastFM.py --update
# List backups
docker compose exec discoverylastfm python DiscoveryLastFM.py --list-backups
# Check version
docker compose exec discoverylastfm python DiscoveryLastFM.py --version
# Clean temporary files
docker compose exec discoverylastfm python DiscoveryLastFM.py --cleanup
| Tag | Description | Architecture |
|---|---|---|
latest | Latest stable release (v2.1.0) | amd64, arm64 |
v2.1.0 | Current stable version | amd64, arm64 |
main | Development builds | amd64, arm64 |
If you see /usr/local/bin/docker-entrypoint.sh: line 270: syntax error near unexpected token 'else':
# The error occurs because the official v2.1.0 image doesn't include bash
# Solution: Build the image using our Dockerfile which includes bash
# Download Dockerfile and build
curl -L -O https://raw.githubusercontent.com/MrRobotoGit/DiscoveryLastFM-Docker/main/Dockerfile
docker build -t discoverylastfm-local .
# Use discoverylastfm-local:latest instead of mrrobotogit/discoverylastfm:latest
# Check logs
docker logs discoverylastfm
# Validate configuration
docker exec discoverylastfm /usr/local/bin/health-check config
Problem: chmod: Operation not permitted or endless restarts
Solutions:
# Use PUID/PGID environment variables
docker run -e PUID=1000 -e PGID=1000 ... mrrobotogit/discoverylastfm
# Or use bind mounts with local directories
mkdir -p ./data/{config,logs,cache}
docker run -v ./data/config:/app/config ... mrrobotogit/discoverylastfm
# Test Last.fm connectivity
docker exec discoverylastfm curl -f "http://ws.audioscrobbler.com/2.0/?method=user.getinfo&user=${LASTFM_USERNAME}&api_key=${LASTFM_API_KEY}&format=json"
# Test Lidarr connectivity
docker exec discoverylastfm curl -f -H "X-Api-Key: ${LIDARR_API_KEY}" "${LIDARR_ENDPOINT}/api/v1/system/status"
āāāāāāāāāāāāāāāāāāā āāāāāāāāāāāāāāāāāāā āāāāāāāāāāāāāāāāāāā
ā Last.fm API āāāāāā DiscoveryLastFM āāāāāā Lidarr/Headphones ā
āāāāāāāāāāāāāāāāāāā ā + Redis ā āāāāāāāāāāāāāāāāāāā
āāāāāāāāāāāāāāāāāāā
MIT License - see LICENSEā for details.
Maintainer: Matteo Rancilio (MrRobotoGit)
š Star this repo if you find it useful!
Content type
Image
Digest
sha256:8ef91c18fā¦
Size
63.4 MB
Last updated
7 months ago
docker pull mrrobotogit/discoverylastfm