Skip to content

Deploying AzuraCast

Introduction

AzuraCast is a powerful, free, and open-source self-hosted web radio management suite that makes it easy to broadcast your own internet radio station. Built with modern web technologies, AzuraCast provides a complete solution for managing radio stations, uploading and organizing media, creating playlists, managing DJ accounts, and broadcasting to listeners worldwide. With its intuitive web interface, automated DJ capabilities, and support for multiple streaming formats, AzuraCast is perfect for podcasters, community radio stations, hobbyists, and professional broadcasters alike.

Deploying AzuraCast on Klutch.sh provides a production-ready, scalable infrastructure for your web radio platform with automated Docker deployments, persistent storage for media libraries and station data, secure environment variable management, and reliable streaming capabilities. Whether you’re launching a music streaming service, podcast network, community radio station, or multi-station broadcasting platform, Klutch.sh simplifies the deployment process and ensures your AzuraCast instance delivers high-quality audio to your listeners 24/7.

This comprehensive guide walks you through deploying AzuraCast on Klutch.sh using a Dockerfile, configuring database connections, setting up persistent volumes for media storage, managing environment variables for security, configuring streaming settings, and implementing production best practices for reliable radio broadcasting.


Prerequisites

Before you begin deploying AzuraCast on Klutch.sh, ensure you have:

  • A Klutch.sh account (sign up here)
  • A GitHub repository for your AzuraCast deployment configuration
  • Basic understanding of Docker containers and environment variables
  • (Recommended) A MariaDB or MySQL database instance for production use
  • Access to the Klutch.sh dashboard
  • Media files (music, podcasts, jingles) for your radio station

Understanding AzuraCast Architecture

AzuraCast consists of several key components working together to provide a complete radio broadcasting solution:

  • Web Interface: PHP-based application for station management, media library, and administration
  • Icecast/SHOUTcast: Streaming servers for broadcasting audio to listeners
  • Liquidsoap: Audio automation and playlist management system
  • Database: MariaDB or MySQL for storing station configurations, media metadata, and listener statistics
  • Redis: Caching layer for improved performance
  • Storage: Persistent volumes for media files, station backups, and configuration data

When deployed on Klutch.sh, AzuraCast automatically detects your Dockerfile in the root directory and builds a container image that includes all necessary components. The platform manages traffic routing and provides persistent storage options for your media library and application data.


Project Structure

A minimal repository structure for deploying AzuraCast on Klutch.sh:

azuracast-deployment/
├── Dockerfile
├── .dockerignore
├── .gitignore
├── azuracast.env.example
└── README.md

This structure allows Klutch.sh to automatically detect and build your AzuraCast container. The official AzuraCast Docker image comes pre-packaged with all required software components.


Creating Your Dockerfile

Klutch.sh automatically detects a Dockerfile in the root directory of your repository. Create a Dockerfile that uses the official AzuraCast image:

FROM ghcr.io/azuracast/azuracast:latest
# Set working directory
WORKDIR /var/azuracast/www
# Expose HTTP port for the web interface
EXPOSE 80
# Expose streaming ports
EXPOSE 8000 8005 8006 8010 8015 8016 8020 8025 8026 8030 8035 8036 8040 8045 8046
# Health check to ensure the application is running
HEALTHCHECK --interval=30s --timeout=10s --start-period=60s --retries=3 \
CMD curl -f http://localhost/api/status || exit 1
# Use the default entrypoint from the base image
CMD ["/usr/local/bin/my_init"]

Alternative: Specific Version Dockerfile

For production stability, pin to a specific AzuraCast version:

FROM ghcr.io/azuracast/azuracast:0.20.3
WORKDIR /var/azuracast/www
EXPOSE 80
EXPOSE 8000 8005 8006 8010 8015 8016 8020 8025 8026 8030 8035 8036 8040 8045 8046
HEALTHCHECK --interval=30s --timeout=10s --start-period=60s --retries=3 \
CMD curl -f http://localhost/api/status || exit 1
CMD ["/usr/local/bin/my_init"]

