---
title: 'Linux play on Sonos via Airplay'
url: 'https://willifix.net/blog/linux-play-on-sonos-via-airplay'
markdown: 'https://willifix.net/blog/linux-play-on-sonos-via-airplay.md'
date: '2024-08-24'
description: "Apple's Airplay is a really great thing. You simply select the existing Airplay-enabled speakers (in my case Sonos) in the Mac/iPhone and the party starts. In the background, the Bonjour service is responsible for this smooth process. Under Linux there is avahi for this. After looking at the avahi…"
---

`Apple's Airplay` is a really great thing. You simply select the existing `Airplay`-enabled speakers (in my case `Sonos`) in the Mac/iPhone and the party starts. In the background, the `Bonjour` service is responsible for this smooth process. Under Linux there is `avahi` for this. After looking at the [avahi](https://wiki.archlinux.org/title/Avahi#Adding_services?target=_blank) howto from archlinux wiki i thought to myself finding so much stuff for a few speakers? there must be a more elegant way! And yes here is a static configuration that creates a new Sink for pipewire-pulse service:

Copy the following file `sonossink.conf` in the pipewire-pulse.conf.d folder (~/.config/pipewire/pipewire-pulse.conf.d) and change the IP to fits your setup.

```json
# Airplay Config for my Sonos ♞Raffael.Willems 
context.modules = [
{   
    name = libpipewire-module-raop-sink
    args = {
        raop.ip = "192.168.0.46"
        raop.port = 7000
        raop.name = "Sonos"
        raop.encryption.type = "auth_setup"
        stream.props = {
            # extra sink properties
        }
# having a service 
    }
}
]
```

You must restart your pipewire-pulse service

```bash
systemctl --user restart pipewire-pulse
```

now you should have a new Sink named Sonos

```bash
pw-cli list-objects Node | grep Sonos
```

![RWill_2024-08-24%2012-01-43](https://willifix.net/user/pages/03.blog/linux-play-on-sonos-via-airplay/RWill_2024-08-24%2012-01-43.png "RWill_2024-08-24%2012-01-43")

![RWill_2024-08-24%2012-02-34](https://willifix.net/user/pages/03.blog/linux-play-on-sonos-via-airplay/RWill_2024-08-24%2012-02-34.png "RWill_2024-08-24%2012-02-34")

Now you can listen to music on the Airplay-enabled device with a program of your choice. I have configured my Sonos as a stereo pair and this also works wonderfully 🙂

dont forget your firewall. If the sonos sink is there but the sonos won't start to play and disappears after a while your firewall should the first thing you should check

 [ Previous Post](https://willifix.net/blog/nix-on-macos-the-better-homebrew) [Next Post ](https://willifix.net/blog/updating-740-3cx-users-via-configuration-api)

---

## Navigation

- Parent: [Blog](https://willifix.net/blog.md)
- Previous: [updating 740 3cx Users via Configuration API](https://willifix.net/blog/updating-740-3cx-users-via-configuration-api.md)
- Next: [Nix on MacOs the better homebrew](https://willifix.net/blog/nix-on-macos-the-better-homebrew.md)
