Objective

The following Spotify setup procedure outlines installation steps as provided by spotify.com. Nonetheless, may you encounter some difficulties along the way of the Spotify installation on Debian Stretch, read the appendix below to resolve them.

Requirements

Privileged access to your Debian Stretch system is required.

Difficulty

EASY

Conventions

  • # - requires given command to be executed with root privileges either directly as a root user or by use of sudo command
  • $ - given command to be executed as a regular non-privileged user

Instructions

Include Spotify's repository

First, we need to include Spotify's repository signing key.
# apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys D2C19886
Executing: /tmp/tmp.KNeuare7F9/gpg.1.sh --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys D2C19886
gpg: key 13B00F1FD2C19886: "Spotify Public Repository Signing Key " not changed
gpg: Total number processed: 1
gpg:              imported: 1

The above key will expire on 2017-11-22, thus if expired and no longer available you can list a new Spotify's repository signing key by:
$ gpg --keyserver hkp://keyserver.ubuntu.com --search-key 'Spotify Public Repository Signing Key'
Add Spotify's repository to local sources and run apt-get update:
# echo deb http://repository.spotify.com stable non-free > /etc/apt/sources.list.d/spotify.list
# apt-get update

Install Spotify on Debian Stretch

Finally, we are ready to install Spotify client on Debian Stretch using apt-get comamnd:
#  apt-get install spotify-client
All done. You should now be able to run Spotify from your start menu or from command line:
$ spotify
launch spotify on debian stretch linux
run spotify on debian stretch linux

Appendix

gpg: keyserver receive failed: No dirmngr

You are missing dirmngr binary. Install dirmngr package.
# apt install dirmngr
ERROR:
gpg: failed to start the dirmngr '/usr/bin/dirmngr': No such file or directory
gpg: connecting dirmngr at '/tmp/tmp.t1Mi4lXT6P/S.dirmngr' failed: No such file or directory
gpg: keyserver receive failed: No dirmngr

spotify-client : Depends: libssl1.0.0 but it is not installable

Debian Stretch contains higher version of libssl. Download and install libssl1.0.0 from Debian Jessie repository:
$ wget http://security.debian.org/debian-security/pool/updates/main/o/openssl/libssl1.0.0_1.0.1t-1+deb8u6_amd64.deb
# dpkg -i libssl1.0.0_1.0.1t-1+deb8u6_amd64.deb
ERROR:
The following packages have unmet dependencies:
 spotify-client : Depends: libssl1.0.0 but it is not installable