Configure Lidarr Music Management #48

Open
opened 2025-09-14 08:14:13 +00:00 by tonym · 0 comments
Owner

Lidarr Music Management Configuration Guide

Overview

Lidarr is a music collection manager for Usenet and BitTorrent users, similar to Sonarr for TV shows and Radarr for movies. It watches for new albums by your favorite artists and automatically searches, downloads, and organizes your music collection.


Container Installation

Docker Run Command

docker run -d \
  --name=lidarr \
  --restart=unless-stopped \
  -e PUID=99 \
  -e PGID=100 \
  -e TZ=America/Chicago \
  -p 8686:8686 \
  -v /mnt/user/appdata/lidarr:/config \
  -v /mnt/user/media/music:/music \
  -v /mnt/user/downloads:/downloads \
  linuxserver/lidarr:latest

Docker Compose

version: "3.8"
services:
  lidarr:
    image: linuxserver/lidarr:latest
    container_name: lidarr
    restart: unless-stopped
    environment:
      - PUID=99
      - PGID=100
      - TZ=America/Chicago
    ports:
      - "8686:8686"
    volumes:
      - /mnt/user/appdata/lidarr:/config
      - /mnt/user/media/music:/music
      - /mnt/user/downloads:/downloads
      - /mnt/user/downloads/music:/downloads/music
    networks:
      - media

Container Configuration

Port Configuration

  • 8686: Web interface (HTTP)

Volume Mounts

  • /mnt/user/appdata/lidarr:/config: Configuration and database
  • /mnt/user/media/music:/music: Music library destination
  • /mnt/user/downloads:/downloads: Download directory
  • /mnt/user/downloads/music:/downloads/music: Music-specific downloads

Environment Variables

  • PUID=99: User ID (nobody)
  • PGID=100: Group ID (users)
  • TZ: Timezone setting

Initial Configuration

Web Interface Setup

  1. Access Web Interface: http://your-server-ip:8686
  2. Authentication: No default authentication (configure in settings)
  3. Setup Wizard: Complete initial configuration

Media Management Settings

Root Folders

  1. Settings → Media Management → Root Folders
  2. Add Root Folder: /music
  3. Default Quality Profile: Lossless
  4. Default Metadata Profile: Standard
  5. Monitor: All Albums

File Management

# Settings → Media Management
Rename Albums: Yes
Replace Illegal Characters: Yes
Colon Replacement Format: Delete
Standard Album Format: {Artist Name} - {Album Title} ({Release Year}) {Quality Full}
Artist Folder Format: {Artist Name}

Quality Definitions

# Settings → Profiles → Quality Definitions
Unknown: 0-50 MB
MP3-8: 0-10 MB  
MP3-16: 8-25 MB
MP3-24: 20-40 MB
MP3-32: 30-50 MB
MP3-40: 40-65 MB
MP3-48: 45-75 MB
MP3-56: 50-85 MB
MP3-64: 55-95 MB
MP3-80: 70-120 MB
MP3-96: 80-140 MB
MP3-112: 90-160 MB
MP3-128: 100-180 MB
MP3-160: 125-225 MB
MP3-192: 150-270 MB
MP3-224: 175-315 MB
MP3-256: 200-360 MB
MP3-320: 250-450 MB
FLAC: 200-2000 MB

Service Configuration

Quality Profiles

# Settings → Profiles → Quality Profiles → Add
Name: Lossless
Cutoff: FLAC
Allowed Qualities:
- FLAC (preferred)
- MP3-320 (fallback)

High Quality Profile

# Settings → Profiles → Quality Profiles → Add
Name: High Quality
Cutoff: MP3-320
Allowed Qualities:
- FLAC (upgrade)
- MP3-320 (preferred)
- MP3-256 (allowed)

Standard Profile

# Settings → Profiles → Quality Profiles → Add
Name: Standard
Cutoff: MP3-192
Allowed Qualities:
- MP3-320 (upgrade)
- MP3-256 (upgrade)
- MP3-192 (preferred)
- MP3-160 (allowed)

Metadata Profiles

Standard Metadata Profile

