Files
Epicnabbo-Catalogus-Updated…/extra tuts/Create free radio on docker azurecast.md
T
2025-09-21 13:18:46 +02:00

4.6 KiB

Tutorial on How to Run AzuraCast on Docker

This guide will walk you through the process of installing and setting up AzuraCast, a complete web-based radio management solution, using Docker. Using Docker is the recommended method as it bundles all the necessary services (like NGINX, PHP, MySQL, and the streaming software) into isolated containers.


Step 1: Install Docker and Docker Compose

Before you can run AzuraCast, you need to ensure that Docker and Docker Compose are installed on your server. If you are using a Linux system, run the following commands.

  1. Install Docker: Follow the official Docker documentation for your operating system. For Ubuntu, you can use these commands:

    sudo apt-get update
    sudo apt-get install ca-certificates curl gnupg lsb-release
    sudo mkdir -p /etc/apt/keyrings
    curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
    echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
    sudo apt-get update
    sudo apt-get install docker-ce docker-ce-cli containerd.io docker-compose-plugin
    

    Add your user to the docker group to avoid using sudo every time:

    sudo usermod -aG docker $USER
    # Log out and back in or run 'newgrp docker' for the change to take effect
    
  2. Install Docker Compose: Docker Compose is now a plugin for Docker and is installed with the command above.


Step 2: Install AzuraCast

Now that you have the necessary tools, you can set up AzuraCast.

  1. Create a Directory for AzuraCast: Make a dedicated folder for the AzuraCast files. This is where the Docker configuration files and persistent data will be stored.

    mkdir azuracast
    cd azuracast
    
  2. Download the Docker Installation Script: AzuraCast provides a convenient installation script that downloads the necessary Docker Compose files and other configuration files.

    curl -L https://azuracast.com/install.sh | bash
    

    This script will download and place the docker-compose.yml and other relevant files into your current directory.

  3. Configure the .env File (Optional but Recommended): The installation script creates a .env file. You can edit this file to change important settings, such as ports and domain names.

    nano docker-compose.yml
    

    Look for the port settings. By default, this is port 80 and 443 for the web interface. If your server is already using these ports, you can change them here. Change "80:80" to "8080:80" (this will make the web interface accessible via port 8080).

  4. Start AzuraCast with Docker Compose: Run the following command to build and start all the necessary containers. This may take some time depending on your internet connection and server speed.

    docker-compose up -d
    
    • up: Builds and starts the containers.
    • -d: Runs the containers in the background (detached mode).

Step 3: First-Time Setup

  1. Open the Web Interface: Open your browser and navigate to your server's IP address (or domain name). If you changed the port, add it to the address, for example: http://your-server-ip:8080.

  2. Complete the Setup Wizard: The AzuraCast setup page will appear. Follow the steps to create an administrator account. You can also set up your first radio station here. The wizard automatically configures the database and streaming software.


Step 4: Managing Your Radio Station

Congratulations! You now have a working AzuraCast installation. You can manage your radio station through the web interface.

  • Dashboards: View listener statistics, the current playlist, and the status of your streaming services.
  • Upload Files: Go to the "Media" section to upload audio files to your radio station.
  • Playlists and Automation: Set up playlists and schedule when you want to play tracks, or use the "AutoDJ" to mix the music automatically.

Useful Docker Commands:

  • Check container status:
    docker-compose ps
    
  • View logs (useful for debugging):
    docker-compose logs -f
    
  • Stop the containers:
    docker-compose stop
    
  • Completely remove the containers (including data):
    docker-compose down
    

By following these steps, you will have a robust and easy-to-manage AzuraCast installation ready to host your radio station.