Skip to content

AzuraCast ​

WARNING

AzuraCast installation cannot be run simply by copy and pasting the docker-compose file due to some initialization steps that their docker.sh utility script will do to initialize database. So we have to clone the repository to Unraid host and run it. Once run we will then create a Stack manually on Unraid so that we can view log, shell access and enable it to start on boot.

alt text

Setup AzuraCast Folder on Unraid Host ​

Create a dir at /mnt/user/appdata/AzuraCast

jsx
mkdir /mnt/user/appdata/AzuraCast

Also create a git folder where we will download AzuraCast source code.

jsx
mkdir /mnt/user/appdata/AzuraCast/git

Download AzuraCast source code.

jsx
cd mkdir /mnt/user/appdata/AzuraCast/git
git clone https://github.com/AzuraCast/AzuraCast

Install AzuraCast ​

Use their docker utility script under the cloned repository to install AzuraCast. See https://www.azuracast.com/docs/administration/docker/#docker-utility-script for more details about what the script can do.

jsx
./docker.sh install

The install script will prompt the following:

  • Select Rolling Release instead of Stable Release for latest update.
  • Choose a non-standard port for web (default: 80), https (default: 443), sftp (default: 2223) or the port range for broadcast services. In my case, I choose the following:
    • Web: 80 → 280
    • HTTPS: 443 → 2443
    • SFTP: 2223 (same)
    • Port Range: 8000â€Ļ → 18000â€Ļ

Once installed, copy and paste the .env, azuracast.env and docker-compose.yml to /mnt/user/appdata/AzuraCast where we will create our docker compose stack on Unraid.

jsx
AZURACAST_ROOT_DIR=/mnt/user/appdata/AzuraCast
cp /mnt/user/appdata/AzuraCast/git/AzuraCast/.env ${AZURACAST_ROOT_DIR}
cp /mnt/user/appdata/AzuraCast/git/AzuraCast/azuracast.env ${AZURACAST_ROOT_DIR}
cp /mnt/user/appdata/AzuraCast/git/AzuraCast/docker-compose.yml ${AZURACAST_ROOT_DIR}

Inspect docker-compose.yml and it should have the following content.

yaml
#
# AzuraCast Docker Compose Configuration File
#
# When updating, you will be prompted to replace this file with a new
# version; you should do this whenever possible to take advantage of
# new updates.
#
# If you need to customize this file, you can create a new file named:
#   docker-compose.override.yml
# with any changes you need to make.
#

