GithubHelp home page GithubHelp logo

mmmaxwwwell / snapcast-librespot-docker-compose Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 10 KB

docker-compose stack that broadcasts a spotify connect speaker and streams to snapcast nginx ssl

License: MIT License

Shell 100.00%

snapcast-librespot-docker-compose's Introduction

Docker compose stack that provides a distributed time synchronized Spotify Connect speaker, wrapped in ssl.

Doesn't play audio locally, requires web or native snapcast clients.

Prerequisites

  • docker
  • docker-compose
  • amd64 arch computer (multiarch support coming soon)
  • Spotify premium

Features

  • Web interface wrapped in SSL, A+ on Qualys' SSL Server Test
  • Automatically obtains and renews ssl certificate, assuming traffic is forwarded correctly
  • Provides a Spotify Connect Speaker on your network
  • Distributed, time synchronized audio

Usage

  1. Clone this repo
  2. Copy the settings.example folder and rename it to settings
  3. Go through settings/common.env and fill out anything you want to change, specifically the following
  • HOSTED_URL
  • ADMIN_EMAIL
  1. Generate a dhparam.pem for nginx by running mkdir -p appdata/nginx && openssl dhparam -out ./appdata/nginx/dhparam.pem 2048 in the repo's root
  2. Ensure traffic is routed and your DNS resolves correctly
  3. Ensure req'd ports are open and not blocked by firewall. Defaults ports required are 80, 443 and 5454.
  4. Run ./start
  5. In a Spotify client, select the speaker, "librespot-docker" with the default settings/common.env, and play some music
  6. In a browser, you should be able to go to "$SNAPSERVER_SUBDOMAIN.$HOSTED_URL", or "snapcast.example.com" with the default settings/common.env
  7. Press the play icon in the top right hand corner of the screen and you should hear your Spotify connect stream
  8. Repeat steps 8 and 9 with other devices

Libraries

Ports

  • 80 nginx http - only used by nginx for getting the ssl cert, OK to face the internet
  • 443 nginx ssl - nginx ssl port, snapcast web server http interface will be available here after cert is obtained
  • 1704 snapcast tcp - snapcast uses this port to communicate with other snapcast clients. I wouldn't expose this to the internet
  • 1705 snapcast ??? - ???, ditto?
  • 1780 snapcast http - snapcast http webserver, don't expose to internet
  • 5454 zeroconf - used for communication with librespot, the spotify connect provider

Tips

  • Use wireguard and set $LISTEN_IP to the ip assigned to your wireguard interface
  • You can listen on your router's public IP address with port 80 to obtain a cert, while keeping port 443 traffic local to your network.

snapcast-librespot-docker-compose's People

Contributors

mmmaxwwwell avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.