JCast is a self hosted internet radio service. It is an alternative backend for vTuner services, and it is written in Java with Spring Boot.
The project was being heavily inspired by https://github.com/milaq/YCast.
- Radio Browser support (basic functionally works)
- Favorites file support with auto-reload - a YAML file with a manually entered stations
- Yamaha HTR-4066
Running with Docker
The Docker exports a Volume where it will try to load favorites stations file.
The Volume name is /favorites and you should mount it if you want to have your stations YAML file read.
SERVER_PORT- the port on which the service will run inside the container (default:80)FAVORITES_FILE- the file with the favorites stations (default:/favorites/stations.yml) If you want different file name you should set it like:/favorites/<YOUR_FILE_NAME>
docker pull mapuo/jcast:latest
docker run -p 8090:80 -v ~/.local/jcast/:/favorites:ro mapuo/jcastSkip to setting up Nginx and PiHole
I've tested this on Debian/Ubuntu server, may apply to other distributions.
Don't forget sudo if your are not logged as root.
-
Create a directory for the application
mkdir /opt/jcast
-
Set directory permissions
chown jcast:jcast /opt/jcast
- I'm assuming user and group
jcast- if other change it in thejcast@.serviceas well.
- I'm assuming user and group
-
Add the
systemdunitcd /etc/systemd/system ln -s /opt/jcast/jcast@.service jcast@.service -
Enable the
systemdservice8090is the port on which the service will run - choose another if you wishsystemctl enable jcast@8090.service systemctl daemon-reload -
Setup
rsyslogconfigurationcd /etc/rsyslog.d/ ln -s /opt/jcast/rsyslog.conf 10-jcast.conf systemctl restart rsyslog.service -
Setup
logrotatecd /etc/logrotate.d ln -s /opt/jcast/jcast.logrotate jcast
-
Download the executable jar or build it yourself and put it in
/opt/jcastwith the name:jcast.jar -
Add
application.propertiesfile in/opt/jcastwith one parameterfavorites.file=with the location and name of the favorites station YAML file.
To start the service
systemctl start jcast@8090.serviceTo stop the service
systemctl stop jcast@8090.servicecd /etc/nginx/sites-enabled
ln -s /opt/jcast/nginx-jcast.conf
nginx -t
systemctl reload nginx.serviceOn the PiHole machine as root execute
echo "address=/radioyamaha.vtuner.com/radioyamaha2.vtuner.com/<NGINX_IP_ADDRESS>" > /etc/dnsmasq.d/05-vtuner.conf...or for all vtuner to be redirected:
echo "address=/.vtuner.com/<NGINX_IP_ADDRESS>" > /etc/dnsmasq.d/05-vtuner.conf...and then restart the DNS service:
pihole restartdns