Deploying SwingMusic
Introduction
SwingMusic is a beautiful, self-hosted music player and streaming server for your personal music collection. With a modern, elegant interface inspired by Spotify and Apple Music, SwingMusic brings a premium music streaming experience to your self-hosted infrastructure.
Key highlights of SwingMusic:
- Beautiful UI: Modern, responsive interface with smooth animations
- Music Discovery: Browse by artist, album, genre, or folder
- Smart Playlists: Create and manage playlists
- Queue Management: Flexible queue and play next features
- Gapless Playback: Seamless transitions between tracks
- Album Art: Automatic album art fetching and display
- Lyrics Support: Display synchronized lyrics
- Multi-User: Support for multiple user accounts
- Mobile Responsive: Works great on phones and tablets
- Last.fm Scrobbling: Track your listening history
This guide walks through deploying SwingMusic on Klutch.sh using Docker.
Why Deploy SwingMusic on Klutch.sh
Deploying SwingMusic on Klutch.sh provides several advantages:
Simplified Deployment: Klutch.sh automatically detects your Dockerfile and builds SwingMusic without complex orchestration.
Persistent Storage: Attach persistent volumes for your music library and database.
HTTPS by Default: Secure music streaming from anywhere.
GitHub Integration: Connect your configuration repository for automatic redeployments.
Prerequisites
Before deploying SwingMusic on Klutch.sh, ensure you have:
- A Klutch.sh account
- A GitHub account with a repository for your SwingMusic configuration
- Basic familiarity with Docker and containerization concepts
- Your music library files ready to upload
Deploying SwingMusic on Klutch.sh
- Select HTTP as the traffic type
- Set the internal port to 1970
Create Your Repository
Create a new GitHub repository with a Dockerfile for SwingMusic:
FROM ghcr.io/swingmx/swingmusic:latest
ENV PUID=1000ENV PGID=1000
EXPOSE 1970
VOLUME ["/music", "/config"]Push to GitHub
Initialize and push your repository to GitHub with your Dockerfile.
Create a New Project on Klutch.sh
Navigate to the Klutch.sh dashboard and create a new project.
Create a New App
Within your project, create a new app and connect your GitHub repository.
Configure HTTP Traffic
In the deployment settings:
Set Environment Variables
Configure the following environment variables:
| Variable | Value |
|---|---|
PUID | 1000 |
PGID | 1000 |
Attach Persistent Volumes
Add the following volumes:
| Mount Path | Recommended Size | Purpose |
|---|---|---|
/config | 5 GB | Database and configuration |
/music | 100+ GB | Your music library |
Deploy Your Application
Click Deploy to start the build process.
Access SwingMusic
Once deployment completes, access SwingMusic at your app URL.
Configuration
Initial Setup
On first access:
- Create your admin account
- Add your music folder path (
/music) - Trigger a library scan
- Wait for indexing to complete
Library Organization
SwingMusic works best with well-organized music:
/music/├── Artist Name/│ ├── Album Name (Year)/│ │ ├── 01 - Track Name.flac│ │ ├── 02 - Track Name.flac│ │ └── cover.jpgSupported Formats
SwingMusic supports various audio formats:
- FLAC, MP3, AAC, OGG
- WAV, AIFF, ALAC
- M4A, WMA, OPUS
Last.fm Integration
Enable scrobbling in settings:
- Go to Settings > Integrations
- Connect your Last.fm account
- Enable automatic scrobbling
Additional Resources
- SwingMusic Official Website
- SwingMusic GitHub Repository
- Klutch.sh Persistent Volumes
- Klutch.sh Deployments
Conclusion
Deploying SwingMusic on Klutch.sh gives you a beautiful, modern music streaming experience with automatic builds, persistent storage, and secure HTTPS access. Enjoy your personal music collection from anywhere with a premium interface.