Persistent Storage Configuration

AzuraCast requires persistent storage for several critical directories to ensure media files, station configurations, and backups survive container restarts and redeployments.

Required Persistent Volumes

  1. Media Storage Volume

    • Mount Path: /var/azuracast/stations
    • Size: 20GB minimum (adjust based on your media library size)
    • Purpose: Stores all uploaded media files, playlists, and station-specific data
  2. Database Storage Volume

    • Mount Path: /var/azuracast/db
    • Size: 5GB minimum
    • Purpose: Stores MariaDB database files with station configurations and metadata
  3. Backup Storage Volume (Optional but Recommended)

    • Mount Path: /var/azuracast/backups
    • Size: 10GB minimum
    • Purpose: Stores automated backups of your stations and database

Setting Up Volumes in Klutch.sh

  1. Navigate to the Klutch.sh dashboard
  2. Open your AzuraCast app settings
  3. Scroll to the “Persistent Volumes” section
  4. Add the media storage volume:
    • Mount Path: /var/azuracast/stations
    • Size: Enter your desired size (e.g., 20GB)
  5. Add the database storage volume:
    • Mount Path: /var/azuracast/db
    • Size: Enter your desired size (e.g., 5GB)
  6. (Optional) Add the backup storage volume:
    • Mount Path: /var/azuracast/backups
    • Size: Enter your desired size (e.g., 10GB)
  7. Save your volume configurations

Environment Variables Configuration

AzuraCast can be configured using environment variables for security and flexibility. Set these in your Klutch.sh app settings:

Essential Environment Variables

Terminal window
# Application Settings
AZURACAST_BASE_URL=https://example-app.klutch.sh
ENABLE_ADVANCED_FEATURES=true
# Database Configuration (if using external database)
MYSQL_HOST=your-database-host
MYSQL_PORT=3306
MYSQL_USER=azuracast
MYSQL_PASSWORD=your-secure-password
MYSQL_DATABASE=azuracast
MYSQL_RANDOM_ROOT_PASSWORD=yes
# Redis Configuration
REDIS_HOST=localhost
REDIS_PORT=6379
# Application Security
APP_ENV=production
COMPOSER_PLUGIN_MODE=false
# PHP Configuration
PHP_MAX_EXECUTION_TIME=300
PHP_MEMORY_LIMIT=256M
PHP_UPLOAD_MAX_FILESIZE=100M
PHP_POST_MAX_SIZE=100M
# Streaming Configuration
AUTO_ASSIGN_PORT_MIN=8000
AUTO_ASSIGN_PORT_MAX=8499

Optional Environment Variables

Terminal window
# HTTPS/SSL Configuration
LETSENCRYPT_HOST=radio.yourdomain.com
LETSENCRYPT_EMAIL=admin@yourdomain.com
# Analytics and Monitoring
ENABLE_REDIS=true
ENABLE_ADVANCED_FEATURES=true
# Performance Tuning
NGINX_WORKER_PROCESSES=auto
NGINX_WORKER_CONNECTIONS=1024
# Backup Configuration
BACKUP_ENABLED=true
BACKUP_SCHEDULE="0 3 * * *"
BACKUP_RETENTION_DAYS=14

Network Configuration

AzuraCast requires specific port configurations for the web interface and streaming:

Port Configuration in Klutch.sh

  1. Primary HTTP Port: Set to 80 for the web interface
  2. Internal Port: Specify 80 as the internal port that traffic is routed to the container
  3. Traffic Type: Select HTTP traffic in the Klutch.sh dashboard
  4. Streaming Ports: AzuraCast uses ports 8000-8499 for radio streams (these are configured internally)

