4.6 KiB
4.6 KiB
Asteroid Radio - Docker Streaming Setup
- Quick Start
- What's Included
- Stream URLs
- Admin Interfaces
- Manual Commands
- File Structure
- Configuration
- Troubleshooting
- Integration with Asteroid Web Interface
- Windows/WSL Notes
- Production Deployment
This setup provides a complete streaming solution using Docker with Liquidsoap and Icecast2.
Quick Start
- Ensure you have music files in the
./music/directory -
Start the streaming services:
./start-streaming.sh
What's Included
- Icecast2: Streaming server (port 8000)
- Liquidsoap: Audio processing and streaming client
- Automatic playlist: Randomized playback from
./music/directory - Multiple stream qualities: 128kbps and 64kbps MP3 streams
- Audio processing: Normalization, crossfading, metadata handling
Stream URLs
- High Quality (128kbps): http://localhost:8000/asteroid.mp3
- Low Quality (64kbps): http://localhost:8000/asteroid-low.mp3
Admin Interfaces
-
Icecast Admin: http://localhost:8000/admin/
- Username:
admin - Password:
asteroid_admin_2024
- Username:
-
Asteroid Web Interface: http://localhost:8080/asteroid/
- Username:
admin - Password:
asteroid123
- Username:
Manual Commands
Start Services
docker compose up -d
Stop Services
docker compose down
View Logs
# All services
docker compose logs -f
# Specific service
docker compose logs -f liquidsoap
docker compose logs -f icecast
Restart Services
docker compose restart
Control Liquidsoap via Telnet
telnet localhost 1234
Common telnet commands:
help- Show available commandsrequest.queue- Show current queuerequest.push /path/to/file.mp3- Add specific file to queuevar.get volume- Get current volumevar.set volume 0.8- Set volume (0.0 to 1.0)
File Structure
asteroid/docker/ ├── docker-compose.yml # Docker orchestration ├── Dockerfile.liquidsoap # Simple Dockerfile using official image ├── icecast.xml # Icecast2 configuration ├── asteroid-radio-docker.liq # Liquidsoap script for Docker ├── start.sh # Simple start script ├── stop.sh # Simple stop script ├── docker-streaming.org # This documentation └── setup-complete.org # Setup summary
Configuration
Adding Music
- Place music files (MP3, FLAC, OGG, WAV) in your music directory
- Update
docker-compose.ymlto mount your music directory - Liquidsoap will automatically detect and play them
- Playlist reloads every hour or when files change
Customizing Streams
Edit asteroid-radio-docker.liq to:
- Change bitrates
- Add more stream outputs
- Modify audio processing
- Adjust crossfade settings
Icecast Configuration
Edit icecast.xml to:
- Change passwords
- Modify listener limits
- Add more mount points
- Configure logging
Docker Image
Uses official savonet/liquidsoap:latest image:
- Pre-built with all audio codecs (MP3, FLAC, OGG, WAV, etc.)
- System agnostic - works on any Docker-capable system
- Maintained by the Liquidsoap team
- Fast builds - no compilation required
Troubleshooting
Services won't start
# Check Docker status
docker info
# Check service logs
docker compose logs
No audio in stream
- Verify music files exist in
./music/ - Check Liquidsoap logs:
docker compose logs liquidsoap - Ensure file formats are supported (MP3, FLAC, OGG, WAV)
Can't connect to stream
- Check if Icecast is running:
docker compose ps - Verify port 8000 is not blocked by firewall
- Check Icecast logs:
docker compose logs icecast
Permission issues
# Fix file permissions
chmod +x start-streaming.sh
chmod 644 icecast.xml asteroid-radio-docker.liq
Integration with Asteroid Web Interface
The Asteroid web application can be updated to show the correct streaming status by checking if the Docker services are running. The admin dashboard will show:
- Liquidsoap Status: 🟢 Running (when Docker container is up)
- Icecast Status: 🟢 Running (when Docker container is up)
Windows/WSL Notes
This setup works in WSL (Windows Subsystem for Linux) with Docker Desktop:
- Ensure Docker Desktop is running
- Use WSL2 backend for better performance
- Access streams via
localhostfrom Windows browsers - File paths should use Linux format in WSL
Production Deployment
For production use:
- Change all default passwords in
icecast.xml - Use environment variables for sensitive configuration
- Set up proper SSL/TLS certificates
- Configure firewall rules appropriately
- Consider using Docker secrets for password management