# Settings → Profiles → Metadata Profiles → Standard
Primary Album Types:
- Album ✓
- EP ✓
- Single ✗ (optional)
- Broadcast ✗
- Other ✗

Secondary Album Types:
- Studio ✓
- Compilation ✓
- Soundtrack ✓
- Live ✗ (optional)
- Remix ✗
- DJ-mix ✗
- Mixtape/Street ✗
- Demo ✗

Release Profiles

Preferred Words

# Settings → Profiles → Release Profiles → Add
Name: Music Preferences

Preferred (Positive Scores):
/\b(flac|lossless)\b/i: +15
/\b(24bit|24-bit)\b/i: +10
/\b(vinyl|vinyl.rip)\b/i: +5
/\b(cd|compact.disc)\b/i: +3
/\b(remaster|remastered)\b/i: +5

Must Not Contain (Ignored):
/\b(low.quality|lossy|transcoded)\b/i
/\b(cam|camrip|telesync)\b/i
/\b(dubbed|foreign)\b/i

Integration Points

Download Client Setup

SABnzbd Integration

  1. Settings → Download Clients → Add → SABnzbd
  2. Configuration:
    Name: SABnzbd
    Host: sabnzbd
    Port: 8080
    API Key: [from SABnzbd]
    Username: [if auth enabled]
    Password: [if auth enabled]
    Category: music
    Recent Priority: High
    Older Priority: Normal
    

Download Categories

# SABnzbd Categories:
music: /downloads/music
music-flac: /downloads/music/flac
music-mp3: /downloads/music/mp3

qBittorrent Integration

  1. Settings → Download Clients → Add → qBittorrent
  2. Configuration:
    Name: qBittorrent
    Host: qbittorrent
    Port: 8080
    Username: admin
    Password: [password]
    Category: music
    Sequential Download: No
    First and Last First: No
    

Indexer Configuration

  1. Add Prowlarr App in Prowlarr:
    Lidarr Server: http://lidarr:8686
    Lidarr API Key: [from Lidarr Settings]
    Sync Categories: Music
    

Manual Indexer Setup

# Settings → Indexers → Add Indexer

# Newznab Indexers:
NZBHydra2:
  URL: http://nzbhydra2:5076
  API Key: [from NZBHydra2]
  Categories: 3000,3010,3020,3030,3040

# Torznab Indexers:
Jackett:
  URL: http://jackett:9117/api/v2.0/indexers/[indexer]/results/torznab/
  API Key: [from Jackett]
  Categories: 3000,3010,3020,3030,3040

Music Services Integration

Last.FM Integration

  1. Settings → Metadata → Last.FM
  2. Enable: Yes
  3. API Key: [from Last.FM API]
  4. Get album info: Yes
  5. Get artist info: Yes

MusicBrainz Configuration

  1. Settings → Metadata → MusicBrainz
  2. Enable: Yes
  3. Rate Limiting: 1.0 seconds
  4. Use MusicBrainz for artist info: Yes

Media Server Integration

Plex Integration

  1. Settings → Connect → Add → Plex Media Server
  2. Configuration:
    Name: Plex
    Host: plex
    Port: 32400
    Auth Token: [from Plex]
    Update Library: Yes
    

Jellyfin Integration

  1. Settings → Connect → Add → Jellyfin
  2. Configuration:
    Name: Jellyfin
    Host: jellyfin
    Port: 8096
    API Key: [from Jellyfin]
    Update Library: Yes
    

Monitoring & Notifications

Import List Configuration

Spotify Integration

  1. Settings → Import Lists → Add → Spotify Playlists
  2. Configuration:
    Name: Spotify Favorites
    Playlist IDs: [comma-separated playlist IDs]
    Access Token: [Spotify API token]
    Monitor: Future Albums
    Quality Profile: Lossless
    Root Folder: /music
    

MusicBrainz Collection

  1. Settings → Import Lists → Add → MusicBrainz Collection
  2. Configuration:
    Name: My Collection
    Collection ID: [MusicBrainz collection ID]
    Monitor: All Albums
    Quality Profile: Lossless
    

Notification Setup

Discord Notifications

  1. Settings → Connect → Add → Discord
  2. Configuration:
    Name: Discord
    Webhook URL: [Discord webhook]
    Username: Lidarr
    Avatar: [optional]
    On Grab: Yes
    On Import: Yes
    On Upgrade: Yes
    

