A containerized Node.js application that synchronizes scrobbles from Last.fm, stores them in a local SQLite database, and serves a web dashboard.
Your LastFM is a Node.js application designed to automatically synchronize music scrobbles from Last.fm. It preserves your listening history in a local SQLite database and serves a web interface for data visualization.
The project is fully containerized with Docker, using an automated entrypoint to handle database initialization and sequential execution (Syncing first, then launching the Web API). It also utilizes PM2 as a process manager inside the container to ensure the web service remains active and resilient.
- Clean, modern web interface to visualize your music activity.
- Periodically fetches and stores your listening history (scrobbles) from Last.fm.
- Ensures your data is always up to date without manual intervention.
- Persists all scrobbles in a local SQLite database.
- Allows fast queries and offline access to historical listening data.
- Displays your most recent tracks.
- Smart image fallback logic for tracks, albums, and artists.
- Compare your music taste with Last.fm friends.
- Shows compatibility level (Very Low → Super).
- Displays common top artists, albums, and tracks.
- Calculates and normalizes compatibility based on real listening data.
- Generate dynamic images based on your listening data.
- Optimized layouts for feed posts and instagram stories (9:16)
- Built using node-canvas for server-side image rendering.
LASTFM_API_KEY=your_lastfm_api_key
LASTFM_USERNAME=your_lastfm_usernameLast.fm: Create an API account here to get your API Key.
services:
your-lastfm:
image: gomaink/your-lastfm
container_name: your-lastfm
ports:
- "1533:1533"
env_file:
- .env
volumes:
- ./data:/app/data
restart: unless-stoppedOn terminal:
docker compose up -d
Then access:
http://localhost:1533
(or replace localhost with your server IP)
This project is licensed under the MIT License.