Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/finomnis/librespot-docker
A librespot docker container for your PC or Raspberry Pi
https://github.com/finomnis/librespot-docker
Last synced: 8 days ago
JSON representation
A librespot docker container for your PC or Raspberry Pi
- Host: GitHub
- URL: https://github.com/finomnis/librespot-docker
- Owner: Finomnis
- License: mit
- Created: 2021-10-19T08:51:04.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-12-16T09:38:58.000Z (11 months ago)
- Last Synced: 2024-10-09T07:13:10.395Z (29 days ago)
- Language: Dockerfile
- Size: 39.1 KB
- Stars: 0
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# librespot-docker
A [librespot] Docker container for your Raspberry Pi or PC.
Convert your Raspberry Pi or PC to a [Spotify] streaming target!
## Docker Image
## Quick start
Make sure you have a PipeWire server installed and running.
Detailed instructions on how to setup PipeWire and Docker on a Raspberry Pi can be found [here](./RASPBERRY_PI_SETUP_GUIDE.md).To run the librespot Docker image successfully, you have to mount in the PipeWire device as `/tmp/pipewire-0` to the Docker container and publish the
ports `5353/udp` and `5354/tcp`.All of this can be achieved through the following docker-compose script:
```
version: "2"
services:
librespot:
container_name: librespot
image: "ghcr.io/finomnis/librespot-docker"
restart: unless-stopped
tty: true # if you want color in your log
network_mode: host
volumes:
- /run/user/1000/pipewire-0:/tmp/pipewire-0
```If you are not the user with id `1000`, you might have to adjust the first `1000` according to your user id.
To customize your librespot instance, here is a more complete script including environment variables:
```
version: "2"
services:
librespot:
container_name: librespot
image: "ghcr.io/finomnis/librespot-docker"
restart: unless-stopped
tty: true
network_mode: host
environment:
- LIBRESPOT_NAME=librespot
- LIBRESPOT_DEVICE_TYPE=speaker
- LIBRESPOT_BITRATE=320
- LIBRESPOT_INITIAL_VOLUME=70
- LIBRESPOT_AUDIO_FORMAT=F32
- LIBRESPOT_AUTOPLAY=1
volumes:
- /run/user/1000/pipewire-0:/tmp/pipewire-0
```## Environment Variables
| Variable | Default | Description |
| ------------------------- | ------------ | --------------------------------------------------------------------------------------------- |
| LIBRESPOT_NAME | `librespot` | The name displayed in Spotify. |
| LIBRESPOT_DEVICE_TYPE | `speaker` | The device type displayed in Spotify. For more information read [librespot options]. |
| LIBRESPOT_BITRATE | `320` | The quality of the spotify stream, in kbps. For more information read [librespot options]. |
| LIBRESPOT_INITIAL_VOLUME | `70` | The initial default playback volume, in percent. |
| LIBRESPOT_AUDIO_FORMAT | `F32` | The playback audio format. For more information read [librespot options]. |
| LIBRESPOT_AUTOPLAY | `1` | Whether random tracks should be played after the song queue is finished. Possible values: `0` or `1`. |
| LIBRESPOT_QUIET | `1` | Only log warning and error messages. Possible values: `0` or `1`. |
| LIBRESPOT_VERBOSE | `0` | Increase the amout of log output. Possible values: `0` or `1`. |# Raspberry Pi Setup Guide
Read [this guide](./RASPBERRY_PI_SETUP_GUIDE.md) for instructions on how to set up a Raspberry Pi.
[//]: <> (Links below...................)
[librespot]: https://github.com/librespot-org/librespot
[Spotify]: http://spotify.com/
[librespot options]: https://github.com/librespot-org/librespot/wiki/Options