Gotify Notifications

  1. Settings → Connect → Add → Gotify
  2. Configuration:
    Name: Gotify
    Server: http://gotify:8080
    App Token: [from Gotify]
    Priority: 5
    Include Album Poster: Yes
    

Health Monitoring

# Monitor Lidarr health
curl -H "X-Api-Key: YOUR_API_KEY" "http://localhost:8686/api/v1/health"

# Check system status
curl -H "X-Api-Key: YOUR_API_KEY" "http://localhost:8686/api/v1/system/status"

# Monitor queue
curl -H "X-Api-Key: YOUR_API_KEY" "http://localhost:8686/api/v1/queue" | jq

Backup Configuration

Database Backup

#!/bin/bash
# Backup Lidarr configuration
DATE=$(date +%Y%m%d)
BACKUP_DIR="/mnt/user/backups/lidarr"

# Stop container for consistent backup
docker stop lidarr

# Backup database and config
cp -r /mnt/user/appdata/lidarr/ $BACKUP_DIR/lidarr_$DATE/

# Restart container
docker start lidarr

# Compress backup
tar -czf $BACKUP_DIR/lidarr_$DATE.tar.gz -C $BACKUP_DIR lidarr_$DATE/
rm -rf $BACKUP_DIR/lidarr_$DATE/

# Retain last 30 days
find $BACKUP_DIR -name "lidarr_*.tar.gz" -mtime +30 -delete

Configuration Export

# Export artists list
curl -H "X-Api-Key: YOUR_API_KEY" "http://localhost:8686/api/v1/artist" > artists_backup.json

# Export quality profiles
curl -H "X-Api-Key: YOUR_API_KEY" "http://localhost:8686/api/v1/qualityprofile" > quality_profiles_backup.json

# Export indexers
curl -H "X-Api-Key: YOUR_API_KEY" "http://localhost:8686/api/v1/indexer" > indexers_backup.json

Testing Procedures

Functionality Tests

Search Tests

# Test artist search
curl -H "X-Api-Key: YOUR_API_KEY" \
  "http://localhost:8686/api/v1/artist/lookup?term=artist%20name"

# Test album search  
curl -H "X-Api-Key: YOUR_API_KEY" \
  "http://localhost:8686/api/v1/album/lookup?term=album%20name"

# Test manual search
curl -H "X-Api-Key: YOUR_API_KEY" \
  "http://localhost:8686/api/v1/release?albumId=1"

Download Tests

# Test download client connection
curl -X POST -H "X-Api-Key: YOUR_API_KEY" \
  "http://localhost:8686/api/v1/downloadclient/test" \
  -d '{"id": 1}'

# Test indexer connection
curl -X POST -H "X-Api-Key: YOUR_API_KEY" \
  "http://localhost:8686/api/v1/indexer/test" \
  -d '{"id": 1}'

Import Tests

  1. Manual Import: Test manual import of sample album
  2. Automatic Import: Add new artist and verify automation
  3. Quality Upgrade: Test quality upgrade functionality
  4. Metadata: Verify metadata fetching and album art

Performance Tests

# Monitor resource usage
docker stats lidarr --no-stream

# Test concurrent operations
# Add multiple artists simultaneously
# Monitor system performance during bulk operations

Troubleshooting

Common Issues

  1. No Search Results:

    # Check indexer status
    curl -H "X-Api-Key: YOUR_API_KEY" "http://localhost:8686/api/v1/indexer"
    
    # Test indexer manually
    curl -X POST -H "X-Api-Key: YOUR_API_KEY" \
      "http://localhost:8686/api/v1/indexer/test" -d '{"id": 1}'
    
  2. Download Client Issues:

    # Check download client status
    curl -H "X-Api-Key: YOUR_API_KEY" "http://localhost:8686/api/v1/downloadclient"
    
    # Check download client health
    curl -H "X-Api-Key: YOUR_API_KEY" "http://localhost:8686/api/v1/health"
    
  3. Import Failures:

    # Check failed imports
    curl -H "X-Api-Key: YOUR_API_KEY" "http://localhost:8686/api/v1/queue"
    
    # Check file permissions
    docker exec lidarr ls -la /downloads /music
    
  4. Metadata Issues:

    # Refresh artist metadata
    curl -X POST -H "X-Api-Key: YOUR_API_KEY" \
      "http://localhost:8686/api/v1/command" \
      -d '{"name": "RefreshArtist", "artistId": 1}'
    

