Deploying moOde Audio
Introduction
moOde Audio is a high-fidelity music player designed primarily for Raspberry Pi that transforms your device into a premium audio streamer. While traditionally deployed on dedicated hardware, moOde can be containerized for cloud deployment, providing remote access to your music library with audiophile-grade playback quality.
Built on a foundation of proven audio technologies including MPD (Music Player Daemon), moOde delivers bit-perfect audio playback with support for high-resolution formats. The elegant web interface provides comprehensive control over your music library, streaming services, and audio settings.
Key highlights of moOde Audio:
- High-Resolution Audio: Support for formats up to 32-bit/768kHz including DSD, FLAC, ALAC, and more
- MPD Backend: Leverages the mature and stable Music Player Daemon for reliable playback
- Beautiful Web UI: Responsive interface with cover art, metadata display, and playlist management
- Multi-Room Audio: Stream to multiple zones with synchronized playback
- Internet Radio: Access thousands of internet radio stations with easy station management
- UPnP/DLNA Support: Stream from network media servers and act as a renderer
- Equalizer and DSP: Built-in parametric equalizer and digital signal processing
- Spotify Connect: Native integration with Spotify for seamless streaming
- AirPlay Support: Stream from Apple devices using AirPlay protocol
- Bluetooth Audio: Receive audio streams via Bluetooth
This guide walks through deploying moOde Audio on Klutch.sh using Docker, configuring persistent storage for your music library, and setting up the application for streaming.
Why Deploy moOde Audio on Klutch.sh
Deploying moOde Audio on Klutch.sh provides several advantages for music streaming:
Always-On Access: Your music library remains accessible 24/7 from anywhere, without managing home network configurations or dealing with dynamic IPs.
Simplified Deployment: Klutch.sh automatically detects your Dockerfile and builds moOde without complex orchestration. Push to GitHub and your music player deploys automatically.
Persistent Storage: Attach persistent volumes for your music library, playlists, and configurations. Your collection and settings survive container restarts.
HTTPS by Default: Klutch.sh provides automatic SSL certificates, ensuring secure access to your music interface from anywhere.
GitHub Integration: Connect your configuration repository directly from GitHub. Updates trigger automatic redeployments.
Scalable Resources: Allocate CPU and memory based on your library size and streaming needs.
Custom Domains: Assign a custom domain to your moOde instance for easy access.
Prerequisites
Before deploying moOde Audio on Klutch.sh, ensure you have:
- A Klutch.sh account
- A GitHub account with a repository for your configuration
- Basic familiarity with Docker and containerization concepts
- Your music library files ready to upload
- (Optional) A custom domain for your moOde instance
Understanding moOde Architecture
moOde Audio is built on several core components:
MPD (Music Player Daemon): The heart of moOde’s playback engine, handling audio decoding, playlist management, and output control.
PHP Web Interface: A responsive web application providing comprehensive control over all moOde features.
ALSA Audio System: Advanced Linux Sound Architecture for audio routing and processing.
Streaming Protocols: Support for UPnP/DLNA, Spotify Connect, AirPlay, and Bluetooth for versatile connectivity.
Preparing Your Repository
Create a GitHub repository with your moOde configuration.
Repository Structure
moode-deploy/├── Dockerfile├── mpd.conf└── .dockerignoreCreating the Dockerfile
Create a Dockerfile in your repository root:
FROM debian:bookworm-slim
# Install dependenciesRUN apt-get update && apt-get install -y \ mpd \ mpc \ nginx \ php-fpm \ php-sqlite3 \ php-gd \ alsa-utils \ wget \ curl \ && rm -rf /var/lib/apt/lists/*
# Set environment variablesENV MPD_HOST=localhostENV MPD_PORT=6600
# Create directoriesRUN mkdir -p /var/lib/mpd/music \ /var/lib/mpd/playlists \ /var/log/mpd \ /var/run/mpd
# Copy configurationCOPY mpd.conf /etc/mpd.conf
# Expose portsEXPOSE 80 6600
# Health checkHEALTHCHECK --interval=30s --timeout=10s --start-period=30s --retries=3 \ CMD curl -f http://localhost/ || exit 1
CMD ["mpd", "--no-daemon", "/etc/mpd.conf"]Creating the MPD Configuration
Create mpd.conf:
music_directory "/var/lib/mpd/music"playlist_directory "/var/lib/mpd/playlists"db_file "/var/lib/mpd/database"log_file "/var/log/mpd/mpd.log"pid_file "/var/run/mpd/pid"state_file "/var/lib/mpd/state"sticker_file "/var/lib/mpd/sticker.sql"
bind_to_address "0.0.0.0"port "6600"
audio_output { type "httpd" name "HTTP Stream" encoder "vorbis" port "8000" bitrate "320" format "44100:16:2"}
audio_output { type "null" name "Null Output"}Creating the .dockerignore File
.git.github*.mdLICENSE.gitignore*.log.DS_StoreDeploying moOde Audio on Klutch.sh
- Select HTTP as the traffic type
- Set the internal port to 80 for the web interface
Push Your Repository to GitHub
Initialize and push your repository to GitHub with your Dockerfile and configuration files.
Create a New Project on Klutch.sh
Navigate to the Klutch.sh dashboard and create a new project with a descriptive name like “moode-audio”.
Create a New App
Within your project, create a new app. Connect your GitHub account and select the repository containing your moOde configuration.
Configure HTTP Traffic
In the deployment settings:
Set Environment Variables
Configure the following environment variables:
| Variable | Value |
|---|---|
MPD_HOST | localhost |
MPD_PORT | 6600 |
Attach Persistent Volumes
Add the following volumes:
| Mount Path | Recommended Size | Purpose |
|---|---|---|
/var/lib/mpd/music | 50+ GB | Your music library |
/var/lib/mpd/playlists | 1 GB | Saved playlists |
/var/lib/mpd/database | 1 GB | MPD database |
Deploy Your Application
Click Deploy to start the build process. Klutch.sh will build and deploy your moOde instance.
Access moOde Audio
Once deployment completes, access your moOde instance at https://your-app-name.klutch.sh.
Initial Configuration
Adding Music to Your Library
Upload your music files to the /var/lib/mpd/music volume. moOde supports:
- FLAC, ALAC, WAV, AIFF (lossless)
- MP3, AAC, OGG Vorbis (lossy)
- DSD64, DSD128, DSD256 (DSD formats)
Updating the Music Database
After adding music, trigger a database update through the web interface or using MPC commands.
Creating Playlists
Use the web interface to create and manage playlists. Playlists are stored in /var/lib/mpd/playlists and persist across restarts.
Streaming Configuration
HTTP Audio Streaming
moOde can stream audio over HTTP, making it accessible from any device with a web browser or compatible audio player.
Internet Radio
Add internet radio stations through the web interface. moOde supports common streaming formats including MP3, AAC, and OGG streams.
Troubleshooting
No Audio Playback
- Verify the music directory contains valid audio files
- Check MPD logs for decoding errors
- Ensure the database has been updated after adding music
Web Interface Not Loading
- Verify the deployment is running in the Klutch.sh dashboard
- Check that port 80 is configured correctly
- Review nginx error logs
Database Not Updating
- Check file permissions on the music directory
- Verify MPD has write access to the database file
- Review MPD logs for indexing errors
Additional Resources
- moOde Audio Official Website
- moOde GitHub Repository
- MPD Documentation
- Klutch.sh Persistent Volumes
- Klutch.sh Deployments
Conclusion
Deploying moOde Audio on Klutch.sh gives you a powerful, cloud-based music streaming solution with audiophile-grade playback quality. With persistent storage for your music library and automatic HTTPS, you can access your collection from anywhere while maintaining the high-fidelity experience moOde is known for.
Whether you’re streaming your personal collection, listening to internet radio, or sharing music with friends, moOde on Klutch.sh provides the foundation for a reliable, always-available music player that you control.