Tape-selecta is a dockerized icecast2 server together with ezstream and node.js makes the perfect way to set up your own online radio station following just a few simple steps.
The setup is very simple:
- Install Docker.
- Cope your mp3 files into the music directory.
- Run start.sh.
- Check localhost:8000/mountpoint, your music should be streaming there!
Before running your online radio station, it is important to make some security changes to the configuration of the Icecast2 server. Change the content of the file icecast-config/icecast.xml:
<authentication>
<!-- Sources log in with username 'source' -->
<source-password>password</source-password>
<!-- Relays log in with username 'relay' -->
<relay-password>password</relay-password>
<!-- Admin logs in with the username given below -->
<admin-user>admin</admin-user>
<admin-password>password</admin-password>
</authentication>
After this change the content of the ezstream-config/ezstream_mp3.xml file to match the password choosen for the Icecast2 admin user.
<sourcepassword>password</sourcepassword>
There are some other configuration options in both xml files please check the Icecast documentation page and Ezstream documentation page to know more on the subject.
The code of the project includes an Express/Node.js server, ready to the static files included in the web/public directory. Futhermore, it is possible to retrieve the information of the current track playing in the endpoint localhost/status, the information can be useful in case we want to show information of the track provided by the mp3 tags of the file.