ghostlistener runs a silent Spotify player on your Linux server. It pauses when you listen on another device, then takes over after your chosen grace period.
Spotify can suspend accounts for artificially inflating streams. Read the risk.
The ghostlistener dashboard, shown with example music and listening data.
How it shares your Spotify account
ghostlistener only plays when nothing else on your Spotify account is playing. Pick a step below to see what happens at each point.
Your phone or computerPlaying
Paper Lanterns
Playing on your phone
1:583:12
You are listeningGhost pauses right away
ghostlistener on LinuxPaused
Not playing
Paused while you listen
0:003:34
As soon as you press play on your phone, laptop or any other device, ghostlistener pauses, and the songs you play count as your own listening in the stats.
Turn it on once and forget about it
Gets out of your way
Whenever you start playing music on your phone, laptop or a speaker, ghostlistener pauses right away. Once you stop, it waits out the grace period you set and then automatically starts listening again. Try pressing pause on the phone below.
Your phonePlaying
ghostlistenerPaused
Makes no sound
ghostlistener plays into a virtual sound card on your server, so you don't need any speakers plugged in and nobody hears a thing.
Stats for you and for ghost
The dashboard keeps your listening and ghost's apart, so you can always see your own hours, streaks and top songs next to what ghost played.
GhostYou
This week · 24h you, 50.5h ghost
Plays what you pick
You can pick any mix of playlists, albums, artists and your Liked Songs, and ghost shuffles them all together into one queue.
Liked SongsPlaylistsAlbumsArtists
Locked to your account
You sign in with your Spotify account, and only the Spotify usernames you've added to the list are allowed to open the dashboard.
youAllowedanyone elseBlocked
Shows what's playing
Open the dashboard any time to see which song ghost is playing right now and what's coming up next.
Paper LanternsTidewater Club
NextNight Bus Home · Velvet Arcade
Light on memory
120MB
of RAM for both containers together, with the Soloist player included.
On a 2 GB Raspberry Pi, that's just one of these 16 blocks.
Install on Linux
Docker Compose is the quickest way. The full guide on GitHub also covers Podman, a reverse proxy and every setting.
Use it at your own risk. Spotify's terms forbid artificially inflating streams, and running this can get the account suspended. ghostlistener is not affiliated with or endorsed by Spotify.
You need
A 64-bit Linux machine, x86_64 or arm64. A Raspberry Pi works with a 64-bit OS. Windows and macOS won't: Docker Desktop keeps Spotify from finding the player on your network.
Put it in a new folder and fill in SPOTIFY_CLIENT_ID, SOLOIST_API_KEY and GHOST_ALLOWED_USERS. That last one is the Username on your Spotify account page, not your display name.
2
Start it
Run docker compose up -d in that folder.
3
Pair the player once
In the Spotify app on a phone or computer on the same Wi-Fi, start any song and pick ghostlistener from the devices list. Soloist remembers the login.
4
Open the dashboard
Go to http://127.0.0.1:4467, sign in with Spotify, choose what to play and switch ghost on. New installs start with it off. On a headless server, use an SSH tunnel: ssh -L 4467:127.0.0.1:4467 your-server.
compose.yaml
services: ghostlistener: image: ghcr.io/baipoonnn/ghostlistener:latest network_mode: host environment: SPOTIFY_CLIENT_ID: your-spotify-app-client-id GHOST_ALLOWED_USERS: your-spotify-username # The dashboard's port. If you change it, register # http://127.0.0.1:<port>/callback in your Spotify app instead. # GHOST_PORT: 4467 # Set this when the dashboard is reached through a domain, and register # <GHOST_BASE_URL>/callback in your Spotify app. # GHOST_BASE_URL: https://ghost.example.com GHOST_STATE_DIR: /data volumes: - ghost-data:/data # Log plays in the host's time zone, not UTC. - /etc/localtime:/etc/localtime:ro depends_on: - soloist restart: unless-stopped soloist: # Holds no Spotify code. It downloads Soloist from Spotify's CDN on start # and moves to newer builds by itself. image: ghcr.io/baipoonnn/ghostlistener-soloist:latest network_mode: host environment: # Generate one at developer.spotify.com/dashboard/soloist. SOLOIST_API_KEY: your-soloist-api-key SOLOIST_DEVICE_NAME: ghostlistener volumes: - soloist-data:/data restart: unless-stoppedvolumes: ghost-data: soloist-data:
The code is on GitHub under the GPL-3.0 license. If you find it useful, giving it a star helps other people find it too, and if something breaks, you can open an issue there.