-
Notifications
You must be signed in to change notification settings - Fork 16
Installation
This page describes various methods for installing and deploying a Cadence Radio 5.x
stack.
The recommended way to install Cadence is to use the ./install.sh
script. All regular users are advised to install this way because it simplifies and semi-automates the configuration process. It converts the .example
configuration files and Docker Compose file into live ones, prompts you for necessary variables, and modifies everything accordingly.
You must have Docker and Docker Compose installed.
Simply give execute permissions to the script and run:
chmod +x install.sh
./install.sh
The script will launch an interactive series of prompts that will ask you for configuration data. The Cadence stack will automatically launch after the last prompt is provided.
Description: The absolute path (the full file path starting with a /
) of an accessible directory containing audio files such as .mp3
or .flac
. The target is not recursively searched, so only files at the base of the target will be added, not those in any subdirectory.
Examples: /music/
, /home/ken/Music/
Description: The Cadence stack launches two publicly accessible servers: an Icecast server which broadcasts audio, and a web server which serves the frontend UI. The value you provide here will be set the name of the Icecast server, then injected back into the frontend to connect it back to Icecast. The value you provide here will depend on the audience you intend to broadcast to.
Examples:
- Using
localhost:8000
will set the frontend to always load a stream fromlocalhost:8000
. In other words, you cannot use alocalhost
value if you want to have a radio available beyond the machine it is running on. - Using a home NAT IP like
192.168.0.11:8000
will set the frontend to always load a stream from192.168.0.11:8000
. The radio can be accessible from other devices on the same local network. - Using a public DNS name like
myradio.mydomain.com
will set the frontend to load from that URL. On my demo site, I use the subdomainstream.cadenceradio.com
here.
The Cadence frontend will infer the stream URL protocol (http
, https
) based on how the site is accessed, so if you connect to the UI over http
, it will attempt to load the stream over http
.
Description: Cadence has a simple built-in rate limiter which can prevent single IP addresses from making more than one song request in some time-frame. This is provided to help prevent anyone from requesting something a hundred times, clogging the request queue. The value you provide here is an integer which represents the time in seconds a listener must wait after making a request before they can make another one. You can set this to 0
to disable.
Examples: 180
(3 minutes), 0
(disable rate limiting)
Description: This is a password which will allow your Cadence stream and source services to talk to each other. This can be any non-zero length value. Your input is hidden as you type.
Examples: (anything, as long as the value is not blank)
Description: Cadence ships with an nginx container which automatically sets up a reverse proxy to route external traffic hitting your server to the correct Cadence services. You will first be prompted to disable or enable this feature. If you are not bringing your own domain names (e.g. you are hosting locally or on your local network only) then you should disable this. If you are running a server with your own reverse proxy, you may also want to disable this.
Examples: A reverse proxy will be configured if you respond y
or Y
. A prompt will ask you to provide the domain name you intend to host the web UI on. For my demo site, I provide cadenceradio.com
here.
If you answer anything other than y
or Y
, setup will skip reverse proxy installation.
After you initially run the script, your configuration settings will be saved to local files and you may simply run docker compose up
to start the stack without needing to use the script again. Of course, you may run ./install.sh
at any time again to reconfigure.
If you don't want to use the script or are unable to use it, you can still manually execute the same steps that the script performs using the steps below.
- You must have Docker and Docker Compose installed.
- You must first create a copy of every file in the
config/
directory, removing the.example
extension from each file. - Edit
config/cadence.env
- Change all instances of
CADENCE_PASS_EXAMPLE
to a new password. - Change all instances of
CADENCE_PATH_EXAMPLE
to an absolute path which contains music files (.mp3
,.flac
) for play. The target is not recursively searched. - Change all instances of
CADENCE_RATE_EXAMPLE
to an integer that sets the song request cooldown period in seconds. Set this value to0
to disable rate limiting.
- Change all instances of
- Edit
config/icecast.xml
- Change all instances of
CADENCE_PASS_EXAMPLE
to a new password. - Change
CADENCE_HOST_EXAMPLE
, within<hostname>
, to a URL you expect your audience to connect to. This value is what is set in the UI's stream source. This may be a DNS name or a public or private IP address. You can leave the default valuelocalhost
if your radio is meant to be accessible locally only.
- Change all instances of
- Edit
config/liquidsoap.liq
- Change all instances of
CADENCE_PASS_EXAMPLE
to a new password. - If you changed
CADENCE_PATH_EXAMPLE
in step 2, change any instances of the default value/music/
to match it here.
- Change all instances of
- Edit
docker-compose.yml
- If you changed
CADENCE_PATH_EXAMPLE
in step 2, change any instances of theVolumes
defined, replacing/music:/music
with/YOURDIR:/YOURDIR
.
- If you changed
- (Optional) Edit
config/nginx.conf
- For advanced users deploying Cadence to a server with DNS, Cadence ships with a reverse proxy that can forward requests based on domain-name to backend services. Simply configure the
server_name
values with your domain names. The stream server domain should match the value you set in step 2.
- For advanced users deploying Cadence to a server with DNS, Cadence ships with a reverse proxy that can forward requests based on domain-name to backend services. Simply configure the
- Run
docker compose up
(ordocker compose --profile nginx up
to start the stack with a reverse proxy).