Skip to content

Deploying Your Spotify

Introduction

Your Spotify is a self-hosted dashboard that provides detailed statistics about your Spotify listening habits. It tracks what you listen to and presents beautiful visualizations of your music consumption patterns, top artists, tracks, and listening history.

Key highlights of Your Spotify:

  • Listening History: Track every song you play
  • Top Artists and Tracks: See your most played music
  • Listening Trends: Visualize patterns over time
  • Time-Based Stats: Daily, weekly, monthly, and yearly breakdowns
  • Genre Analysis: Understand your music preferences
  • Beautiful Dashboard: Modern, responsive interface
  • Privacy Focused: Your data stays on your server
  • Historical Data: Build long-term listening statistics

This guide walks through deploying Your Spotify on Klutch.sh using Docker.

Why Deploy Your Spotify on Klutch.sh

Deploying Your Spotify on Klutch.sh provides several advantages:

Long-Term Statistics: Build listening history beyond Spotify’s built-in limits.

Privacy: Your music data stays under your control.

HTTPS by Default: Required for Spotify OAuth, provided automatically.

Persistent Storage: Your listening history persists with Klutch.sh volumes.

Prerequisites

Before deploying Your Spotify on Klutch.sh, ensure you have:

Deploying Your Spotify on Klutch.sh

    Create Spotify Application

    Go to the Spotify Developer Dashboard and create an application. Note your Client ID and Client Secret. Set the redirect URI to https://your-app.klutch.sh/api/spotify/callback.

    Create Your Repository

    Create a new GitHub repository with a Dockerfile:

    FROM lscr.io/linuxserver/your_spotify:latest
    ENV SPOTIFY_PUBLIC=${SPOTIFY_PUBLIC}
    ENV SPOTIFY_SECRET=${SPOTIFY_SECRET}
    ENV API_ENDPOINT=https://your-app.klutch.sh
    ENV CLIENT_ENDPOINT=https://your-app.klutch.sh
    ENV MONGO_ENDPOINT=mongodb://mongo:27017/your_spotify
    EXPOSE 80
    CMD ["/init"]

    Push to GitHub

    Push your Dockerfile to your GitHub repository.

    Create a New Project on Klutch.sh

    Navigate to the Klutch.sh dashboard and create a new project.

    Deploy MongoDB

    Your Spotify requires MongoDB. Deploy a MongoDB instance within your project first.

    Create a New App

    Create a new app for Your Spotify and connect your GitHub repository.

    Configure HTTP Traffic

    Set the traffic type to HTTP with port 80.

    Set Environment Variables

    Configure the following environment variables:

    VariableValue
    SPOTIFY_PUBLICYour Spotify Client ID
    SPOTIFY_SECRETYour Spotify Client Secret
    API_ENDPOINThttps://your-app.klutch.sh
    CLIENT_ENDPOINThttps://your-app.klutch.sh
    MONGO_ENDPOINTYour MongoDB connection string

    Attach Persistent Volume

    Add a persistent volume for any local data caching.

    Deploy Your Application

    Click Deploy to build and launch Your Spotify.

    Connect Your Account

    Access your dashboard and authenticate with your Spotify account to begin tracking.

Additional Resources

Conclusion

Your Spotify on Klutch.sh provides deep insights into your music listening habits with beautiful visualizations. Build long-term statistics about your music consumption while keeping your data private and under your control.