A self-hosted, completely private and free music streaming server compatible with Synology Audio Station's web browser interface and smartphone apps.

Overview

Open Audio Server

Open Audio Server is a music streaming server compatible with Audio Station by Synology. Audio Station creates your own private service like Spotify for you and your family. You store your music files on your Synology NAS and access them in web browsers on your computers or use the Synology DS Audio app available on Android and iOS marketplaces.

Open Audio Server lets you use any computer to store and stream your music library when your Synology NAS is unavailable. It should run on SBC ARM devices with as little as 256 MB of memory but the smallest device it has been tested on is a Raspberry Pi 2 Model B with 1024 MB of memory.

This project is not associated with Synology in any way.

Changelog | API documentation | Get DS Audio apps from the Synology website, Play Store & App Store

Screenshot of Audio Station's web browser interface by Synology

Compatibility

Aside from user accounts the goal is for complete compatibility. Although incomplete the server is functional:

[✓] Home screen pinned media and any "default" genres within your library
[✓] Browsing, pinning, rating and editing songs and saving tracks to playlists
[✓] Browsing and pinning artists, albums, composers and genres and saving to playlists
[✓] Browsing, adding, editing, deleting and playing ShoutCast and added radio stations  
[✓] Playing, creating, browsing, editing, reordering and deleting playlists   
[✓] Playing, browsing and deleting music in playing queues
[✓] Pagination, sorting, toggling columns of library items
[✓] Detecting and selecting USB audio devices  
[✓] Remote playback using server's default audio
[✓] Remote volume control of server's default audio
[✓] CSS themes for dark-mode web browser interface
[✓] Android app compatibility  
[✓] iPhone app compatibility  
[✓] Add support for serving images etc embedded in themes
[ ] Searching for DLNA servers on network  
[ ] Browsing DLNA servers (under "Media Server")  
[ ] Broadcasting as DLNA server
[ ] Broadcasting as iTunes server
[ ] Song downloading on browser interface
[ ] Shuffling, repeating and reorganizing music in playing queues
[ ] Changing song cover images  
[ ] Downloading song lyrics  
[ ] Calculating genre, artist, album ratings by song ratings
[ ] Saving changes to settings and 
[ ] Whatever Amazon Alexa Service does
[ ] Work out which "synoman" files can be deleted  

Installing Open Audio Server

You can use Docker to install the server, if you want to access the server by web browser follow the steps for installing the web interface first to populate the "synoman" and "synohtml" folders:

$ docker run \
    --name open-audio-server \
    --device /dev/snd:/dev/snd \
    -v /path/to/music:/data/music \
    -v /path/to/music:/data/cache \
    -v /path/to/synoman:/data/synoman \
    -v /path/to/synohtml:/data/html \
    -p 5000:5000 \
    openaudioserver/open-audio-server

You can install the server from the repository. First make sure you install NodeJS at least the "lts" version, then download the project from Github:

$ git clone https://github.com/openaudioserver/open-audio-server

Change into the Open Audio Server directory:

$ cd open-audio-server

The MUSIC_PATH setting should be the root of your music library where all your artist folders are:

$ export MUSIC_PATH=/path/to/music

The CACHE_PATH setting is a folder for storing some JSON files containing your song index, ratings, etc:

$ export CACHE_PATH=/path/to/cache

The SYNOMAN_PATH setting is where you optionally-copied Synology's files to use Audio Station in web browsers (details further down):

$ export SYNOMAN_PATH=/path/to/synoman

The DSAUDIO_HTML_PATH setting is where you optionally-saved the HTML for Audio Station's web interface:

$ export DSAUDIO_HTML_PATH=/path/to/dsaudio.html

The HOST is the network interface to listen on, probably your WIFI IP address. If you do not specify it the server will only be accessible on your computer at http://localhost:5000. If you specify your IP address (or 0.0.0.0 for all network connections) the DS Audio mobile apps and web browsers will be able to access your library at your IP address:

$ export HOST=0.0.0.0

