Containerized BlueZ service for a wireless Bluetooth receiver.
2.5K
A containerized BlueZ service that exposes an audio-configured Bluetooth interface to transform a headless or legacy speaker system into a wireless Bluetooth receiver.
compose.yamlservices:
bluez-speaker:
image: wgraj/bluez-speaker:latest
container_name: bluez-speaker
network_mode: host
environment:
- DBUS_SYSTEM_BUS_ADDRESS=unix:path=/var/run/dbus/system_bus_socket
cap_add:
- NET_ADMIN
volumes:
- /var/run/dbus:/var/run/dbus
- ./bluetooth-data:/var/lib/bluetooth
pipewire:
image: wgraj/pipewire:latest
container_name: pipewire
network_mode: host
environment:
- PUID=1000
- PGID=1000
- BLUETOOTH_A2DP=1
- DBUS_SYSTEM_BUS_ADDRESS=unix:path=/var/run/dbus/system_bus_socket
cap_add:
- SYS_NICE
- IPC_LOCK
ulimits:
rtprio: 95
memlock: -1
volumes:
- /run/udev:/run/udev:ro
- /var/run/dbus:/var/run/dbus:ro
devices:
- /dev/snd:/dev/snd
You'll most likely need to disable your host bluetooth service
systemctl disable --now bluetooth
systemctl mask --now bluetooth
To enable pairing, make an HTTP request to $PORT/hooks/pair, e.g.
curl http://localhost:2137/hooks/pair
| Variable | Value | Default | Explanation |
|---|---|---|---|
NAME | String | The broadcasted name of the Bluetooth device. | |
TIMEOUT | Numeric | 120 | The time (in seconds) that discovery and pairing stay active before shutting off. |
PORT | Numeric | 2137 | The HTTP port that the webhook process listens on for pairing events. |
MAC | String | Hardware MAC address of the Bluetooth controller if you have multiple adapters. |
Content type
Image
Digest
sha256:955bc965f…
Size
53.2 MB
Last updated
5 days ago
docker pull wgraj/bluez-speaker