< Prev. |
Next > |
About Azuracast
a)
The "> docker.sh Method" for Intel and AMD Shapes
b)
The "> docker.sh Method" for Ampere ARM-based Shapes
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 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.
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:
Create the directory
Navigate to the new directory
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.
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:
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:
Add the repository to Apt sources:
Note: the sign ‘\’ interrupts the (too long) command line, which continues on the next line underneath.
This single command installs the Docker Engine, the CLI, the container runtime, and the docker-compose-plugin.
Navigate to the new directory
Firstly, be sure you have the curl command installed on your system:
You must
download the docker.sh script from its source:
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):
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.
After downloading the script, you need to grant it executable permissions:
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.
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
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:
Explanation:
sudo: Executes the command with root privileges.usermod: Modifies a user account.-aG: Appends (-a) the user to the specified supplementary group (-G).docker: The name of the group.$USER: An environment
variable that holds your current username (ubuntu in this case).2. Apply the new group membership
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:
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
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.
If your browser cannot connect, force a restart of the Docker containers:
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.
The method is similar to a) except for some parts.
Since the Ampere is ARM architecture, use the official scripts:
or
Navigate to the new directory
Firstly, be sure you have the curl command installed on your system:
You must
download the docker.sh script from its source:
Note:
We are
using sudo tee to avoid the docker.sh: Permission denied message.
After downloading the script, you need to grant it executable permissions:
permission denied errorsAdd your user to the Docker group:
Then apply the new group membership:
Test Docker without sudo:
You should see a list of containers (even an empty one) without a "permission denied" error.
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.
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
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.
If your browser cannot connect, force a restart of the Docker containers:
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).
Next chapter: AzuraCast Installation with SSL on an Ampere A1 shape >