Raspberry Pi as a Headless Audio Player

The year is 2026 and I got my very first Raspberry Pi, to use it as an audio player! πŸ™‚

The plan was to set a Raspberry Pi up as a headless audio player (supposedly moOde audio player can be controlled by a web-interface) that should replace one (or maybe two) makeshift solutions of mine:

Update 2026-09-27: Over a month later and I’m still very happy with this solution.
One thing that is still on my TODO list: I want to enable the (audio-only) playback from YouTube: I have many podcasts/interviews/mostly-audio videos on my watchlist…


(1) Setup

Hardware
Software

Bringing it together:

  1. Assemble the hardware (Raspberry Pi + DAC HAT + Case)
  2. Download, install and start the “Raspberry Pi Imager” application on a (different) computer
  3. Select the image for moOde audio player from the Media Player OS section of the “Raspberry Pi Imager” and configure the rest of the image.
    Attention: It’s recommended to enable SSH, maybe also provide WiFi credentials and to remember the hostname and username for later (see point 4)!
  4. Write the configured image to a SD card and insert it to the RasPi1.
  5. Start the Raspberry Pi for the first time by supplying power2 to the Micro-USB port (the device does not have a On/Off button!).
    This will take a few minutes and the RasPi will automatically reboot multiple times (usually 3) during its initial start.
  6. If you haven’t attached a monitor (via HDMI) and keyboard (via USB), you can login to the RasPi via SSH3.

(2) Configuration

(2.1) Raspberry Pi

InnoMaker HiFi DAC HAT for Raspberry Pi

After mechanically assembling the HAT with the RasPi, the DAC HAT needs so further adjustments:

Enable the InnoMaker RPI HIFI DAC audio module as a Allo Boss DAC

