A plugin for the music geek's media organizer.
Beets Store is a web frontend for your music library organized by beets.
- Play the music in your browser.
- Optional scrobble the played music info to LastFM
- Download the music files and entire albums (A zipped directory with the music files and the album cover image.)
Install required services.
$ apt install redis
Install package and scripts.
$ git clone https://github.com/tschaefer/beets-store
$ cd beets-store
$ pipx install --include-deps .
Add plugin settings to beets configuration file.
store:
host: "::1"
port: 8080
zipdir: /tmp/beets/store/zip
cors_origins: "https://music.example.com"
lastfm:
api_key: API_KEY
secret_key: SECRET_KEY
The cors_origins setting is optional by default all * requests are
allowed.
The lastfm settings are optional. If you don't want to scrobble leave the
settings out.
Example beets configuration file
Import audio files.
$ beet import /music
Fetch cover art.
The album art image must be stored as cover.jpg alongside the music files
for an album. For optimal display all the images should have an equal width and
height of at least 300x300 px.
$ beet fetchart
Start job queue worker.
The job queue is used to create album zip files for the download.
$ rq worker
Start the web service.
$ beet store
Configure environment file.
Set BEETS_MUSIC_VOLUME in the environment file docker-compose.env.
For overriding the configuration file and persist the database enable and set the proper settings in the enviroment and compose files.
The container runs as a non-root user beets with UID/GID 1000. Ensure the
host music directory is readable (and writable, for album art fetching) by
UID 1000.
Start the service.
$ docker compose --env-file docker-compose.env up
- Python >= 3.11
- Redis (see Installation)
Clone the repository and create a virtual environment inside the project directory.
$ git clone https://github.com/tschaefer/beets-store
$ cd beets-store
$ python3 -m venv venv
$ source venv/bin/activate
Install the package in editable mode so that code changes take effect immediately without reinstalling.
$ pip install -e .
Create a minimal beets configuration file, e.g. venv/store.yml, pointing
to your music directory and a local SQLite database.
directory: /path/to/your/music
library: venv/store.db
import:
write: false
copy: false
move: false
resume: false
autotag: false
plugins: store fetchart
fetchart:
auto: false
store:
host: "127.0.0.1"
port: 8080
zipdir: /path/to/your/music/zipImport your music and fetch cover art.
$ beet --config venv/store.yml import /path/to/your/music
$ beet --config venv/store.yml fetchart
Start the Redis-backed job queue worker in one terminal.
$ source venv/bin/activate
$ rq worker
Start the Flask development server in a second terminal.
$ source venv/bin/activate
$ FLASK_DEBUG=true beet --config venv/store.yml store
The store is now available at http://127.0.0.1:8080.
A Procfile can be used with a process manager such as
Foreman to start both processes at once.
queue: rq worker
store: beet --config venv/store.yml store