The PORT is a number that divides your IP address into thousands of different addresses, like adding apartment numbers to a building address, so all the different software on your computer can share the one IP address. Generally a value higher than 1024 is recommended. Open Audio Server uses port 5000 to match Synology DSM's default settings.

$ export PORT=5000

The GZIP setting will compress your song and any other data very effectively, 1000 songs requires very roughly 500 kilobytes of JSON data that GZIP can compress to 50 kilobytes. The reduction in file size means your library reads and updates much faster if it is a very large library on slow storage.

$ export GZIP=true

The next line installs dependencies for the project. These packages are specified within "package.json" in the root of the project.

$ npm install

Start the server

$ node server.js 

If you are going to be using remote playback you might need to install the sox and libsox-fmt-all packages:

$ sudo apt-get install -y sox libsox-fmt-all build-essential

Running as a service

I use "PM2" to run as a service:

$ npm install -g pm2

Start the server with nothing being logged to disk:

$ pm2 start server.js --name open-audio-server -o /dev/null -e /dev/null -l /dev/null

Set the server to run on startup, this will give you a command you have to run:

$ pm2 startup

And then save your settings:

$ pm2 save

Issues and contributions

If Open Audio Server is not working for you create an issue to explore why. If you can help someone unpack or resolve their problem post a reply on their issue. There is probably compatibility issues, errors, bugs, and a long list of missing features too. If you would like to help improve this pull requests are welcome. Code contributions will be donated to the project and inherit its MIT license and a CONTRIBUTORS.md can be started.

Scanning your library

The scanner will run automatically the first time you start the server. The next time you start the server it will refer to a saved copy of your music index in your CACHE_PATH. You can manually update your music library by going to http://YOUR_SERVER_ADDRESS/scan in a browser tab.

Setting up the mobile apps

DS Audio mobile and television apps can be downloaded from the App Store, Play Store, Amazon App Store, and Android apps are also distributed on the Synology website:

https://www.synology.com/en-us/support/download/DS920+#androids

When you open the apps, instead of the Synology server address you enter your computer's IP address on your home network. There are no "user accounts" so it doesn't matter what you put in the username and password field.

Optionally setting up the web interface

If you would like to use the web interface from Synology you will need to copy some files from DSM, the operating system running on your Synology NAS (or an Xpenology virtual machine). These files cannot be distributed with the Open Audio Server project because they are copyright Synology.

The folder we are copying is /usr/syno/synoman, within it is the HTML, CSS and JavaScript files for the Audio Station web interface, along with Synology's libraries for DSM. To use "scp" you may need to temporarily enable SSH in DSM under Control Panel -> Terminal & SNMP.

$ scp -r [email protected]:/usr/syno/synoman/ /some/where

Update our configuration variable for SYNOMAN_PATH:

$ export SYNOMAN_PATH=/some/where

Finally, you will need to open Audio Station in your web browser occupying its own tab, you can do this by right clicking the icon in DSM and selecting launch in new window. When Audio Station is open find your browser setting to "View source" and save all the text into dsaudio.html. Then update your configuration variable:

$ export DSAUDIO_HTML_PATH=/path/to/your/dsaudio.html

Once you have set up the HTML page and "synoman" folder you can open the web app in your browser:

http://localhost:5000/

Themes and dark mode

Open Audio Server supports CSS themes you can configure before starting the server. Currently the theme must be a CSS file. At the moment this is only useful for "dark mode" because someone already created a dark theme:

$ git clone https://github.com/slserpent/dsm-dark-theme/

Configure the THEME_PATH with the theme's CSS file:

$ export THEME_PATH=/path/to/slserpent/dsm-dark-theme/audiostation-dark.css

Start the NodeJS server:

$ node server.js

License

MIT

