< Prev.

< <  Free Radio index page

Next >

AzuraCast Installation

About Azuracast  icon  a) The "> docker.sh Method" for Intel and AMD Shapes  icon  b) The "> docker.sh Method" for Ampere ARM-based Shapes

About Azuracast

In my research, I found AzuraCast to be the most reliable free radio broadcast software, as I’ve started this project as a hobby. I am only using the AutoDJ that runs some music or other audio files non-stop.

AzuraCast is a complex application that includes an Nginx web server, a database (MariaDB), a media player, and multiple PHP and Docker processes.

 

The Docker Installation

The AzuraCast installation process is built around Docker, which is a platform for running applications in isolated environments called containers. The AzuraCast script handles all the complexities of setting up the various services (web server, database, streaming server, etc.) that your radio station needs. Before the script can do its job, the host machine (your Oracle VM) must have Docker installed and running.

 

The AzuraCast Script

Once Docker is installed, you will execute the AzuraCast installation script. This two-step process is the recommended and most straightforward way to get a functional AzuraCast instance running on your VM.

The official AzuraCast documentation explicitly recommends using /var/azuracast for the installation.

The installation script is designed to be run from any directory, and it will handle placing the files in the correct location. The simplest method is to first create the directory and then change to it before running the installer.

Update your system:

sudo apt update
sudo apt upgrade –y

Create the directory

sudo mkdir -p /var/azuracast

 Navigate to the new directory

cd /var/azuracast

Now, there are two methods to install AzuraCast: the > docker.sh method and the | bash method. The first one is relying on Docker's official documentation, and the second one is relying on the Azuracast official documentation.

up icon

a) The "> docker.sh Method" for Intel and AMD Shapes

A robust and recommended way to install Docker and its plugins is to use Docker's official repository. Installing from the official repository ensures you get the latest, most stable, and most secure versions.

Here is the recommended step-by-step process:

Step 1: Set Up the Repository

This step adds Docker's official repository and GPG key to your system, which allows you to install from their servers. It can be used only for INTEL and AMD shapes; the Ampere ARM-based shapes must download another script - see method b) below.

Add Docker's official GPG key:

sudo apt update
sudo apt install ca-certificates curl
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc

Add the repository to Apt sources:

echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \
$(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt update

Note: the sign ‘\’ interrupts the (too long) command line, which continues on the next line underneath.

 

Step 2: Install Docker Packages

This single command installs the Docker Engine, the CLI, the container runtime, and the docker-compose-plugin.

sudo apt install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin

 

Step 3: Install AzuraCast

Navigate to the new directory

cd /var/azuracast

1. Download the AzuraCast Script

Firstly, be sure you have the curl command installed on your system:

sudo apt install curl

You must download the docker.sh script from its source:

curl -fsSL https://raw.githubusercontent.com/AzuraCast/AzuraCast/main/docker.sh > docker.sh

Explanation:

•  curl -fsSL https://raw.githubusercontent.com/AzuraCast/AzuraCast/main/docker.sh

downloads the script. The -f flag makes curl fail silently on HTTP errors, and the -s and -S flags hide progress but still show an error if the download fails.

> docker.sh

redirects the output of the curl command into a local file named docker.sh.

If you get a message like -bash: docker.sh: Permission denied

run this command to get the permission for the local user (ubuntu):

sudo chown -R ubuntu:ubuntu /var/azuracast

Explanation:

The /var directory is typically owned by the root user and is not writable by standard users. So, when the curl command tries to write the docker.sh file in the /var/azuracast directory is denied access because your current user (ubuntu) doesn't have the necessary permissions.

By running sudo chown -R ubuntu:ubuntu /var/azuracast, you change the ownership of the /var/azuracast directory and all its contents to your ubuntu user, granting you the necessary write permissions to complete the installation. This step is mandatory for either the docker.sh method or the | bash method to succeed.

 

2. Make the Script Executable

After downloading the script, you need to grant it executable permissions:

chmod a+x docker.sh

 

3. Run the Installer

Finally, you can run the script to install AzuraCast itself. This script will then download the necessary docker-compose.yml and other files and start the AzuraCast containers.

./docker.sh install

The docker.sh script is an installer provided by AzuraCast, not a core component of Docker itself. (Maybe, it should have been called azuracast-install.sh, to be clearer what it does!) It is the crucial link that ties your freshly installed Docker environment to the specific application you want to run (Azuracast). This command runs the docker.sh, which is located in the current directory ./ where we navigated to (explicitly: /var/azuracast).

If you get the error message

permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock

it means that your current user, ubuntu, does not have the necessary permissions to communicate with the Docker service (the Docker Daemon). The solution is:

1. Add the current user to the Docker group:

sudo usermod -aG docker $USER

Explanation:

2. Apply the new group membership

newgrp docker

That command simply starts a new shell session. Alternatively, you can just close your current SSH connection and start a new one.

Once you have added the user and refreshed your session (by logging out/in or using newgrp docker), try running the AzuraCast installer again:

./docker.sh install

The script should now be able to communicate with the Docker Daemon, and the installation should proceed successfully.

NOTE: At certain points during the installation process, you may be asked to re-run the installation (./docker.sh install) or even reboot the system (sudo reboot).

After the system reboot, you must SSH back to your server. Then change directory cd /var/azuracast before re-running the ./docker.sh install command.

*

During AzuraCast installation, every time you are asked whether you choose the 'Stable' or the 'Rolling release', choose Stable. When asked, respond with Yes or No accordingly. For example:

Switch to Stable release? Y

Or

Switch to Rolling release? N

(Pressing the Enter key will confirm the [default option].)

*

When you reach the Azuracast Installer, you will be asked a few questions. Press the Enter key repeatedly to allow the [default answer].

*

In the end, you must get this message:

[OK] AzuraCast installation complete!

✓ Container azuracast_updater Started

✓ Container azuracast             Started

 

Step 4: Access the AzuraCast webpage

After the setup is complete, go to your browser and type your IP in the address bar, for example, 158.101.212.51  That should open the Azuracast First-Time Setup webpage.

Troubleshooting

If your browser cannot connect, force a restart of the Docker containers:

cd /var/azuracast
sudo docker compose down
sudo docker compose up -d

Now the service should be accessible. Still, you may have to clear the cache of your browser before it can render the AzuraCast webpage.

NOTE: I personally successfully used this a) method with INTEL and AMD shapes.

