Deploy Your Spotify

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

Deploy Your Spotify

Just deployed

/data/db

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

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.


Template Content

More templates in this category

View Template
Plausible WordPress
Cookie-free WordPress stats from your own Plausible

onepush
0
View Template
Typesense Multilingual
Locale-aware multilingual search with Typesense

onepush
0
View Template
Formbricks
Surveys, NPS and in-app feedback on your own Postgres, Hub and Cube

Two Workspaces
3