Skip to content

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 apt package management).

  • Privileges: Root access or a user with sudo privileges 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.in zone.

  • 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/volumes or 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.

  1. Update the system package cache using apt.

  2. Create the application directory at /var/azuracast.

  3. Download the installation script from the official GitHub repository: https://raw.githubusercontent.com/AzuraCast/AzuraCast/main/docker.sh

  4. Place the script in /var/azuracast/docker.sh and set executable permissions.

  5. Execute the release setup command to switch the script to the stable release branch:

    ./docker.sh setup-release
    

  6. Run the installation wizard:

    ./docker.sh install
    
    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.sh script manages the lifecycle of the application containers.

  • Containers are deployed using docker-compose or direct docker run commands 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 azuracast user 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 install command.

Access Rights and Security

Security controls are implemented through file permissions and user management during the setup phase.

  • The installation directory /var/azuracast is set to mode 0755.

  • The docker.sh script is set to mode 0755 to 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:

    /var/azuracast/docker.sh start
    

  • Stop services:

    /var/azuracast/docker.sh stop
    

  • Restart services:

    /var/azuracast/docker.sh restart
    

  • Update to the latest version:

    /var/azuracast/docker.sh update
    

These commands interact with the Docker engine to manage the state of the AzuraCast containers.

question_mark
Is there anything I can help you with?
question_mark
AI Assistant ×