Install
openclaw skills install spotify-linuxSpotify CLI for headless Linux servers. Control Spotify playback via terminal using cookie auth (no OAuth callback needed). Perfect for remote servers withou...
openclaw skills install spotify-linuxControl Spotify from headless Linux servers using cookie-based auth. No OAuth callback needed - perfect for remote servers.
The original spotify-player skill by steipete on ClawHub assumes local browser access for cookie import (spogo auth import --browser chrome). On headless Linux servers without a local browser, this doesn't work.
This skill documents the cookie-based workaround - copy 2 browser cookies and you're done. No OAuth, no localhost needed.
# Ubuntu/Debian
sudo apt update && sudo apt install -y golang-go
# Or download latest from https://go.dev/dl/
wget https://go.dev/dl/go1.23.4.linux-amd64.tar.gz
sudo tar -C /usr/local -xzf go1.23.4.linux-amd64.tar.gz
echo 'export PATH=$PATH:/usr/local/go/bin:~/go/bin' >> ~/.bashrc
source ~/.bashrc
go install github.com/steipete/spogo/cmd/spogo@latest
This installs to ~/go/bin/spogo. Add to PATH if needed:
echo 'export PATH=$PATH:~/go/bin' >> ~/.bashrc
source ~/.bashrc
spogo --version
# spogo v0.2.0
Since OAuth requires localhost callback (impossible on remote servers), we use cookie auth instead.
Have the user open DevTools → Application → Cookies → open.spotify.com and copy:
sp_dc - Main auth token (long string, required)sp_t - Device ID (UUID format, required for playback)Create ~/.config/spogo/config.toml:
default_profile = "default"
[profile.default]
cookie_path = "~/.config/spogo/cookies/default.json"
market = "IL"
language = "en"
Create ~/.config/spogo/cookies/default.json:
[
{
"name": "sp_dc",
"value": "USER_SP_DC_VALUE",
"domain": ".spotify.com",
"path": "/",
"expires": "2027-01-01T00:00:00Z",
"secure": true,
"http_only": true
},
{
"name": "sp_t",
"value": "USER_SP_T_VALUE",
"domain": ".spotify.com",
"path": "/",
"expires": "2027-01-01T00:00:00Z",
"secure": false,
"http_only": false
}
]
spogo auth status
# → "Cookies: 2 (file)"
# Search
spogo search track "query"
spogo search track "query" --json --limit 5
# Play
spogo play spotify:track:ID
spogo play # Resume
spogo pause
spogo next / spogo prev
# Devices
spogo device list --json
spogo device set "DEVICE_ID"
# Status
spogo status
spogo status --json
spogo needs an active Spotify session. If no device played recently, you can start one via the browser.
Note: This is optional and only needed when
spogo device listreturns no active devices. It opensopen.spotify.comin the agent's isolated browser profile (not the user's personal browser). The agent only navigates to Spotify and clicks Play — no other browser state is accessed.
browser open https://open.spotify.com/track/TRACK_ID profile=openclaw
Click Play via browser automation
Transfer to target device:
spogo device set "DEVICE_ID"
The Spotify session stays active for hours after playback.
--engine web): Rate limited (429 errors)No active Spotify session. Use browser fallback (see above) to start playback first.
Cookies expired. Get fresh cookies from browser and update the JSON file.
Check spogo device list - playback might be on wrong device. Use spogo device set "DEVICE_ID" to switch.
sp_dc and sp_t are stored locally in ~/.config/spogo/cookies/ — treat them as secrets, never log or share themapi.spotify.com, open.spotify.com)open.spotify.com and click Play. This does NOT extract additional cookies or access other browser statego install from the official steipete/spogo GitHub repository — open source, auditablemarket in config for correct regional availability (IL, US, etc.)