services:
  web:
    container_name: azuracast
    image: "ghcr.io/azuracast/azuracast:${AZURACAST_VERSION:-latest}"
    labels:
      - "com.centurylinklabs.watchtower.scope=azuracast"
    # Want to customize the HTTP/S ports? Follow the instructions here:
    # https://www.azuracast.com/docs/administration/docker/#using-non-standard-ports
    ports:
      - '${AZURACAST_HTTP_PORT:-80}:${AZURACAST_HTTP_PORT:-80}'
      - '${AZURACAST_HTTPS_PORT:-443}:${AZURACAST_HTTPS_PORT:-443}'
      - '${AZURACAST_SFTP_PORT:-2022}:${AZURACAST_SFTP_PORT:-2022}'
      - '18000:8000'
      - '18005:8005'
      - '18006:8006'
      - '18010:8010'
      - '18015:8015'
      - '18016:8016'
      - '18020:8020'
      - '18025:8025'
      - '18026:8026'
      - '18030:8030'
      - '18035:8035'
      - '18036:8036'
      - '18040:8040'
      - '18045:8045'
      - '18046:8046'
      - '18050:8050'
      - '18055:8055'
      - '18056:8056'
      - '18060:8060'
      - '18065:8065'
      - '18066:8066'
      - '18070:8070'
      - '18075:8075'
      - '18076:8076'
      - '18090:8090'
      - '18095:8095'
      - '18096:8096'
      - '18100:8100'
      - '18105:8105'
      - '18106:8106'
      - '18110:8110'
      - '18115:8115'
      - '18116:8116'
      - '18120:8120'
      - '18125:8125'
      - '18126:8126'
      - '18130:8130'
      - '18135:8135'
      - '18136:8136'
      - '18140:8140'
      - '18145:8145'
      - '18146:8146'
      - '18150:8150'
      - '18155:8155'
      - '18156:8156'
      - '18160:8160'
      - '18165:8165'
      - '18166:8166'
      - '18170:8170'
      - '18175:8175'
      - '18176:8176'
      - '18180:8180'
      - '18185:8185'
      - '18186:8186'
      - '18190:8190'
      - '18195:8195'
      - '18196:8196'
      - '18200:8200'
      - '18205:8205'
      - '18206:8206'
      - '18210:8210'
      - '18215:8215'
      - '18216:8216'
      - '18220:8220'
      - '18225:8225'
      - '18226:8226'
      - '18230:8230'
      - '18235:8235'
      - '18236:8236'
      - '18240:8240'
      - '18245:8245'
      - '18246:8246'
      - '18250:8250'
      - '18255:8255'
      - '18256:8256'
      - '18260:8260'
      - '18265:8265'
      - '18266:8266'
      - '18270:8270'
      - '18275:8275'
      - '18276:8276'
      - '18280:8280'
      - '18285:8285'
      - '18286:8286'
      - '18290:8290'
      - '18295:8295'
      - '18296:8296'
      - '18300:8300'
      - '18305:8305'
      - '18306:8306'
      - '18310:8310'
      - '18315:8315'
      - '18316:8316'
      - '18320:8320'
      - '18325:8325'
      - '18326:8326'
      - '18330:8330'
      - '18335:8335'
      - '18336:8336'
      - '18340:8340'
      - '18345:8345'
      - '18346:8346'
      - '18350:8350'
      - '18355:8355'
      - '18356:8356'
      - '18360:8360'
      - '18365:8365'
      - '18366:8366'
      - '18370:8370'
      - '18375:8375'
      - '18376:8376'
      - '18380:8380'
      - '18385:8385'
      - '18386:8386'
      - '18390:8390'
      - '18395:8395'
      - '18396:8396'
      - '18400:8400'
      - '18405:8405'
      - '18406:8406'
      - '18410:8410'
      - '18415:8415'
      - '18416:8416'
      - '18420:8420'
      - '18425:8425'
      - '18426:8426'
      - '18430:8430'
      - '18435:8435'
      - '18436:8436'
      - '18440:8440'
      - '18445:8445'
      - '18446:8446'
      - '18450:8450'
      - '18455:8455'
      - '18456:8456'
      - '18460:8460'
      - '18465:8465'
      - '18466:8466'
      - '18470:8470'
      - '18475:8475'
      - '18476:8476'
      - '18480:8480'
      - '18485:8485'
      - '18486:8486'
      - '18490:8490'
      - '18495:8495'
      - '18496:8496'
    env_file:
      - azuracast.env
      - .env
    volumes:
      - station_data:/var/azuracast/stations
      - backups:/var/azuracast/backups
      - db_data:/var/lib/mysql
      - www_uploads:/var/azuracast/storage/uploads
      - shoutcast2_install:/var/azuracast/storage/shoutcast2
      - stereo_tool_install:/var/azuracast/storage/stereo_tool
      - geolite_install:/var/azuracast/storage/geoip
      - sftpgo_data:/var/azuracast/storage/sftpgo
      - acme:/var/azuracast/storage/acme
      - /mnt/user/Music/music-unsorted:/var/azuracast/stations/test/media/
    restart: unless-stopped
    ulimits:
      nofile:
        soft: 65536
        hard: 65536
    logging:
      options:
        max-size: "1m"
        max-file: "5"

  updater:
    container_name: azuracast_updater
    image: ghcr.io/azuracast/updater:latest
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
    logging:
      options:
        max-size: "1m"
        max-file: "5"

volumes:
  db_data: { }
  acme: { }
  shoutcast2_install: { }
  stereo_tool_install: { }
  geolite_install: { }
  sftpgo_data: { }
  station_data: { }
  www_uploads: { }
  backups: { }

Manually start the docker stack using docker-compose to verify it all works.

jsx
docker-compose up

Result

Untitled

Also check the /mnt/user/appdata/AzuraCast folder to make sure it has the following folders/files.

Untitled

First-Time Setup ​

Open your browser and visit https://<UNRAID_NAS_IP>:2443 if you changed the HTTPS port from 443 to 2443, otherwise visit https://<UNRAID_NAS_IP>

You should see the following first-time setup screen. Follow the wizard to create.

Untitled

Create Docker Stack on Unraid ​

Visit Unraid homepage then select DOCKER. Scroll to the bottom of the page and click Add New Stack.

Untitled

Fill in the following:

Untitled

By setting the stack directory to /mnt/user/appdata/AzuraCast, Unraid will create a docker-compose.yml there.

Console or SSH into Unraid, then check if the content of that file is the same as before.

yaml
nano /mnt/user/appdata/AzuraCast/docker-compose.yml

Also enable the Auto Start toggle button to automatically start the container when Unraid restart.

Untitled

Click Compose Up button to Start the stack.

Untitled