Log Analysis

# View Lidarr logs
docker logs lidarr

# Monitor real-time logs
docker logs -f lidarr

# Check specific log files
tail -f /mnt/user/appdata/lidarr/logs/lidarr.txt

# Filter for errors
docker logs lidarr | grep -i error

Database Issues

# Check database integrity
sqlite3 /mnt/user/appdata/lidarr/lidarr.db "PRAGMA integrity_check;"

# Vacuum database
sqlite3 /mnt/user/appdata/lidarr/lidarr.db "VACUUM;"

# Check database size
du -h /mnt/user/appdata/lidarr/lidarr.db

Maintenance

Regular Updates

# Update Lidarr container
docker pull linuxserver/lidarr:latest
docker stop lidarr
docker rm lidarr
docker-compose up -d

Database Maintenance

#!/bin/bash
# Monthly database maintenance
echo "Starting Lidarr maintenance..."

# Stop Lidarr
docker stop lidarr

# Backup database
cp /mnt/user/appdata/lidarr/lidarr.db /mnt/user/appdata/lidarr/lidarr.db.backup

# Optimize database
sqlite3 /mnt/user/appdata/lidarr/lidarr.db "VACUUM;"
sqlite3 /mnt/user/appdata/lidarr/lidarr.db "REINDEX;"

# Start Lidarr
docker start lidarr

echo "Maintenance complete"

Library Cleanup

# Remove missing albums
curl -X POST -H "X-Api-Key: YOUR_API_KEY" \
  "http://localhost:8686/api/v1/command" \
  -d '{"name": "housekeeping"}'

# Update all artists
curl -X POST -H "X-Api-Key: YOUR_API_KEY" \
  "http://localhost:8686/api/v1/command" \
  -d '{"name": "RefreshArtist"}'

Security Considerations

Authentication

# Enable authentication
# Settings → General → Security
Authentication: Forms (Login page)
Username: admin
Password: secure-password
API Key: [generate new]

Network Security

# Bind to localhost only
# Use reverse proxy for external access

# Settings → General → Host
Bind Address: 127.0.0.1
Port: 8686
URL Base: /lidarr (if using reverse proxy)

API Security

# Protect API key
chmod 600 /mnt/user/appdata/lidarr/config.xml

# Monitor API usage
grep "api/v1" /mnt/user/appdata/lidarr/logs/lidarr.txt | tail -20

# Rotate API key regularly
# Generate new key in Settings → General → Security

Advanced Configuration

Custom Scripts

Post-Processing Script

#!/bin/bash
# Custom post-processing script
# Settings → Connect → Add → Custom Script

ARTIST_NAME="$lidarr_artist_name"
ALBUM_TITLE="$lidarr_album_title"
FILE_PATH="$lidarr_albumfolder_path"

# Add custom processing here
echo "Processing: $ARTIST_NAME - $ALBUM_TITLE"
echo "Path: $FILE_PATH"

# Example: Update Plex library
# curl -X POST "http://plex:32400/library/sections/8/refresh?X-Plex-Token=TOKEN"

# Example: Send notification
# curl -X POST "http://gotify:8080/message" \
#   -F "title=New Album" \
#   -F "message=$ARTIST_NAME - $ALBUM_TITLE" \
#   -F "token=TOKEN"

Custom Formats

Vinyl Rip Format

# Settings → Custom Formats → Add
Name: Vinyl Rip
Specifications:
- Release Title Contains: vinyl, rip, vinyl.rip
- Source: Other
Score: 10

Remaster Format

# Settings → Custom Formats → Add
Name: Remaster
Specifications:
- Release Title Contains: remaster, remastered, anniversary
Score: 5

This guide provides comprehensive coverage of Lidarr music management configuration for automated music collection and organization.

