[GH-ISSUE #220] No devices found when running spotifyd as a service #108

Closed
opened 2026-02-28 14:47:05 +03:00 by kerem · 2 comments
Owner

Originally created by @jp1995 on GitHub (Jan 23, 2020).
Original GitHub issue: https://github.com/Rigellute/spotify-tui/issues/220

Hi. Strange behavior, probably user error but I'd like to sort it out and I'm out of ideas. Maybe you can help.

When I run spotifyd --no-daemon everything works perfectly.
When I run it as a service, spt finds no devices.

systemctl output
spotifyd.service loaded active running A spotify playing daemon

spotifyd.service file

 [Unit]
Description=A spotify playing daemon
Documentation=https://github.com/Spotifyd/spotifyd
Wants=sound.target
After=sound.target
Wants=network-online.target
After=network-online.target

[Service]
ExecStart=/usr/bin/spotifyd --no-daemon
Restart=always
RestartSec=12

[Install]
WantedBy=default.target

spotifyd configuration file, just in case

[global]
# Your Spotify account name.
username = this

# Your Spotify account password.
password = that

# If set to true, `spotifyd` tries to look up your
# password in the system's password storage.
#
# This is an alternative to the `password` field. Both
# can't be used simultaneously.
use_keyring = false

# The audio backend used to play the your music. To get
# a list of possible backends, run `spotifyd --help`.
backend = pulseaudio

# The alsa audio device to stream audio to. To get a
# list of valid devices, run `aplay -L`,
# device = default

# The alsa control device. By default this is the same
# name as the `device` field.
control = default

# The alsa mixer used by `spotifyd`.
mixer = PCM

# The volume controller. Each one behaves different to
# volume increases. For possible values, run
# `spotifyd --help`.
volume_controller = alsa

# A command that gets executed in your shell after each song changes.
on_song_change_hook = command_to_run_on_playback_events

# The name that gets displayed under the connect tab on
# official clients. Spaces are not allowed!
device_name = Kappa_keepo_123

# The audio bitrate. 96, 160 or 320 kbit/s
bitrate = 320

# The director used to cache audio data. This setting can save
# a lot of bandwidth when activated, as it will avoid re-downloading
# audio files when replaying them.
#
# Note: The file path does not get expanded. Environment variables and
# shell placeholders like $HOME or ~ don't work!
cache_path = cache_directory

# If set to true, audio data does NOT get cached.
no_audio_cache = true

# If set to true, enables volume normalisation between songs.
volume_normalisation = true

# The normalisation pregain that is applied for each song.
normalisation_pregain = -10

# The port `spotifyd` uses to announce its service over the network.
zeroconf_port = 1234

# The proxy `spotifyd` will use to connect to spotify.
# proxy = http://proxy.example.org:8080
Originally created by @jp1995 on GitHub (Jan 23, 2020). Original GitHub issue: https://github.com/Rigellute/spotify-tui/issues/220 Hi. Strange behavior, probably user error but I'd like to sort it out and I'm out of ideas. Maybe you can help. When I run `spotifyd --no-daemon` everything works perfectly. When I run it as a service, spt finds no devices. systemctl output `spotifyd.service loaded active running A spotify playing daemon ` spotifyd.service file ``` [Unit] Description=A spotify playing daemon Documentation=https://github.com/Spotifyd/spotifyd Wants=sound.target After=sound.target Wants=network-online.target After=network-online.target [Service] ExecStart=/usr/bin/spotifyd --no-daemon Restart=always RestartSec=12 [Install] WantedBy=default.target ``` spotifyd configuration file, just in case ``` [global] # Your Spotify account name. username = this # Your Spotify account password. password = that # If set to true, `spotifyd` tries to look up your # password in the system's password storage. # # This is an alternative to the `password` field. Both # can't be used simultaneously. use_keyring = false # The audio backend used to play the your music. To get # a list of possible backends, run `spotifyd --help`. backend = pulseaudio # The alsa audio device to stream audio to. To get a # list of valid devices, run `aplay -L`, # device = default # The alsa control device. By default this is the same # name as the `device` field. control = default # The alsa mixer used by `spotifyd`. mixer = PCM # The volume controller. Each one behaves different to # volume increases. For possible values, run # `spotifyd --help`. volume_controller = alsa # A command that gets executed in your shell after each song changes. on_song_change_hook = command_to_run_on_playback_events # The name that gets displayed under the connect tab on # official clients. Spaces are not allowed! device_name = Kappa_keepo_123 # The audio bitrate. 96, 160 or 320 kbit/s bitrate = 320 # The director used to cache audio data. This setting can save # a lot of bandwidth when activated, as it will avoid re-downloading # audio files when replaying them. # # Note: The file path does not get expanded. Environment variables and # shell placeholders like $HOME or ~ don't work! cache_path = cache_directory # If set to true, audio data does NOT get cached. no_audio_cache = true # If set to true, enables volume normalisation between songs. volume_normalisation = true # The normalisation pregain that is applied for each song. normalisation_pregain = -10 # The port `spotifyd` uses to announce its service over the network. zeroconf_port = 1234 # The proxy `spotifyd` will use to connect to spotify. # proxy = http://proxy.example.org:8080 ```
kerem closed this issue 2026-02-28 14:47:05 +03:00
Author
Owner

@jp1995 commented on GitHub (Jan 23, 2020):

Well, initially my spotifyd.service file was in /etc/systemd/system. I removed the file, disabled and stopped the service. Then I put the file to /etc/systemd/user, enabled and started it with the --user flag and my issue is solved.

I do not know if this is intended behaviour but I'll close the issue since I don't have one anymore :)

All the best.

<!-- gh-comment-id:577631645 --> @jp1995 commented on GitHub (Jan 23, 2020): Well, initially my spotifyd.service file was in /etc/systemd/system. I removed the file, disabled and stopped the service. Then I put the file to /etc/systemd/user, enabled and started it with the --user flag and my issue is solved. I do not know if this is intended behaviour but I'll close the issue since I don't have one anymore :) All the best.
Author
Owner

@lowercasename commented on GitHub (Apr 9, 2020):

@jp1995 thank you, this solved the same issue for me too!

<!-- gh-comment-id:611268472 --> @lowercasename commented on GitHub (Apr 9, 2020): @jp1995 thank you, this solved the same issue for me too!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/spotify-tui#108
No description provided.