slskd - a powerful p2p file sharing tool

· cenotaph's docs
slskd is the best web-accessible option for the soulseek network


Most Soulseek clients aren't suited well to being remotely connected to- slskd is the exception, but can sometimes be confusing to configure when you're doing it for the first time. Herein, I hope to both help you get set up and also to clarify things so you understand what you're doing and can easily maintain your system later.


slskd webui

An example of my demo slskd instance dashboard


Soulseek is a network of peer to peer file sharing clients with a built-in (but entirely optional) IRC element. While initially created for sharing audio files, basically any type of file can be used. This guide is technically a "Part 2" to my guide on setting up a Navidrome music streaming server with a beets sidecar for cleaning up metadata, and I think slskd is most useful when paired with those, but it can also be read entirely independently if you just want to set up slskd.

There are a few different options for clients, most notably the default client and Nicotine+. These are both excellent options if you are running it locally on your desktop. However, if you'd like to instead be connecting to a webui on a central server that handles the downloads as you would for something like my qbit+gluetun guide, then those options won't work so well. There are technically docker images available for them, but they aren't true web interfaces. They use a fake desktop environment that is running the same version of those clients that you would download for your desktop. While this can work, they are not built with being exposed to the internet in mind and are more resource-hungry for the server side than a dedicated web client would be.

Enter slskd. Unlike the other clients available, slskd is a daemon with a purpose-built web interface and is specifically intended to be able to be exposed to the internet. This makes it more secure, more lightweight, and a better experience if you'd like to access the soulseek client remotely through something like Pangolin.

Like most of my guides, we're going to be using Docker Compose. I generally prefer it because it allows you to handle configuration and updating of a large variety of services through a few easily digestible .yml files. If you don't have docker and docker-compose already set up, I don't see a reason to reinvent the wheel so I'll direct you to docker's own docker engine guide and docker compose guide before continuing, as those will be prerequisites for the steps to follow.


Before Starting

Security

Because you cannot control the usernames or filenames/content in other people's share directories, I strongly recommend that a VPN is used when using the Soulseek network. The VPN increases your security in two ways: it encrypts the data which makes what you browse private from your Internet Service Provider, and it also conceals your IP so your rough location isn't exposed to every random person you connect to.

For an easy method of putting slskd behind a VPN, I prefer gluetun. Steps on how to set that up with a P2P client behind it can be found in my qbit + gluetun guide. All of the steps to include slskd are the same as for qbit because they perform similar but distinct functions. Just be sure to move the ports section of the docker compose file (to follow) up into the gluetun container, like we de for the qbit ports in that guide. If you've already completed the qbit+gluetun guide, slskd can be added to that docker compose to run both off of the same gluetun continer.

Configuration Hierarchy

Before getting into the nitty-gritty of our configuration, it's important to clarify a common point of confusion with slskd. There are four discrete places where you can declare your configuration options for this software:

Environment variables are the variables we set for slskd to use as it starts up, and they're defined either in your docker compose file under the "environment" section or in a .env file if you've set one up.

The YAML configuration file is a file normally generated on first run, and unless you've set a specific place for it to be mounted in your compose file, it will be found in the folder you've set to be the /app folder in the volumes: section of your docker compose file.

Docker command line arguments are arguments you add to the command line to launch the docker container. If you're using a web interface like dockge or arcane you may not encounter these, but they are a way of configuring docker by passing variables alongside the command you would use to start your docker stack. If you're managing your docker via CLI then you likely already use these.

Run-time overlay refers to adjusting options in slskd via an API call. This can only be done with a more limited subset of the config options, but must first be enabled. I don't use these so I'm not as familiar with them, but they follow the OpenAPI standard. By default this is blocked for security reasons and must be enabled by setting SLSKD_REMOTE_CONFIGURATION to true.

In order to prevent conflicts between these four ways of configuring, they have a hierarchy in which they are applied:

Default Values < Environment Variables < YAML Configuration File < Command Line Arguments < Run-Time Overlay

