AI DJ for Lyrion Music Server: picks what plays next, follows your moods, explains every song.
975
dj decides what plays next on your Lyrion Music Server (LMS) players. It runs next to LMS and talks to it through an LMS plugin: when a queue is about to run out, DJ adds songs that fit what you're playing, the time of day and the mood you asked for, and tells you why it chose each one.
Source, issues and the plugin: https://github.com/geir-eilertsen/dj
Artist similarity and styles come from Last.fm and are cached locally. If Last.fm, Claude or the internet is slow or down, DJ uses its own ranking, and if DJ itself is down, LMS falls back to its default behaviour: the music never stops because of DJ.
You need LMS (tested with 9.1, needs 8.0 or newer) with the DJ plugin, and Docker on the same machine.
1. Run the service with this docker-compose.yml:
services:
dj:
image: geireilertsen/dj:latest
container_name: dj
network_mode: host # reaches LMS on localhost:9000; the plugin reaches DJ on localhost:9010
environment:
- TZ=Europe/Oslo # your time zone: DJ picks music by time of day
- LMS_URL=http://localhost:9000
env_file:
- path: .env # LASTFM_API_KEY=..., ANTHROPIC_API_KEY=..., TICKETMASTER_API_KEY=..., one per line
required: false
volumes:
- dj-data:/data
restart: unless-stopped
volumes:
dj-data:
docker compose up -d
curl localhost:9010/health # {"status":"ok"}
2. Install the plugin. In LMS, Settings → Manage Plugins → Additional Repositories:
add https://raw.githubusercontent.com/geir-eilertsen/dj/main/repo.xml, then tick
DJ (AI suggestions), save and restart LMS.
3. Play. In Material Skin: Apps → DJ → Start DJ or Play a mood….
| Variable | Get it from | Without it |
|---|---|---|
LASTFM_API_KEY | last.fm/api/account/create (free) | DJ only knows play counts and release years |
ANTHROPIC_API_KEY | console.anthropic.com, created inside a workspace | No reasons, no Claude ordering; moods by keywords only |
TICKETMASTER_API_KEY | developer.ticketmaster.com (free) | Concert dates only from Madness Live! (Spain) |
What each service is sent is listed under Privacy.
Claude Haiku costs roughly $0.0005 per mix. Keep keys in .env, not in the compose file. DJ
never logs them.
| Variable | Default | |
|---|---|---|
LMS_URL | http://localhost:9000 | LMS address |
TZ | UTC | Time zone for time-of-day picks and the Christmas season |
DJ_PORT | 9010 | HTTP port the plugin calls |
DJ_DISCOVERY_SHARE | 0.4 | Share of each mix from new music (0 turns discovery off) |
DJ_LLM_MODEL | claude-haiku-5-5 | Claude model |
DJ_LLM_LANGUAGE | English | Language of the reasons |
DJ_LLM_TIMEOUT_MS | 5000 | Give up on Claude after this long and use DJ's own order |
DJ_CANDIDATES | 50 | How many candidates Claude chooses from |
DJ_CONCERT_COUNTRIES | europe | Concerts in these countries: ISO codes and/or europe (e.g. europe,TR, US,CA), or all |
More settings are listed in the project README.
linux/amd64 and linux/arm64 (64-bit Raspberry Pi OS). 32-bit ARM isn't
available: there is no Java 21 runtime image for it.latest and version tags such as 0.11.0./data (artist profiles, discovered music, listening history,
moods, concerts). Mount a volume there to keep them across updates.9010 (GET /health, GET /status, GET /mix, /mood, /why, /concerts).nobody (65534), not root.-p 9010:9010), set
LMS_URL to LMS's address and the service address in LMS under Settings → Advanced → DJ.MIT
Content type
Image
Digest
sha256:7a56e6406…
Size
152.1 MB
Last updated
27 days ago
docker pull geireilertsen/dj