up icon

b) The "> docker.sh Method" for Ampere ARM-based Shapes

The method is similar to a) except for some parts.

Step 1: Install Docker and Docker Compose:

Since the Ampere is ARM architecture, use the official scripts:

curl -fsSL https://get.docker.com | sudo sh

or

curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh

 

Step 2: Install Docker Compose CLI

sudo apt install docker-compose-plugin -y

 

Step 3: Install AzuraCast on the Ampere ARM-based VM

Navigate to the new directory

cd /var/azuracast

1. Download the AzuraCast Script

Firstly, be sure you have the curl command installed on your system:

sudo apt install curl

You must download the docker.sh script from its source:

sudo curl -fsSL https://raw.githubusercontent.com/AzuraCast/AzuraCast/main/docker.sh | sudo tee docker.sh > /dev/null

Note: We are using sudo tee to avoid the docker.sh: Permission denied message.

 

2. Make the Script Executable

After downloading the script, you need to grant it executable permissions:

chmod a+x docker.sh

 

3. Avoid other permission denied errors

Add your user to the Docker group:

sudo usermod -aG docker $USER

Then apply the new group membership:

newgrp docker

Test Docker without sudo:

docker ps

You should see a list of containers (even an empty one) without a "permission denied" error.

 

4. Run the Installer

Finally, you can run the script to install AzuraCast itself. This script will then download the necessary docker-compose.yml and other files and start the AzuraCast containers.

./docker.sh install

The docker.sh script is an installer provided by AzuraCast, not a core component of Docker itself. The script should be able to communicate with the Docker Daemon, and the installation should proceed successfully.

NOTE: At certain points during the installation process, you may be asked to re-run the installation file (./docker.sh install).

*

During AzuraCast installation, every time you are asked whether you choose the 'Stable' or the 'Rolling release', choose Stable. When asked, respond with Yes or No accordingly. For example:

Switch to Stable release? Y

Or

Switch to Rolling release? N

(Pressing the Enter key will confirm the [default option].)

*

When you reach the Azuracast Installer, you will be asked a few questions. Press the Enter key repeatedly to allow the [default answer].

*

In the end, you must get this message:

[OK] AzuraCast installation complete!

✓ Container azuracast_updater Started

✓ Container azuracast             Started

 

Step 4: Access the AzuraCast webpage

After the setup is complete, go to your browser and type your IP in the address bar, for example, 158.101.212.51  That should open the Azuracast First-Time Setup http:// webpage.

Troubleshooting

If your browser cannot connect, force a restart of the Docker containers:

cd /var/azuracast
sudo docker compose down
sudo docker compose up -d

Now the service should be accessible. Still, you may have to clear the cache of your browser before it can render the AzuraCast webpage.

After all these steps, you should be able to enter the AzuraCast GUI.

*

If, for any reason, you cannot reach that IP or some other issues appear during the installation process, you should consider troubleshooting or reinstalling.

The most reliable method for a beginner is a clean installation. First, terminate your VM plus delete the boot volume, then create a new one. You will start everything from scratch, following the exact steps and avoiding typos.

But you may also be interested in troubleshooting, with a lot of help from an AI chatbox (for example, Gemini.google.com).

up icon

Next chapter: AzuraCast Installation with SSL on an Ampere A1 shape >