What this means is that something defined in the YAML config file will supercede that same thing defined in the environment variables of the docker compose. The highest "priority" configuration is what is done on the fly with the API, and the lowest "priority" is the default values.

It should, however, be noted that some of the more granular settings like group-based speed limits can only be configured using the config file. I'll note any of these when I talk about them in the configuration section.


The Compose File

services:
  slskd:
    image: slskd/slskd
    container_name: slskd
    ports:
      - "5030:5030"
      - "5031:5031"
      - "50300:50300"
    user: 1000:1000
    environment:
      - SLSKD_REMOTE_CONFIGURATION=false
      - SLSKD_USERNAME=webUI_username
      - SLSKD_PASSWORD=webUI_password
      - SLSKD_SLSK_USERNAME=username_for_soulseek
      - SLSKD_SLSK_PASSWORD=password_for_soulseek
      - SLSKD_SHARED_DIR=/file-share
      - SLSKD_MY_API_KEY=$Your_Api_Key_Here
      - SLSKD_UMASK=022
      - SLSKD_DOWNLOADS_DIR=/complete
      - SLSKD_INCOMPLETE_DIR=/incomplete
    volumes:
      - /home/pacmondo/docker/data/slskd:/app
      - /data/media/fileshare:/file-share
      - /data/soulseek-downloads/downloading:/incomplete
      - /data/soulseek-downloads/complete:/complete
    restart: unless-stopped

Now, in this example I've thrown in a collection of some of the configuration options you likely want to use in the environment variable section. If you are configuring slskd using the config file, any of the "SLSKD_" environment vars are not necessary. If you are not including any environment variables, then you should comment out the environment: section of the compose by putting a # in front of it or just remove the section entirely.

I'll briefly go through the sections of our compose file:


Configuration

slskd is immensely configurable, so much so that it can be a little overwhelming. To make this section more digestible, I'm going to separate it into two sub-sections. Subsection 1 is necessary configuration. Anything less than this and your slskd may not run. Subsection 2 are the values that I personally like to have/recommend having set.

The full list of configuration options can be found here and an example slskd.yaml file here.

1: Minimum Configuration

Those are the minimum config values I would recommend setting for running slskd. If you don't care about the specifics like upload speed limits, data upload limits, or peer filtering, you can get started now. Otherwise, keep reading.

2: Additional recommended configuration


Connectability

If you want to have the most available peers to connect to (which generally you do, because this gives you more file shares to search and more content available to you) then you are going to want to have your Soulseek listen port (by default 50300) port forwarded. While you can do this port forwarding on your local router if you aren't using a VPN, I generally advise against opening up your home firewall in this way because it weakens your network security more than is neccessary.

The reason you want that port to be forwarded is that for a peer to peer connection to be made, at least one of the two peers connecting needs to have a port open. If you don't have a port forwarded, then you will only be able to connect to users that do. If you do have that listen port forwarded, you'll be able to connect to anybody and have much better success when searching for more obscure content because you can "cast a wider net".

Not all VPNs will support port forwarding, but gluetun supports all of them so if your provider does support it (for example AirVPN) then you will be able to set it up using the same strategies outlined in my qbit + gluetun guide.

If you don't care about your IP being directly tied to your identity but also don't want to open a hole in your LAN by port forwarding on your local router, another method to achieve this connectability is by using a "raw" TCP resource in Pangolin. All this does is pass the traffic on a particular port from the VPS your Pangolin instance is installed on through the wireguard tunnel to your server. Be aware that direct passthrough like this does not benefit from the authentication wall your Pangolin instance normally provides for resources so you are relying on CrowdSec entirely for security if it is set up. If you haven't already set up Pangolin but like the sound of it, check out my guide on setting up Pangolin.


With that, you should have all the information you need to launch slskd, connect to the web UI at your server IP + port 5030 (for example http://192.168.50.69:5030), replacing the IP with your server's, and get poking around.

As always, if you have questions, I'll help you the best I can. You can message me in my signal chat.

Otherwise, have fun with Soulseek!