---
title: "Deploy Your Spotify"
description: "Self-hosted Spotify listening history and stats dashboard (v1.20.0)"
category: "Analytics"
url: https://railway.com/deploy/your-spotify-1
---

# Deploy Your Spotify

Self-hosted Spotify listening history and stats dashboard (v1.20.0)

**[Deploy Your Spotify on Railway](https://railway.com/template/your-spotify-1)**

Machine-readable deploy manifest (JSON, validated by TemplateCI): https://railway.com/deploy/your-spotify-1/manifest.json

- **Creator:** Agaz Self-Host
- **Category:** Analytics

## Template content

### dashboard https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/your-spotify.png

- **Source:** https://github.com/aalfath/your-spotify-railway-template
- **Health check:** /api/global/preferences
- **Public domain:** Yes

### MongoDB https://devicons.railway.app/i/mongodb.svg

- **Image:** mongo:8.0.38@sha256:479e85ced54ffb8a40dade1dcde2da2a9ae858515b9415e9cc54bfb8f0575d01
- **Start command:** `/bin/sh -c 'export GLIBC_TUNABLES=glibc.pthread.rseq=1; exec docker-entrypoint.sh mongod --ipv6 --bind_ip ::,0.0.0.0 --setParameter diagnosticDataCollectionEnabled=false'`

## Documentation

# Deploy and Host Your Spotify on Railway

Your Spotify is an open-source, self-hosted dashboard for your Spotify listening history. A server polls the Spotify API for the tracks you play and stores them in MongoDB. A web app then shows top artists, tracks and albums, listening time, history and affinity between users. It can import your past history from Spotify's privacy data export.

## About Hosting Your Spotify

Hosting Your Spotify means running its Node.js API server, its React web client and a MongoDB database, and registering your own Spotify developer app so the server can read your listening data. This template builds one service from a GitHub repo that pins the official 1.20.0 server and client images. A small Caddy proxy serves both on one Railway domain: the web app at `/`, the API at `/api`. MongoDB 8.0 runs privately with its data on a volume and a generated password. You only enter your Spotify Client ID and secret. Then add `https://YOUR-DOMAIN/api/oauth/spotify/callback` as a redirect URI in the Spotify dashboard.

## Common Use Cases

* Keep a permanent, private record of everything you play on Spotify
* Explore your top artists, tracks, albums and listening habits by day, week, month or year
* Share a dashboard with friends or family and compare tastes with the affinity view

## Dependencies for Your Spotify Hosting

* A Spotify developer app (free) with the Web API enabled, for the Client ID and secret
* MongoDB (included in this template, on a Railway volume)

### Deployment Dependencies

* Your Spotify source and docs: https://github.com/Yooooomi/your_spotify
* Release notes: https://github.com/Yooooomi/your_spotify/releases
* Spotify developer dashboard: https://developer.spotify.com/dashboard
* Template repo: https://github.com/aalfath/your-spotify-railway-template

### Implementation Details

After deploy, open the `dashboard` service's deploy logs: the start script prints the exact redirect URI to register with Spotify. Log in with Spotify; the first account becomes the admin. In development mode, Spotify only lets users you add under **User Management** in its dashboard log in. If the instance is just for you, turn off new registrations in **Settings**. Database migrations run on every start, so updates from the template repo apply on their own. Optional upstream settings such as `LOG_LEVEL`, `COOKIE_VALIDITY_MS` and `PROMETHEUS_USERNAME`/`PROMETHEUS_PASSWORD` can be added to the `dashboard` service later.

## Why Deploy Your Spotify on Railway?


Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.

By deploying Your Spotify on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.



## Similar templates

- [Plausible WordPress](https://railway.com/deploy/deploy-plausible-for-wordpress-sites) — Cookie-free WordPress stats from your own Plausible
- [Typesense Multilingual](https://railway.com/deploy/deploy-typesense-multilingual-search) — Locale-aware multilingual search with Typesense
- [Formbricks](https://railway.com/deploy/formbricks-surveys) — Surveys, NPS and in-app feedback on your own Postgres, Hub and Cube

Open this page in a browser: https://railway.com/deploy/your-spotify-1
