Skip to content

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

    Create Your Repository

    Create a new GitHub repository with a Dockerfile for SwingMusic:

    FROM ghcr.io/swingmx/swingmusic:latest
    ENV PUID=1000
    ENV 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:

    • Select HTTP as the traffic type
    • Set the internal port to 1970

    Set Environment Variables

    Configure the following environment variables:

    VariableValue
    PUID1000
    PGID1000

    Attach Persistent Volumes

    Add the following volumes:

    Mount PathRecommended SizePurpose
    /config5 GBDatabase and configuration
    /music100+ GBYour 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:

  1. Create your admin account
  2. Add your music folder path (/music)
  3. Trigger a library scan
  4. 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.jpg

Supported Formats

SwingMusic supports various audio formats:

  • FLAC, MP3, AAC, OGG
  • WAV, AIFF, ALAC
  • M4A, WMA, OPUS

Last.fm Integration

Enable scrobbling in settings:

  1. Go to Settings > Integrations
  2. Connect your Last.fm account
  3. Enable automatic scrobbling

Additional Resources

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.