# Lidarr Music Management Configuration Guide ## Overview Lidarr is a music collection manager for Usenet and BitTorrent users, similar to Sonarr for TV shows and Radarr for movies. It watches for new albums by your favorite artists and automatically searches, downloads, and organizes your music collection. --- ## Container Installation ### Docker Run Command ```bash docker run -d \ --name=lidarr \ --restart=unless-stopped \ -e PUID=99 \ -e PGID=100 \ -e TZ=America/Chicago \ -p 8686:8686 \ -v /mnt/user/appdata/lidarr:/config \ -v /mnt/user/media/music:/music \ -v /mnt/user/downloads:/downloads \ linuxserver/lidarr:latest ``` ### Docker Compose ```yaml version: "3.8" services: lidarr: image: linuxserver/lidarr:latest container_name: lidarr restart: unless-stopped environment: - PUID=99 - PGID=100 - TZ=America/Chicago ports: - "8686:8686" volumes: - /mnt/user/appdata/lidarr:/config - /mnt/user/media/music:/music - /mnt/user/downloads:/downloads - /mnt/user/downloads/music:/downloads/music networks: - media ``` --- ## Container Configuration ### Port Configuration - **8686**: Web interface (HTTP) ### Volume Mounts - `/mnt/user/appdata/lidarr:/config`: Configuration and database - `/mnt/user/media/music:/music`: Music library destination - `/mnt/user/downloads:/downloads`: Download directory - `/mnt/user/downloads/music:/downloads/music`: Music-specific downloads ### Environment Variables - `PUID=99`: User ID (nobody) - `PGID=100`: Group ID (users) - `TZ`: Timezone setting --- ## Initial Configuration ### Web Interface Setup 1. **Access Web Interface**: `http://your-server-ip:8686` 2. **Authentication**: No default authentication (configure in settings) 3. **Setup Wizard**: Complete initial configuration ### Media Management Settings #### Root Folders 1. **Settings → Media Management → Root Folders** 2. **Add Root Folder**: `/music` 3. **Default Quality Profile**: Lossless 4. **Default Metadata Profile**: Standard 5. **Monitor**: All Albums #### File Management ```bash # Settings → Media Management Rename Albums: Yes Replace Illegal Characters: Yes Colon Replacement Format: Delete Standard Album Format: {Artist Name} - {Album Title} ({Release Year}) {Quality Full} Artist Folder Format: {Artist Name} ``` #### Quality Definitions ```bash # Settings → Profiles → Quality Definitions Unknown: 0-50 MB MP3-8: 0-10 MB MP3-16: 8-25 MB MP3-24: 20-40 MB MP3-32: 30-50 MB MP3-40: 40-65 MB MP3-48: 45-75 MB MP3-56: 50-85 MB MP3-64: 55-95 MB MP3-80: 70-120 MB MP3-96: 80-140 MB MP3-112: 90-160 MB MP3-128: 100-180 MB MP3-160: 125-225 MB MP3-192: 150-270 MB MP3-224: 175-315 MB MP3-256: 200-360 MB MP3-320: 250-450 MB FLAC: 200-2000 MB ``` --- ## Service Configuration ### Quality Profiles #### Lossless Profile (Recommended) ```bash # Settings → Profiles → Quality Profiles → Add Name: Lossless Cutoff: FLAC Allowed Qualities: - FLAC (preferred) - MP3-320 (fallback) ``` #### High Quality Profile ```bash # Settings → Profiles → Quality Profiles → Add Name: High Quality Cutoff: MP3-320 Allowed Qualities: - FLAC (upgrade) - MP3-320 (preferred) - MP3-256 (allowed) ``` #### Standard Profile ```bash # Settings → Profiles → Quality Profiles → Add Name: Standard Cutoff: MP3-192 Allowed Qualities: - MP3-320 (upgrade) - MP3-256 (upgrade) - MP3-192 (preferred) - MP3-160 (allowed) ``` ### Metadata Profiles #### Standard Metadata Profile ```bash # Settings → Profiles → Metadata Profiles → Standard Primary Album Types: - Album ✓ - EP ✓ - Single ✗ (optional) - Broadcast ✗ - Other ✗ Secondary Album Types: - Studio ✓ - Compilation ✓ - Soundtrack ✓ - Live ✗ (optional) - Remix ✗ - DJ-mix ✗ - Mixtape/Street ✗ - Demo ✗ ``` ### Release Profiles #### Preferred Words ```bash # Settings → Profiles → Release Profiles → Add Name: Music Preferences Preferred (Positive Scores): /\b(flac|lossless)\b/i: +15 /\b(24bit|24-bit)\b/i: +10 /\b(vinyl|vinyl.rip)\b/i: +5 /\b(cd|compact.disc)\b/i: +3 /\b(remaster|remastered)\b/i: +5 Must Not Contain (Ignored): /\b(low.quality|lossy|transcoded)\b/i /\b(cam|camrip|telesync)\b/i /\b(dubbed|foreign)\b/i ``` --- ## Integration Points ### Download Client Setup #### SABnzbd Integration 1. **Settings → Download Clients → Add → SABnzbd** 2. **Configuration**: ```bash Name: SABnzbd Host: sabnzbd Port: 8080 API Key: [from SABnzbd] Username: [if auth enabled] Password: [if auth enabled] Category: music Recent Priority: High Older Priority: Normal ``` #### Download Categories ```bash # SABnzbd Categories: music: /downloads/music music-flac: /downloads/music/flac music-mp3: /downloads/music/mp3 ``` #### qBittorrent Integration 1. **Settings → Download Clients → Add → qBittorrent** 2. **Configuration**: ```bash Name: qBittorrent Host: qbittorrent Port: 8080 Username: admin Password: [password] Category: music Sequential Download: No First and Last First: No ``` ### Indexer Configuration #### Prowlarr Integration (Recommended) 1. **Add Prowlarr App in Prowlarr**: ```bash Lidarr Server: http://lidarr:8686 Lidarr API Key: [from Lidarr Settings] Sync Categories: Music ``` #### Manual Indexer Setup ```bash # Settings → Indexers → Add Indexer # Newznab Indexers: NZBHydra2: URL: http://nzbhydra2:5076 API Key: [from NZBHydra2] Categories: 3000,3010,3020,3030,3040 # Torznab Indexers: Jackett: URL: http://jackett:9117/api/v2.0/indexers/[indexer]/results/torznab/ API Key: [from Jackett] Categories: 3000,3010,3020,3030,3040 ``` ### Music Services Integration #### Last.FM Integration 1. **Settings → Metadata → Last.FM** 2. **Enable**: Yes 3. **API Key**: [from Last.FM API] 4. **Get album info**: Yes 5. **Get artist info**: Yes #### MusicBrainz Configuration 1. **Settings → Metadata → MusicBrainz** 2. **Enable**: Yes 3. **Rate Limiting**: 1.0 seconds 4. **Use MusicBrainz for artist info**: Yes ### Media Server Integration #### Plex Integration 1. **Settings → Connect → Add → Plex Media Server** 2. **Configuration**: ```bash Name: Plex Host: plex Port: 32400 Auth Token: [from Plex] Update Library: Yes ``` #### Jellyfin Integration 1. **Settings → Connect → Add → Jellyfin** 2. **Configuration**: ```bash Name: Jellyfin Host: jellyfin Port: 8096 API Key: [from Jellyfin] Update Library: Yes ``` --- ## Monitoring & Notifications ### Import List Configuration #### Spotify Integration 1. **Settings → Import Lists → Add → Spotify Playlists** 2. **Configuration**: ```bash Name: Spotify Favorites Playlist IDs: [comma-separated playlist IDs] Access Token: [Spotify API token] Monitor: Future Albums Quality Profile: Lossless Root Folder: /music ``` #### MusicBrainz Collection 1. **Settings → Import Lists → Add → MusicBrainz Collection** 2. **Configuration**: ```bash Name: My Collection Collection ID: [MusicBrainz collection ID] Monitor: All Albums Quality Profile: Lossless ``` ### Notification Setup #### Discord Notifications 1. **Settings → Connect → Add → Discord** 2. **Configuration**: ```bash Name: Discord Webhook URL: [Discord webhook] Username: Lidarr Avatar: [optional] On Grab: Yes On Import: Yes On Upgrade: Yes ``` #### Gotify Notifications 1. **Settings → Connect → Add → Gotify** 2. **Configuration**: ```bash Name: Gotify Server: http://gotify:8080 App Token: [from Gotify] Priority: 5 Include Album Poster: Yes ``` ### Health Monitoring ```bash # Monitor Lidarr health curl -H "X-Api-Key: YOUR_API_KEY" "http://localhost:8686/api/v1/health" # Check system status curl -H "X-Api-Key: YOUR_API_KEY" "http://localhost:8686/api/v1/system/status" # Monitor queue curl -H "X-Api-Key: YOUR_API_KEY" "http://localhost:8686/api/v1/queue" | jq ``` --- ## Backup Configuration ### Database Backup ```bash #!/bin/bash # Backup Lidarr configuration DATE=$(date +%Y%m%d) BACKUP_DIR="/mnt/user/backups/lidarr" # Stop container for consistent backup docker stop lidarr # Backup database and config cp -r /mnt/user/appdata/lidarr/ $BACKUP_DIR/lidarr_$DATE/ # Restart container docker start lidarr # Compress backup tar -czf $BACKUP_DIR/lidarr_$DATE.tar.gz -C $BACKUP_DIR lidarr_$DATE/ rm -rf $BACKUP_DIR/lidarr_$DATE/ # Retain last 30 days find $BACKUP_DIR -name "lidarr_*.tar.gz" -mtime +30 -delete ``` ### Configuration Export ```bash # Export artists list curl -H "X-Api-Key: YOUR_API_KEY" "http://localhost:8686/api/v1/artist" > artists_backup.json # Export quality profiles curl -H "X-Api-Key: YOUR_API_KEY" "http://localhost:8686/api/v1/qualityprofile" > quality_profiles_backup.json # Export indexers curl -H "X-Api-Key: YOUR_API_KEY" "http://localhost:8686/api/v1/indexer" > indexers_backup.json ``` --- ## Testing Procedures ### Functionality Tests #### Search Tests ```bash # Test artist search curl -H "X-Api-Key: YOUR_API_KEY" \ "http://localhost:8686/api/v1/artist/lookup?term=artist%20name" # Test album search curl -H "X-Api-Key: YOUR_API_KEY" \ "http://localhost:8686/api/v1/album/lookup?term=album%20name" # Test manual search curl -H "X-Api-Key: YOUR_API_KEY" \ "http://localhost:8686/api/v1/release?albumId=1" ``` #### Download Tests ```bash # Test download client connection curl -X POST -H "X-Api-Key: YOUR_API_KEY" \ "http://localhost:8686/api/v1/downloadclient/test" \ -d '{"id": 1}' # Test indexer connection curl -X POST -H "X-Api-Key: YOUR_API_KEY" \ "http://localhost:8686/api/v1/indexer/test" \ -d '{"id": 1}' ``` #### Import Tests 1. **Manual Import**: Test manual import of sample album 2. **Automatic Import**: Add new artist and verify automation 3. **Quality Upgrade**: Test quality upgrade functionality 4. **Metadata**: Verify metadata fetching and album art ### Performance Tests ```bash # Monitor resource usage docker stats lidarr --no-stream # Test concurrent operations # Add multiple artists simultaneously # Monitor system performance during bulk operations ``` --- ## Troubleshooting ### Common Issues 1. **No Search Results**: ```bash # Check indexer status curl -H "X-Api-Key: YOUR_API_KEY" "http://localhost:8686/api/v1/indexer" # Test indexer manually curl -X POST -H "X-Api-Key: YOUR_API_KEY" \ "http://localhost:8686/api/v1/indexer/test" -d '{"id": 1}' ``` 2. **Download Client Issues**: ```bash # Check download client status curl -H "X-Api-Key: YOUR_API_KEY" "http://localhost:8686/api/v1/downloadclient" # Check download client health curl -H "X-Api-Key: YOUR_API_KEY" "http://localhost:8686/api/v1/health" ``` 3. **Import Failures**: ```bash # Check failed imports curl -H "X-Api-Key: YOUR_API_KEY" "http://localhost:8686/api/v1/queue" # Check file permissions docker exec lidarr ls -la /downloads /music ``` 4. **Metadata Issues**: ```bash # Refresh artist metadata curl -X POST -H "X-Api-Key: YOUR_API_KEY" \ "http://localhost:8686/api/v1/command" \ -d '{"name": "RefreshArtist", "artistId": 1}' ``` ### Log Analysis ```bash # View Lidarr logs docker logs lidarr # Monitor real-time logs docker logs -f lidarr # Check specific log files tail -f /mnt/user/appdata/lidarr/logs/lidarr.txt # Filter for errors docker logs lidarr | grep -i error ``` ### Database Issues ```bash # Check database integrity sqlite3 /mnt/user/appdata/lidarr/lidarr.db "PRAGMA integrity_check;" # Vacuum database sqlite3 /mnt/user/appdata/lidarr/lidarr.db "VACUUM;" # Check database size du -h /mnt/user/appdata/lidarr/lidarr.db ``` --- ## Maintenance ### Regular Updates ```bash # Update Lidarr container docker pull linuxserver/lidarr:latest docker stop lidarr docker rm lidarr docker-compose up -d ``` ### Database Maintenance ```bash #!/bin/bash # Monthly database maintenance echo "Starting Lidarr maintenance..." # Stop Lidarr docker stop lidarr # Backup database cp /mnt/user/appdata/lidarr/lidarr.db /mnt/user/appdata/lidarr/lidarr.db.backup # Optimize database sqlite3 /mnt/user/appdata/lidarr/lidarr.db "VACUUM;" sqlite3 /mnt/user/appdata/lidarr/lidarr.db "REINDEX;" # Start Lidarr docker start lidarr echo "Maintenance complete" ``` ### Library Cleanup ```bash # Remove missing albums curl -X POST -H "X-Api-Key: YOUR_API_KEY" \ "http://localhost:8686/api/v1/command" \ -d '{"name": "housekeeping"}' # Update all artists curl -X POST -H "X-Api-Key: YOUR_API_KEY" \ "http://localhost:8686/api/v1/command" \ -d '{"name": "RefreshArtist"}' ``` --- ## Security Considerations ### Authentication ```bash # Enable authentication # Settings → General → Security Authentication: Forms (Login page) Username: admin Password: secure-password API Key: [generate new] ``` ### Network Security ```bash # Bind to localhost only # Use reverse proxy for external access # Settings → General → Host Bind Address: 127.0.0.1 Port: 8686 URL Base: /lidarr (if using reverse proxy) ``` ### API Security ```bash # Protect API key chmod 600 /mnt/user/appdata/lidarr/config.xml # Monitor API usage grep "api/v1" /mnt/user/appdata/lidarr/logs/lidarr.txt | tail -20 # Rotate API key regularly # Generate new key in Settings → General → Security ``` --- ## Advanced Configuration ### Custom Scripts #### Post-Processing Script ```bash #!/bin/bash # Custom post-processing script # Settings → Connect → Add → Custom Script ARTIST_NAME="$lidarr_artist_name" ALBUM_TITLE="$lidarr_album_title" FILE_PATH="$lidarr_albumfolder_path" # Add custom processing here echo "Processing: $ARTIST_NAME - $ALBUM_TITLE" echo "Path: $FILE_PATH" # Example: Update Plex library # curl -X POST "http://plex:32400/library/sections/8/refresh?X-Plex-Token=TOKEN" # Example: Send notification # curl -X POST "http://gotify:8080/message" \ # -F "title=New Album" \ # -F "message=$ARTIST_NAME - $ALBUM_TITLE" \ # -F "token=TOKEN" ``` ### Custom Formats #### Vinyl Rip Format ```bash # Settings → Custom Formats → Add Name: Vinyl Rip Specifications: - Release Title Contains: vinyl, rip, vinyl.rip - Source: Other Score: 10 ``` #### Remaster Format ```bash # Settings → Custom Formats → Add Name: Remaster Specifications: - Release Title Contains: remaster, remastered, anniversary Score: 5 ``` This guide provides comprehensive coverage of Lidarr music management configuration for automated music collection and organization.
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: tonym/NastyNAS#48
No description provided.