For streaming, listeners will connect through your Klutch.sh app URL (e.g., https://example-app.klutch.sh/radio/8000/radio.mp3). The streaming URLs are generated automatically by AzuraCast and are accessible through the web interface.


Deploying to Klutch.sh

Follow these steps to deploy AzuraCast on Klutch.sh:

  1. Prepare Your Repository

    • Create a new GitHub repository for your AzuraCast deployment
    • Add the Dockerfile from the example above to the root directory
    • Commit and push your changes to GitHub
  2. Create a New App on Klutch.sh

    • Log in to the Klutch.sh dashboard
    • Click “Create New App” or “New Project”
    • Connect your GitHub repository
    • Select the repository containing your AzuraCast Dockerfile
  3. Configure Build Settings

    • Klutch.sh will automatically detect the Dockerfile in your repository root
    • The build context is automatically set to the repository root
    • No additional build configuration is required
  4. Configure Network Settings

    • Set the internal port to 80
    • Select HTTP as the traffic type
    • Klutch.sh will automatically assign an external URL
  5. Attach Persistent Volumes

    • Add a volume with mount path: /var/azuracast/stations (minimum 20GB)
    • Add a volume with mount path: /var/azuracast/db (minimum 5GB)
    • Optionally add a volume with mount path: /var/azuracast/backups (minimum 10GB)
  6. Set Environment Variables

    • Add the essential environment variables listed in the Environment Variables section
    • Set AZURACAST_BASE_URL to your Klutch.sh app URL (e.g., https://example-app.klutch.sh)
    • Configure database credentials if using an external database
    • Mark sensitive values (passwords, API keys) as secret
  7. Deploy the Application

    • Click “Create” or “Deploy” to start the deployment
    • Klutch.sh will build your Docker image and start the container
    • Wait for the build and deployment to complete (typically 3-5 minutes)
  8. Initial Setup

    • Once deployed, visit your app URL (e.g., https://example-app.klutch.sh)
    • Complete the AzuraCast installation wizard
    • Create your administrator account
    • Set up your first radio station

Initial Setup and Configuration

After your AzuraCast instance is deployed and running, complete the initial setup:

First-Time Setup Wizard

  1. Access the Web Interface

    • Navigate to your Klutch.sh app URL (e.g., https://example-app.klutch.sh)
    • You’ll be greeted with the AzuraCast setup wizard
  2. Create Administrator Account

    • Enter your email address
    • Choose a strong password
    • Confirm your password
    • Click “Create Account”
  3. Configure Your First Station

    • Station Name: Enter a name for your radio station
    • Station Description: Add a brief description
    • Select a frontend (Icecast is recommended for beginners)
    • Choose streaming bitrates and formats
    • Click “Create Station”
  4. Upload Media Files

    • Navigate to “Music” in the sidebar
    • Click “Upload” to add your audio files
    • Supported formats: MP3, OGG, FLAC, AAC, and more
    • Wait for files to be processed
  5. Create a Playlist

    • Go to “Playlists” in the sidebar
    • Click “Add Playlist”
    • Choose “Standard Playlist” for general rotation
    • Add your uploaded media to the playlist
    • Set scheduling options (play always, specific times, etc.)
  6. Start Broadcasting

    • Go to “Profile” in the sidebar
    • Click “Start/Restart Broadcasting”
    • Your station is now live!
    • Copy the stream URLs to share with listeners

Customizing Build and Start Commands with Nixpacks

While AzuraCast uses a Dockerfile for deployment on Klutch.sh, you may need to customize certain aspects. Klutch.sh uses Nixpacks for building applications. If you need to override the default start command or customize the build process, you can use Nixpacks environment variables:

Build-Time Environment Variables

Terminal window
# Override the build command
NIXPACKS_BUILD_CMD=custom-build-script.sh
# Install additional packages
NIXPACKS_PKGS=ffmpeg imagemagick curl

Runtime Environment Variables

Terminal window
# Override the start command
NIXPACKS_START_CMD=/usr/local/bin/my_init
# Set PHP memory limit
NIXPACKS_PHP_MEMORY_LIMIT=512M

These can be set in the Klutch.sh dashboard under your app’s environment variables section.


Database Configuration

AzuraCast can use either the built-in MariaDB instance (included in the Docker image) or an external database for enhanced reliability.

Option 1: Using Built-In Database (Default)

The AzuraCast Docker image includes a MariaDB instance that runs inside the container. This is suitable for small to medium deployments:

  • No additional configuration required
  • Database files stored in /var/azuracast/db (ensure this is mounted to a persistent volume)
  • Automatic setup and configuration

For production deployments, use an external MariaDB or MySQL database:

  1. Provision a Database

    • Deploy a MariaDB instance on Klutch.sh or use a managed database service
    • Create a database named azuracast
    • Create a user with full privileges on the azuracast database
  2. Configure Environment Variables

    • Set MYSQL_HOST to your database host
    • Set MYSQL_PORT to 3306 (or your database port)
    • Set MYSQL_USER to your database username
    • Set MYSQL_PASSWORD to your database password
    • Set MYSQL_DATABASE to azuracast
  3. Deploy AzuraCast

    • AzuraCast will automatically detect the external database
    • On first startup, it will create the necessary tables
    • The built-in MariaDB will be disabled automatically

Streaming Configuration

AzuraCast supports multiple streaming servers and formats to reach different audiences and platforms.

Icecast is the default and most compatible streaming server:

  • Mount Points: Configure multiple mount points for different bitrates
  • Formats: MP3, OGG Vorbis, Opus
  • Compatibility: Works with most media players and mobile apps
  • URLs: Access streams at https://example-app.klutch.sh/radio/8000/radio.mp3

SHOUTcast Configuration (Alternative)

SHOUTcast is an alternative streaming server with slightly different features:

  • Legacy Support: Better compatibility with older players
  • SC_TRANS: Direct DJ broadcasting support
  • Formats: Primarily MP3
  • URLs: Access streams at https://example-app.klutch.sh/radio/8000

Configuring Multiple Streams

  1. Navigate to your station’s “Profile” page
  2. Click “Edit” next to “Broadcasting”
  3. Enable multiple mount points for different bitrates:
    • Low Quality: 64kbps (for mobile users with limited bandwidth)
    • Medium Quality: 128kbps (balanced quality and bandwidth)
    • High Quality: 320kbps (for audiophiles)
  4. Set appropriate formats (MP3, OGG, etc.)
  5. Save your configuration
  6. Restart broadcasting to apply changes

Managing DJ Accounts

AzuraCast allows you to create DJ accounts for live broadcasting:

  1. Create a DJ Account

    • Go to “Users” in the admin panel
    • Click “Add User”
    • Enter the DJ’s email and name
    • Select “DJ” as the role
    • Assign the DJ to specific stations
  2. Configure DJ Connection Settings

    • Navigate to the station’s “Profile” page
    • Find the “DJ/Streamer Connection” section
    • Note the connection details (server, port, mount point, password)
    • Share these credentials with your DJ
  3. Connect with Broadcasting Software

    • DJs can use software like BUTT, Mixxx, or Traktor
    • Configure the software with the connection details
    • When the DJ goes live, their stream will override the AutoDJ
  4. Schedule DJ Shows

    • Create a “Scheduled Playlist” type
    • Set specific times for DJ shows
    • The AutoDJ will resume when the show ends

Media Management Best Practices

Organize and manage your media library efficiently:

File Organization

  • Use folders: Organize media by genre, artist, or show
  • Consistent naming: Use clear, consistent file names
  • Metadata: Ensure all files have proper ID3 tags (title, artist, album)
  • Artwork: Add album artwork for better visual presentation

Storage Optimization

  • Bitrate standards: Use 128kbps or 192kbps for most content
  • Format selection: MP3 is most compatible; FLAC for archival quality
  • Regular cleanup: Remove unused or duplicate files
  • Monitor usage: Check storage usage in the dashboard

Playlist Strategies

  • General Rotation: Main playlist that plays most of the time
  • Time-based: Playlists for specific times (morning drive, evening chill)
  • Jingles: Station IDs and advertisements on a schedule
  • Special Shows: Themed playlists for specific programs

Backups and Data Protection

Protect your station data, media library, and configurations:

Automated Backups

AzuraCast includes built-in backup functionality:

  1. Navigate to “System Administration” → “Backups”
  2. Enable automatic backups
  3. Set a backup schedule (daily recommended)
  4. Choose backup retention period (14-30 days recommended)
  5. Backups are stored in /var/azuracast/backups

Manual Backups

Create manual backups before major changes:

  1. Go to “System Administration” → “Backups”
  2. Click “Run Manual Backup”
  3. Wait for the backup to complete
  4. Download the backup file to your local system

Restoring from Backup

To restore from a backup:

  1. Go to “System Administration” → “Backups”
  2. Upload your backup file or select from existing backups
  3. Click “Restore”
  4. Wait for the restoration process to complete
  5. Broadcasting will restart automatically

Monitoring and Analytics

Track your station’s performance and listener statistics:

Built-In Analytics

AzuraCast provides comprehensive analytics:

  • Current Listeners: Real-time listener count
  • Historical Data: Listener trends over time
  • Geographic Distribution: Where your listeners are located
  • Popular Content: Most-played songs and shows
  • Peak Times: When you have the most listeners

Accessing Statistics

  1. Navigate to your station’s dashboard
  2. View the “Listeners” graph for real-time data
  3. Click “Reports” for detailed analytics
  4. Export data for external analysis if needed

Performance Monitoring

Monitor your Klutch.sh app’s resource usage:

  • Check CPU and memory usage in the Klutch.sh dashboard
  • Monitor storage usage for your media volumes
  • Set up alerts for high resource utilization
  • Scale resources if needed for peak traffic

Custom Domain Configuration

Connect your own domain to your AzuraCast instance:

  1. Configure DNS

    • Create an A or CNAME record pointing to your Klutch.sh app
    • For example: radio.yourdomain.comexample-app.klutch.sh
    • Wait for DNS propagation (can take up to 48 hours)
  2. Add Domain in Klutch.sh

    • Go to your app settings in the Klutch.sh dashboard
    • Navigate to “Custom Domains”
    • Add your domain (e.g., radio.yourdomain.com)
    • Klutch.sh will automatically provision an SSL certificate
  3. Update AzuraCast Configuration

    • Update the AZURACAST_BASE_URL environment variable
    • Set it to https://radio.yourdomain.com
    • Restart your application for changes to take effect
  4. Verify Configuration

    • Visit your custom domain
    • Ensure HTTPS is working (look for the padlock icon)
    • Test streaming URLs with your custom domain

For more details, see the Custom Domains documentation.


Troubleshooting Common Issues

Issue: Web Interface Not Loading

Symptoms: Blank page or connection refused error

Solutions:

  1. Check that the app is running in the Klutch.sh dashboard
  2. Verify the internal port is set to 80
  3. Check application logs for errors
  4. Ensure persistent volumes are properly mounted
  5. Restart the application

Issue: Streaming Not Working

Symptoms: Cannot connect to stream, no audio playback

Solutions:

  1. Verify broadcasting is started in the station profile
  2. Check that media files are uploaded and in a playlist
  3. Ensure the playlist is enabled and scheduled
  4. Test the stream URL directly in a media player (VLC, Winamp)
  5. Check firewall rules if using custom streaming ports

Issue: High Memory Usage

Symptoms: App crashes or becomes unresponsive

Solutions:

  1. Check the number of simultaneous listeners
  2. Reduce streaming bitrates if necessary
  3. Optimize PHP memory settings via environment variables
  4. Scale your Klutch.sh app to a larger instance size
  5. Consider using an external database to reduce memory pressure

Issue: Database Connection Errors

Symptoms: “Cannot connect to database” errors

Solutions:

  1. Verify database environment variables are correct
  2. Check that the database volume is properly mounted at /var/azuracast/db
  3. Ensure sufficient storage space is available
  4. Restart the application to reinitialize database connections
  5. Check database logs for specific error messages

Issue: Media Upload Failures

Symptoms: Files fail to upload or process

Solutions:

  1. Check available storage space on the media volume
  2. Verify PHP_UPLOAD_MAX_FILESIZE is set appropriately (100M or higher)
  3. Ensure file formats are supported (MP3, OGG, FLAC, AAC)
  4. Check file permissions on /var/azuracast/stations
  5. Try uploading smaller files or fewer files at once

Security Best Practices

Protect your AzuraCast instance and listener data:

Access Control

  • Strong passwords: Use complex passwords for all accounts
  • 2FA: Enable two-factor authentication for administrator accounts
  • Role-based access: Assign appropriate roles (Admin, DJ, User)
  • Regular audits: Review user accounts and remove inactive ones

Network Security

  • HTTPS only: Always use HTTPS for the web interface
  • Secure streaming: Use encrypted stream connections when possible
  • Firewall rules: Restrict access to administrative ports
  • Regular updates: Keep AzuraCast updated to the latest version

Data Protection

  • Environment variables: Store sensitive data as secrets in Klutch.sh
  • Backup encryption: Encrypt backup files before external storage
  • Database security: Use strong database passwords
  • API access: Limit API key permissions to only what’s needed

Update Management

  1. Monitor AzuraCast release notes for updates
  2. Test updates in a staging environment first
  3. Backup your data before major updates
  4. Update your Dockerfile to the new version tag
  5. Redeploy through Klutch.sh
  6. Verify functionality after updates

Performance Optimization

Optimize your AzuraCast deployment for better performance:

Server Configuration

  • PHP settings: Increase memory limit and execution time for large libraries
  • Redis caching: Enable Redis for improved response times
  • Database optimization: Regular maintenance and indexing
  • Static asset caching: Enable browser caching for faster load times

Streaming Optimization

  • Bitrate selection: Balance quality with bandwidth costs
  • Multiple bitrates: Offer options for different connection speeds
  • Format optimization: Use OGG Opus for better quality at lower bitrates
  • Connection limits: Set appropriate listener limits per stream

Storage Management

  • Regular cleanup: Remove old logs and unused media
  • Compression: Use compressed formats where appropriate
  • Archive management: Move old content to cheaper storage
  • Monitor growth: Track storage usage trends

Scaling Your Radio Station

As your audience grows, scale your AzuraCast deployment:

Vertical Scaling

Upgrade your Klutch.sh app to a larger instance:

  • Increase CPU cores for more concurrent processing
  • Add more RAM for larger media libraries
  • Expand storage volumes as your media library grows

Content Delivery

Improve streaming performance for global audiences:

  • Use multiple streaming mount points for redundancy
  • Consider a CDN for high-traffic stations
  • Optimize bitrates for target audiences
  • Enable adaptive bitrate streaming

Load Distribution

For very high traffic:

  • Deploy multiple AzuraCast instances
  • Use a load balancer to distribute listeners
  • Separate media storage to shared/network storage
  • Use external database clusters for high availability

Advanced Features

API Integration

AzuraCast provides a comprehensive REST API:

  • Documentation: Available at https://example-app.klutch.sh/api
  • Authentication: API keys for secure access
  • Use cases: Mobile apps, custom integrations, automation
  • Endpoints: Station control, media management, listener stats

Webhooks

Set up webhooks for real-time notifications:

  1. Navigate to “System Administration” → “Web Hooks”
  2. Click “Add Web Hook”
  3. Choose trigger events (song changes, listener milestones)
  4. Enter your webhook URL
  5. Test the webhook to ensure it works
  6. Enable the webhook

Liquidsoap Customization

Advanced users can customize the Liquidsoap configuration:

  • Custom audio processing
  • Advanced playlist logic
  • Sound effects and transitions
  • External input sources

Local Development with Docker Compose

For local testing and development, you can use Docker Compose. Note that Klutch.sh does not support Docker Compose for deployment, but it’s useful for local development:

version: '3.8'
services:
azuracast:
image: ghcr.io/azuracast/azuracast:latest
ports:
- "80:80"
- "8000:8000"
- "8005:8005"
volumes:
- ./azuracast_db:/var/azuracast/db
- ./azuracast_stations:/var/azuracast/stations
- ./azuracast_backups:/var/azuracast/backups
environment:
- AZURACAST_BASE_URL=http://localhost
- ENABLE_ADVANCED_FEATURES=true
- AUTO_ASSIGN_PORT_MIN=8000
- AUTO_ASSIGN_PORT_MAX=8499
restart: unless-stopped
volumes:
azuracast_db:
azuracast_stations:
azuracast_backups:

Run locally with: docker-compose up -d


Migration from Other Hosting

If you’re migrating an existing AzuraCast installation to Klutch.sh:

  1. Create a Backup

    • Generate a full backup from your existing installation
    • Download the backup file
  2. Deploy Fresh Instance

    • Deploy a new AzuraCast instance on Klutch.sh following this guide
    • Complete initial setup
  3. Upload Backup

    • Navigate to “System Administration” → “Backups”
    • Upload your backup file
    • Restore from the backup
  4. Update Configuration

    • Update AZURACAST_BASE_URL to your new Klutch.sh URL
    • Verify stream URLs and update any external references
    • Test all functionality
  5. DNS Cutover

    • Update DNS to point to your new Klutch.sh deployment
    • Monitor for any issues
    • Keep old instance running briefly for rollback if needed

Getting Help and Support

Community Resources

Klutch.sh Resources

Debugging Tips

Enable debug mode for troubleshooting:

Terminal window
# Set in environment variables
APP_ENV=development
LOG_LEVEL=debug

Access logs through the Klutch.sh dashboard to diagnose issues.


Sample Configuration Files

Example .dockerignore

.git
.gitignore
*.md
README.md
docker-compose.yml
.env
.env.example
node_modules
.DS_Store

Example azuracast.env.example

Terminal window
# Copy this file to azuracast.env and configure for your deployment
AZURACAST_BASE_URL=https://example-app.klutch.sh
ENABLE_ADVANCED_FEATURES=true
AUTO_ASSIGN_PORT_MIN=8000
AUTO_ASSIGN_PORT_MAX=8499
# Database (if using external)
MYSQL_HOST=your-db-host
MYSQL_PORT=3306
MYSQL_USER=azuracast
MYSQL_PASSWORD=change-this-password
MYSQL_DATABASE=azuracast
# PHP Configuration
PHP_MAX_EXECUTION_TIME=300
PHP_MEMORY_LIMIT=512M
PHP_UPLOAD_MAX_FILESIZE=100M
# Backup Configuration
BACKUP_ENABLED=true
BACKUP_SCHEDULE="0 3 * * *"

Example Deployment Workflow

Here’s a complete workflow from setup to going live:

  1. Repository Setup

    • Create a new GitHub repository
    • Add the Dockerfile to the root
    • Commit and push
  2. Klutch.sh Configuration

    • Create new app in Klutch.sh dashboard
    • Connect GitHub repository
    • Configure persistent volumes (stations, db, backups)
    • Set environment variables
    • Deploy
  3. Initial Configuration

    • Wait for deployment to complete
    • Access web interface
    • Create admin account
    • Configure first station
  4. Content Setup

    • Upload media files
    • Create playlists
    • Configure streaming settings
    • Test stream playback
  5. Go Live

    • Start broadcasting
    • Share stream URLs with listeners
    • Monitor performance and listener count
    • Adjust as needed
  6. Ongoing Maintenance

    • Regular backups
    • Monitor storage and performance
    • Update content regularly
    • Engage with listeners

Conclusion

You now have a production-ready AzuraCast deployment on Klutch.sh! This guide covered everything from initial setup to advanced configuration, security, and scaling. AzuraCast provides a powerful platform for web radio broadcasting, and Klutch.sh ensures reliable, scalable hosting for your station.

Key takeaways:

  • Klutch.sh automatically detects and builds your Dockerfile
  • Persistent volumes are critical for media storage and data retention
  • Environment variables provide flexible, secure configuration
  • Regular backups protect your station data and content
  • Monitoring and optimization ensure the best listener experience

Start broadcasting, engage your audience, and grow your radio station with confidence!


Additional Resources

Happy broadcasting! 🎵📻