Comments
  • API documentation is incomplete

    API documentation is incomplete

    I will get to this eventually in the meantime pull requests are welcome to add the remaining routes/descriptions -

    https://github.com/openaudioserver/open-audio-server/blob/master/API.md

    opened by randomdev1234 0
  • Docker image not working

    Docker image not working

    Here is the error from logs: GET /dsaudio?launchApp=SYNO.SDS.AudioStation.Application [Object: null prototype] { launchApp: 'SYNO.SDS.AudioStation.Application' }

    opened by cfredericksen 0
  • Transcoding serves you an unmodified FLAC file

    Transcoding serves you an unmodified FLAC file

    Pull requests are welcome if anyone would like to try and fix this before I get to it. The file to examine is:

    https://github.com/openaudioserver/open-audio-server/blob/master/src/webapi/AudioStation/stream.cgi.js#L5

    opened by randomdev1234 0
  • Standardize on

    Standardize on "name" and make "title" a virtual field

    Audio Station uses both of these properties in different contexts, the server should just use "name" though and on the API routes that require "title" fields we can copy it in when serving the response rather than maintaining a redundant property.

    Pull requests are welcome if anyone would like to try and fix this before I get to it. I think the easiest way would be find/replace "title" out of Open Audio Server on a file-by-file basis and look for the routes that now throw errors.

    opened by randomdev1234 0
  • Add ENV variable for overriding page size

    Add ENV variable for overriding page size

    Pull requests are welcome if anyone would like to try and fix this before I get to it. The relevant files are the "listing" scripts in:

    • https://github.com/openaudioserver/open-audio-server/tree/master/src/webapi/AudioStation/artist.cgi.js
    • https://github.com/openaudioserver/open-audio-server/tree/master/src/webapi/AudioStation/composer.cgi.js
    • https://github.com/openaudioserver/open-audio-server/tree/master/src/webapi/AudioStation/album.cgi.js
    • https://github.com/openaudioserver/open-audio-server/tree/master/src/webapi/AudioStation/genre.cgi.js
    • https://github.com/openaudioserver/open-audio-server/tree/master/src/webapi/AudioStation/radio.cgi.js
    • https://github.com/openaudioserver/open-audio-server/tree/master/src/webapi/AudioStation/song.cgi.js

    The way limits currently work is Audio Station sends the value via POST or URL parameters. In each of these scripts the limit value is parsed to an integer and the returning data is truncated to the limit size. By using an ENV variable we can override this limit and set a higher or lower value of personal preference. The README.md would need updating to include the new variable, and the Dockerfile would need to add it.

    opened by randomdev1234 0
  • Remote playback queue does not organize/append properly

    Remote playback queue does not organize/append properly

    Pull requests are welcome if anyone would like to try and fix this before I get to it. The file to examine is:

    https://github.com/openaudioserver/open-audio-server/blob/master/src/webapi/AudioStation/remote_player.cgi.js#L47

    opened by randomdev1234 0
  • Editing track order of locally-playing queue does not work properly

    Editing track order of locally-playing queue does not work properly

    Pull requests are welcome if anyone would like to try and fix this before I get to it. The file to examine is:

    https://github.com/openaudioserver/open-audio-server/blob/master/src/webapi/AudioStation/web_player.cgi.js#L45

    opened by randomdev1234 0
Owner
null
Audio visualizer library for javascript. Create dynamic animations that react to an audio file or audio stream.

Wave.js Audio visualizer library for javascript. Installation Install With CDN <script src="https://cdn.jsdelivr.net/gh/foobar404/wave.js/dist/bundle.

Austin Michaud λ 497 Dec 21, 2022
A mobile app for playing music on Resonate, an open source music streaming co-op.

stream2own Play fair. Website | Twitter | Contributing | Developer Guide ?? Resonate Stream App A mobile app for playing music on Resonate, an open so

Peter Klingelhofer 12 Dec 28, 2022
A Discord bot designed for taking self-hosted media server requests from users

Jellybot A Discord bot designed for taking self-hosted media server requests from users What's it for? If you're coming across this, you probably have

null 2 Mar 25, 2022
:musical_score: ts-audio is an agnostic library that makes it easy to work with AudioContext and create audio playlists in the browser

ts-audio · ts-audio is an agnostic and easy-to-use library to work with the AudioContext API and create Playlists. Features Simple API that abstracts

