Deploy Your Spotify
Self-hosted Spotify listening history and stats dashboard (v1.20.0)
Just deployed
MongoDB
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
- 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.
Template Content
SPOTIFY_PUBLIC
Client ID of your Spotify app (developer.spotify.com/dashboard, with Web API ticked).
SPOTIFY_SECRET
Client secret of the same Spotify app.
MongoDB
mongo:8.0.38