Scroll up and you should see a new container named azuracast being started. Check container logs to verify it doesn’t hang during initialization.

Untitled

About Ports ​

Three ports are reserved for viewing AzureCast home page. The rest of the ports is used for each station IceCast v2 broadcast station.

  • HTTP (default: 80): AzuraCast home page without HTTPS/TLS
  • HTTPS (default: 443): TLS protected AzuraCast home page
  • SFTP (default: 2223): For uploading media files to AzuraCast station

Station ​

Create Station ​

Go to System Administration > Station

Click the + Add Station button.

Untitled

Fill in the numbered fields as needed.

Untitled

Enable Song Requests if you want your listening to select a song from a list to play next after the currently playing track.

Untitled

Set the Base Station Directory so that the station name is created following this name. We will later mount external music folder to this folder as media files.

Untitled

Click Save Changes to finish creating the station.

Internally you should see a new folder created inside the container for this new station.

Untitled

My test station dashboard.

Untitled

Example of a default Station public page.

Untitled

Mounting External Music Folder to AzuraCast Station ​

Each station media is stored in /var/azuracast/stations/<STATION_NAME>/media inside the container. So if I have a station named test, I would mount that folder from host into /var/azuracast/stations/test/media.

To mount an existing shared folder on Unraid to the station, simply add another volume mapping under docker-compose.yml volume stanza.

Following is how I mount my music folder on my unraid at /mnt/user/Music/music-unsorted to a AzuraCast station named test.

Untitled

Example of mounting more folders from unraid shared folder to more stations. I add a :ro suffix after each volume row so that these folder are mounted in read-only permission.

Untitled

Click Compose Up button after making any changes to the docker-compose manifest to restart the container.

Untitled

Once AzuraCast dashboard is accessible, visit System Administration > System Maintainance > Storage Locations to verify the folder is being added.

Untitled

Select Media > Music Files from the left sidebar, and you should see it picked up the folders. If you click on each folder and inspect the music file, it will show as Processing. Wait a while for it to process all music files from that mounted folder.

Untitled

Inspecting Media Processing Progress ​

It is useful to view the container log when AzuraCast is processing the media file. In my case, my AzuraCast container log shows OOM or Out of Memory error if the media folder contains too many songs, e.g. more than 10k. In that case, read the FAQ section on OOM issue to increase the PHP Memory limit from the default 128MB to GB.

Untitled

Broadcast Station ​

By default each station came with IceCast v2 on. Each station will take up one port.

Go to Station > Edit Profile > Broadcasting section to see the default assigned broadcasting port.

Untitled

Since we run AzuraCast inside container, we have to later map each container port to host port.

In my setup, I simply add a 1 before each container port, e.g. container port 8000 would be mapped to host port 18000.

Untitled

If you use CloudFlare Tunnel to expose these ports, make sure to expose each host port individually.

Customize Station ​

Customize public pages background ​

Go to Station > Profile > Branding , then select a Public Page Background.

Untitled

With custom Branding background image.

radiostation-01.png

Add More Music Bitrate ​

You can set the default streaming bitrate for each station. Default is 128kbps.

Go to Manage Station > Broadcasting > Mount Points

Untitled

Click Edit then

Untitled

Or stream lossless.

Untitled

Example of two mount points: MP3 (128kbps) and FLAC

Untitled

These are later selectable in the station Public page by your listener.

radiostation2-01.png

Enable On-Demand Media ​

You can also enable on-demand media streaming for a station so that your requester can playback any songs in that station. This is a separate webpage, with URL of http://IP/public/<STATION_NAME>/ondemand

Go to Station > Edit Profile. Then toggle On-Demand Streamingbutton.

Untitled

Example of a station profile with On-Demand Media enabled.

Untitled

Example On-Demand Media public page.

Untitled

FAQ ​

No music playing even when the station is playing ​

TIP

💡 This only applies if you expose the service behind CloudFlare Tunnel.

@ref: https://github.com/AzuraCast/AzuraCast/discussions/6912

Go to System Administration > System Settings.

Then enable Use Web Proxy for Radio

Untitled

OOM Out of Memory Error when adding media folder is too large ​

Edit /mnt/user/appdata/AzuraCast/azuracast.env and set PHP_MEMORY_LIMIT to any value in Gigabyte range to be safe.

Untitled

Station List ​

Following are the stations I created.

  • Anime OST
  • Classical
  • Classical Crossover
  • Electronic
  • Game Doujin
  • Game OST
  • Game Touhou
  • J-Pop
  • K-Pop
  • Movie BGM
  • Movie Soundtrack
  • New Age
  • Praise & Worship