Deployment Overview of AzuraCast on Server¶
Prerequisites and Basic Requirements¶
To deploy AzuraCast on your server, ensure the following conditions are met:
-
Operating System: Ubuntu (version compatible with
aptpackage management). -
Privileges: Root access or a user with
sudoprivileges to install system packages and manage system directories. -
Domain Configuration: A valid domain name or subdomain pointing to the server IP address. The deployment uses the
hostkey.inzone. -
Ports: Ensure that necessary ports for Docker networking and the AzuraCast web interface are open on the server firewall.
FQDN of the Final Panel¶
The fully qualified domain name (FQDN) for accessing the AzuraCast panel is constructed using the provided zone and prefix variables.
-
Base Domain:
hostkey.in -
Prefix:
azuracast -
Format:
azuracast<Server ID>.hostkey.in
Note: The specific <Server ID> placeholder represents the unique identifier for the instance and must be substituted with the actual ID assigned during provisioning. The default port configuration follows standard HTTP/HTTPS unless explicitly modified.
File and Directory Structure¶
The application files, installation scripts, and persistent data are organized within a dedicated directory on the host system.
-
Root Directory:
/var/azuracast -
Installation Script:
/var/azuracast/docker.sh -
Data Storage: Docker volumes created by the installation script manage the internal storage for media, databases, and configuration files. These are typically located in
/var/lib/docker/volumesor a custom path defined by the Docker configuration.
Application Installation Process¶
The deployment process utilizes the official AzuraCast installation script to automate the setup of Docker containers and dependencies.
-
Update the system package cache using
apt. -
Create the application directory at
/var/azuracast. -
Download the installation script from the official GitHub repository:
https://raw.githubusercontent.com/AzuraCast/AzuraCast/main/docker.sh -
Place the script in
/var/azuracast/docker.shand set executable permissions. -
Execute the release setup command to switch the script to the stable release branch:
-
Run the installation wizard:
The script automates the download of Docker images, creation of volumes, and initialization of the AzuraCast stack.
Docker Containers and Their Deployment¶
AzuraCast runs as a collection of Docker containers managed by the installation script. The script handles the creation of the Docker network, volume definitions, and container orchestration.
-
The
docker.shscript manages the lifecycle of the application containers. -
Containers are deployed using
docker-composeor directdocker runcommands generated internally by the script. -
The deployment includes services for the web interface, database (MariaDB/PostgreSQL), audio streaming, and caching mechanisms.
-
The script ensures that the
azuracastuser is created and utilized for running services where appropriate.
Proxy Servers and SSL Configuration¶
The AzuraCast installation script configures the web server (Nginx) and SSL certificates as part of the standard installation flow.
-
The script handles the configuration of Nginx as a reverse proxy.
-
SSL/TLS certificates are managed automatically. If a domain is provided during installation, the script attempts to obtain and renew certificates via Let's Encrypt using Certbot.
-
Custom domain configurations are handled through the interactive prompts provided by the
installcommand.
Access Rights and Security¶
Security controls are implemented through file permissions and user management during the setup phase.
-
The installation directory
/var/azuracastis set to mode0755. -
The
docker.shscript is set to mode0755to allow execution. -
Docker containers run in isolated environments with restricted host access.
-
Access to the AzuraCast web interface is restricted to authorized users via the web application's authentication system.
-
The system relies on the host firewall to restrict access to specific ports.
Databases¶
The database component is hosted within a Docker container as part of the AzuraCast stack.
-
The database server is managed internally by the Docker configuration.
-
Data persistence is handled by Docker volumes, ensuring that database files are stored separately from the container image.
-
Connection parameters are configured automatically during the installation process.
Available Ports for Connection¶
The AzuraCast deployment utilizes several ports for various services. While specific port mappings can vary based on the interactive installation choices, the standard configuration includes:
-
Port
80: HTTP traffic for the web interface and Let's Encrypt validation. -
Port
443: HTTPS traffic for secure web access. -
Streaming Ports: Additional ports are opened dynamically for Icecast, Shoutcast, or other streaming protocols required by the configured stations.
-
Docker Management: The Docker daemon is accessible for local management commands.
Starting, Stopping, and Updating¶
Service management is handled through the docker.sh script provided in the installation directory.
-
Start services:
-
Stop services:
-
Restart services:
-
Update to the latest version:
These commands interact with the Docker engine to manage the state of the AzuraCast containers.