Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,17 @@ docker run -it \
stuckj/subsonic:latest
```

### Sonos issues
If you have problems with Subsonic's Sonos support while running in Docker, this may be due to Sonos' use of UPnP. There are a few things that can be done to fix this, but note that the following steps reduce your server's network security and carries some level of additional risk!

[Removing network isolation](https://docs.docker.com/engine/network/) from the docker container may help. Add these parameters to the above `docker run` commands:
* `--net=host`
* `-eSUBSONIC_HOST=<your host IP>`

Note that with this, the `-p` port publishing parameters are no longer necessary.

If this still doesn't work, also try disabling the firewall on your host machine. On Ubuntu, try running `sudo ufw disable` and then restarting the container.

## Docker compose

Here is an example `docker-compose.yaml` if you choose to run with docker compose:
Expand All @@ -108,6 +119,13 @@ services:
- /data/subsonic-data:/var/subsonic
```

## Running as a service
If you want to run subsonic as a service (not using Docker compose), modify [subsonic-docker.service](subsonic-docker.service) and install it:
1. Copy the file to `/etc/systemd/system/subsonic-docker.service`
2. `sudo systemctl daemon-reload`
3. `sudo systemctl enable subsonic-docker`
4. `sudo systemctl start subsonic-docker`

## TODOs

TODO: Setup auto-detection of new versions in Dockerfile (will need to scrape page).
21 changes: 21 additions & 0 deletions subsonic-docker.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
[Unit]
Description=Subsonic (Docker) Service
After=docker.service
Requires=docker.service

[Service]
TimeoutStartSec=0
Restart=always
ExecStartPre=-/usr/bin/docker exec %n stop
ExecStartPre=-/usr/bin/docker rm %n
ExecStartPre=/usr/bin/docker pull stuckj/subsonic:latest
ExecStart=/usr/bin/docker run --rm \
-p "4040:4040/tcp" \
-v /data/music:/var/music \
-v /data/subsonic-data:/var/subsonic \
--name="subsonic" \
stuckj/subsonic:latest
ExecStop=/usr/bin/docker exec %n stop

[Install]
WantedBy=default.target