Based on How to set up InnoMaker RPI HIFI DAC hat for your Headless Raspberry Pi

  1. SSH into the RasPi

     > ssh <user>@<host>
    
  2. Open the configuration file with a text editor:

     > sudo nano /boot/firmware/config.txt
    

    There, add this line (under the all section):

     [all]
     dtoverlay=allo-boss-dac-pcm512x-audio
    

    Save and exit (nano: Ctrl+O β†’ Enter β†’ Ctrl+X)

  3. Reboot the Raspberry Pi, then SSH again into the RasPi

     > sudo reboot
     ...
     > ssh <user>@<host>
    
  4. Find the output device number for your DAC:

     > aplay -l
    

    For InnoMaker HiFi DAC HAT for Raspberry Pi you need to look for the BossDAC listing.
    (Note: Accoording to the article above, sometimes this command will return an error instead of a list of devices β†’ See How to set up InnoMaker RPI HIFI DAC hat for your Headless Raspberry Pi for details on how to troubleshoot that.

  5. This is just to confirm the device number of the DAC: Should be the same as before:

     > cat /proc/asound/cards
    
  6. Set the device as the default soundcard
    This will create and open the (empty) sound config file:

     > sudo nano /etc/asound.conf
    

    There, add this line (replace <CARD_NUMBER> with the number from step 4!

     pcm.!default { type hw card <CARD_NUMBER> } ctl.!default { type hw card <CARD_NUMBER> }
    

    Save and exit (nano: Ctrl+O β†’ Enter β†’ Ctrl+X)

  7. Reboot the Raspberry Pi, then SSH again into the RasPi

     > sudo reboot
     ...
     > ssh <user>@<host>
    
  8. Access the Raspberry Pi configuration to change the default audio settings

     > sudo raspi-config
    
    • Select System Options β†’ Audio
    • Select BossDAC from the output list, then select OK
      (The number here should match the one we’ve seen before; if not: reboot & try this step again)
  9. A final reboot

     > sudo reboot
    

Adjust Default Output Volume

Based on How to use AlsaMixer to adjust the default output volume on your DAC Hat

AlsaMixer is a command-line audio mixer tool for the Advanced Linux Sound Architecture (ALSA). Using AlsaMixer you can adjust various audio settings of your DAC Hat or soundcard, including volume levels, balance, and other audio-related parameters, for both input and output audio devices.

  1. SSH into the RasPi: > ssh <user>@<host>
  2. Start the AlsaMixer interface (a TUI program): > alsamixer
  3. We’re only interested in the setting for the digital gain at this moment: Look for the vertical bar titled “Digital”.
    It’s probably in the red zone; that is typical, but can be the cause of the audio sounding a bit distored (e.g. when using a headphone).
    Thus we reduce it a bit:
    1. Use the right-arrow key on your keyboard to select the “Digital” bar.
    2. Use the down-arrow key to lower the value (for a start: out of the red zone, around 89-90 (audio can be streamed while adjusting the values).
  4. Exit the AlsaMixer by pressing Esc.

Disable LEDs

The LEDs can be a bit distracting at night; thus:

  1. Open the web interface of the Moode Audio Player
  2. Click on the main icon in the upper right corner: [m]
  3. Go to Configure β†’ System β†’ Power management
  4. Slide “LED0 (Activity)” and “LED1 (Power)” to off.

There is no software/settings way to disable the LED on the InnoMaker HiFi DAC HAT for Raspberry Pi.


(2.2) Moode Audio Player

Select the correct Audio Output Device

  1. Open the web interface of the Moode Audio Player
  2. Click on the main icon in the upper right corner: [m]
  3. Go to Configure β†’ Audio β†’ Audio Output
  4. For Output Device select from the drop down list the entry that matches the card number (see above) and has the name “BossDAC”.

Add a NAS as a library

  1. Open the web interface of the Moode Audio Player
  2. Click on the main icon in the upper right corner: [m]
  3. Go to Configure β†’ Library
  4. Remote NAS Sources: Click the “Create” button
  5. Enter:
    Type: SMB (Samba)  
    Path <Name-of-the-NAS>/<Name-of-the-Share>  
    UserID: <User-on-that-NAS-with-read-access>  
    Password: <Password-of-that-User-on-the-NAS>  
    Name: <A "friendly" display name>  
    
  6. Click on [m] β†’ Update Library. That may take a while, depending on the amount of data on the NAS…

Manage Radio Stations

To add custom radio stations…

Playlists for your collection

The Moode audio player processes its library on the basis of tags (e.g. MP3 tags); if those are missing, a workaround is to use playlists instead.

  1. Generate playlist files (*.m3u) for your collection (Batch and Powershell script examples: Playlists fΓΌr den moOde audio player generieren lassen).
  2. Copy them into /var/lib/mpd/playlists (by default there are already two files: Default Playlist.m3u and Favorites.m3u).

(3) Usage

Moode Audio Player Web-UI

On a PC, one should be able to get to the Web interface via the hostname and a *.local suffix, e.g. http://<Hostname-of-the-RasPi>.local (not HTTPS!).

Important: Old versions of Android don’t support mDNS (Multicast DNS), the technology behind the *.local suffixes), only since Android 13 it can use such addresses!

So if hostname.local isn’t possible, one must know and use the IP address of the Raspberry Pi instead!

Update (Gotcha): I had to shut the RasPi down for a while and cut the power. A day or two later, I booted it up again.
But now, the hostname.local didn’t work anymore for some reason; not on the PC and not on the newer Android device.
The (same old) IP address still worked. I also tested it with just hostname: Didn’t work either — at first…!

A few days later, I tested it again, and now:

Hmm… nothing else changed during the downtime; I didn’t restart the router or switches; weird…

Starting up & Shutting down the RasPi

A Raspberry Pi sadly does not have a On/Off button! It turns on as soon as it gets power via its Micro-USB power port and turns off as soon as the power is cut.

That also means that an operating system does not get an advance warning (so that it could wind down: Stopping processes, preparing the filesystem, etc.).
And since it’s not very healthy (for the filesystem or SD card) to do this so abruptly, do this before cutting the power:

Transfer files from the RasPi to a Window machine (or vice versa) via SCP

(For example *.pls files for radio stations, as described above.)

From the Windows machine:
(. = Current working directory, e.g. C:\foo)

> scp username@raspi:/var/lib/mpd/music/RADIO/'Radio Station.pls' .

From within a SSH session with the RasPi to the local Windows machine:
This requires that the remote can access the local computer and that a SSH server is running on the local machine!

username@raspi:/var/lib/mpd/music/RADIO $ scp 'Radio Station.pls' username@WINDOWS:/C:/temp

🚧 TODO

Backup/Restore

[m] β†’ Configure β†’ System β†’ Backup/Restore

Use YouTube playlists like radio stations


  1. Note on backing up the SD card’s content: At the moment, the essential adjustments after the basic installation are described on this page; so even if the SD card goes kaputt, it shouldn’t be too much hassle to set up a new one. But, for a possible future, where I maybe customized much more of the system and don’t want to document or repeat all the the steps: A tutorial (in german!) on how to save/copy the content of a RasPi SD card ↩︎

  2. Note on power supplies for Raspberry Pi 3 (Model B and B+): Such a RasPi requires 5V/2.5A, with a Micro-USB connector.
    Higher output (e.g. 5.1V) can help to compensate slight voltage drops across the USB cable.
    Chargers like those for smartphones or tablets are not ideal, because even if they can provide the required amounts of Volt and Ampere, they may not do so in a stable way. That’s not a problem for devices like a smartphone or tablet, because those can compensate fluctuating values by its in-built rechargeable battery – but a Raspberry Pi doesn’t have that and can react a bit iffy! ↩︎

  3. Note on SSH: Use ssh <username>@<hostname>
    When I tried it without specifiying the username (i.e. I was only using ssh <hostname>), I got a “Permission denied. Please try again” error.
    (although I was asked for a username and password!). ↩︎