Evandro Leopoldino Gonçalves 284 Dec 25, 2022
Advanced Music Bot It is an advance type of discord music bot which plays high quality of music with spotify

Advanced Music Bot It is an advance type of discord music bot which plays high quality of music with spotify, apple music support . You can save your songs and play it. It also has DJ mode system.

Diwas Atreya 65 Dec 25, 2022
AmplitudeJS: Open Source HTML5 Web Audio Library. Design your web audio player, the way you want. No dependencies required.

Documentation • Examples • Tutorials • Support Us • Get Professional Help AmplitudeJS is a lightweight JavaScript library that allows you to control t

Server Side Up 3.9k Jan 2, 2023
Spotify radio is an audio streaming app where you can add effects in real time.

Spotify Radio - Semana JS Expert 6.0 Spotify radio is an audio streaming app where you can add effects in real time. JS-Expert Project of the Week by

Luis Fernando 6 Apr 25, 2022
Self hosted media tracker for movies, tv shows, video games, books and audiobooks

MediaTracker · Self hosted platform for tracking movies, tv shows, video games, books and audiobooks, highly inspired by flox Demo https://mediatracke

null 225 Jan 3, 2023
Self-Hosted Discord Bot to onboard users, protect users, and gamify entertainment & engagement.

Self-Hosted Open-Source Discord Bot to onboard & protect community members. It gamifies user entertainment & engagement. Usage Clone using: git clone

Accretence 4 Sep 8, 2022
3D visualization of music using Three.js and web audio API.

3D Music Visualization About 3D visualization of music using Three.js and web audio API Try it here Main screen Additional screen Technologies Languag

Ivan Vedenin 19 Oct 31, 2022
A video message app completely decentralized, apart from the turn server

Doom @WIP Doom (Decentralized Zoom proof of concept) What is this? It's a video message app completely decentralized, apart from the turn server (wip)

Felipe Melo 17 Oct 30, 2022
Vlc-bgm - Web interface for controlling VLC remotely to use as a background music (BGM) player

vlc-bgm Web interface for controlling VLC remotely to use as a background music (BGM) player About This is designed to be used when VLC is running on

David Ralph 3 Mar 5, 2022
Music bot that uses Lavalink for its audio player

Msv Music ?? A Advanced Discord Music Bot Made With Lavalink And Have Many Premium Features with filters and more willl be add soon About Msv Music ??

M s v 36 Jan 4, 2022
A bot used for the PhaseSMP (Private Minecraft Survival Server)

PhaseSMP Bot This is a discord bot used on the PhaseSMP Discord Server (A private Minecraft survival server) Made with DiscordJS Required Packages: di

null 4 Nov 3, 2022
Fuzz-Free Web Audio Scheduling

Zyklus Zyklus a small (380 Byte) library to get an accurate Web Audio Clock without hassle. Demo Blog Post Installation npm i zyklus --save Usage impo

Felix Roos 5 Nov 4, 2022
Free Anime Streaming Website Made with PHP and Gogoanime API. No Video ads

AniKatsu - Watch High Quality Anime Online Without Ads Demo https://anikatsu.ga This is a PHP application used for browsing, searching and watching an

Shashank Tiwari 34 Nov 7, 2022
Music-Player - Music player application built with HTML, CSS and vanilla JavaScript

Music-Player Music player application built with HTML, CSS and vanilla JavaScrip

Karthik Umashankar 1 Feb 10, 2022
A decentralized Music Ownership System developed on Truffle Suite and React Bootstrap to allow Music artists to upload their content to the blockchain, that can be streamed by users

A decentralized Music Ownership System developed on Truffle Suite and React Bootstrap to allow Music artists to upload their content to the blockchain, that can be streamed by users.

M. Adil Fayyaz 10 Sep 5, 2022
I’m a very useful music bot that can make you play a music with a simple command! I have a lot of good commands that you can have a better experience playing your favorites songs!

I’m a very useful music bot that can make you play a music with a simple command! I have a lot of good commands that you can have a better experience playing your favorites songs!

Hugo Kishi 2 Aug 16, 2022