From 90779a98863f95672841451febbf22b0e119ee41 Mon Sep 17 00:00:00 2001 From: xovi Date: Wed, 3 Dec 2025 12:14:37 +0100 Subject: Added Documentation --- docs/config.md | 2 ++ 1 file changed, 2 insertions(+) (limited to 'docs') diff --git a/docs/config.md b/docs/config.md index 2646dd94..55505111 100644 --- a/docs/config.md +++ b/docs/config.md @@ -809,6 +809,7 @@ Logging of HTTP requests is disabled by default. | Command-Line | Environment Variable | Description | | ----------------- | -------------------------- | ------------------------------------------------- | | `-l\|--http-port` | `SLSKD_HTTP_PORT` | The HTTP listen port | +| `--http-listen-ip-address` | `SLSKD_HTTP_LISTEN_IP_ADDRESS` | The IP address on which to listen for HTTP requests | | `--http-socket` | `SLSKD_HTTP_SOCKET` | The HTTP listen unix domain socket (UDS) path | | `--url-base` | `SLSKD_URL_BASE` | The base url for web requests | | `--content-path` | `SLSKD_CONTENT_PATH` | The path to static web content | @@ -835,6 +836,7 @@ The application can produce a self-signed `.pfx` file and random password using | Command-Line | Environment Variable | Description | | ----------------------- | --------------------------- | -------------------------------------------------------------- | | `-L\|--https-port` | `SLSKD_HTTPS_PORT` | The HTTPS listen port | +| `--https-listen-ip-address` | `SLSKD_HTTPS_LISTEN_IP_ADDRESS` | The IP address on which to listen for HTTPS requests | | `-f\|--force-https` | `SLSKD_HTTPS_FORCE` | Determines whether HTTP requests are to be redirected to HTTPS | | `--https-cert-pfx` | `SLSKD_HTTPS_CERT_PFX` | The path to the X509 certificate .pfx file | | `--https-cert-password` | `SLSKD_HTTPS_CERT_PASSWORD` | The password for the X509 certificate | -- cgit v1.2.3 From 49514db326bef9cf21a1e84f3c1e13934b4c3a9a Mon Sep 17 00:00:00 2001 From: xovi Date: Wed, 3 Dec 2025 12:21:10 +0100 Subject: Corrected markdown tables alignment --- docs/config.md | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'docs') diff --git a/docs/config.md b/docs/config.md index 55505111..c0a545f9 100644 --- a/docs/config.md +++ b/docs/config.md @@ -806,14 +806,14 @@ The content path can be used to force the application to serve static web conten Logging of HTTP requests is disabled by default. -| Command-Line | Environment Variable | Description | -| ----------------- | -------------------------- | ------------------------------------------------- | -| `-l\|--http-port` | `SLSKD_HTTP_PORT` | The HTTP listen port | +| Command-Line | Environment Variable | Description | +| -------------------------- | ------------------------------ | --------------------------------------------------- | +| `-l\|--http-port` | `SLSKD_HTTP_PORT` | The HTTP listen port | | `--http-listen-ip-address` | `SLSKD_HTTP_LISTEN_IP_ADDRESS` | The IP address on which to listen for HTTP requests | -| `--http-socket` | `SLSKD_HTTP_SOCKET` | The HTTP listen unix domain socket (UDS) path | -| `--url-base` | `SLSKD_URL_BASE` | The base url for web requests | -| `--content-path` | `SLSKD_CONTENT_PATH` | The path to static web content | -| `--http-logging` | `SLSKD_HTTP_LOGGING` | Determines whether HTTP requests are to be logged | +| `--http-socket` | `SLSKD_HTTP_SOCKET` | The HTTP listen unix domain socket (UDS) path | +| `--url-base` | `SLSKD_URL_BASE` | The base url for web requests | +| `--content-path` | `SLSKD_CONTENT_PATH` | The path to static web content | +| `--http-logging` | `SLSKD_HTTP_LOGGING` | Determines whether HTTP requests are to be logged | #### **YAML** ```yaml @@ -833,14 +833,14 @@ By default, the application generates a new, self-signed X509 certificate at eac The application can produce a self-signed `.pfx` file and random password using the `--generate-cert` command. -| Command-Line | Environment Variable | Description | -| ----------------------- | --------------------------- | -------------------------------------------------------------- | -| `-L\|--https-port` | `SLSKD_HTTPS_PORT` | The HTTPS listen port | -| `--https-listen-ip-address` | `SLSKD_HTTPS_LISTEN_IP_ADDRESS` | The IP address on which to listen for HTTPS requests | -| `-f\|--force-https` | `SLSKD_HTTPS_FORCE` | Determines whether HTTP requests are to be redirected to HTTPS | -| `--https-cert-pfx` | `SLSKD_HTTPS_CERT_PFX` | The path to the X509 certificate .pfx file | -| `--https-cert-password` | `SLSKD_HTTPS_CERT_PASSWORD` | The password for the X509 certificate | -| `--no-https` | `SLSKD_NO_HTTPS` | Determines whether HTTPS is to be disabled | +| Command-Line | Environment Variable | Description | +| --------------------------- | ------------------------------- | -------------------------------------------------------------- | +| `-L\|--https-port` | `SLSKD_HTTPS_PORT` | The HTTPS listen port | +| `--https-listen-ip-address` | `SLSKD_HTTPS_LISTEN_IP_ADDRESS` | The IP address on which to listen for HTTPS requests | +| `-f\|--force-https` | `SLSKD_HTTPS_FORCE` | Determines whether HTTP requests are to be redirected to HTTPS | +| `--https-cert-pfx` | `SLSKD_HTTPS_CERT_PFX` | The path to the X509 certificate .pfx file | +| `--https-cert-password` | `SLSKD_HTTPS_CERT_PASSWORD` | The password for the X509 certificate | +| `--no-https` | `SLSKD_NO_HTTPS` | Determines whether HTTPS is to be disabled | #### **YAML** ```yaml -- cgit v1.2.3 From dccf744efc462775957879bb8b5e1df8732a21ac Mon Sep 17 00:00:00 2001 From: JP Dillingham Date: Thu, 11 Dec 2025 09:20:16 -0600 Subject: docs --- docs/config.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'docs') diff --git a/docs/config.md b/docs/config.md index c0a545f9..36f57e89 100644 --- a/docs/config.md +++ b/docs/config.md @@ -798,6 +798,8 @@ soulseek: The default HTTP listen port is 5030, but can be anything between 1 and 65535. +The default HTTP IP address is `[::]` which corresponds to any IPv4 or IPv6 IP address; all network interfaces on the host. Specifying an IP address will cause the application to listen only on the specified network interface. Multiple IP addresses can be supplied in a comma-separated list, and both IPv4 and IPv6 formats can be supplied. + A [unix domain socket](https://en.wikipedia.org/wiki/Unix_domain_socket) can be used on both unix-like operating systems and Windows. The specified socket file path must be absolute, and must point to a file that does not exist (slskd will manage it automatically). The URL base option allows the application to operate behind a reverse proxy. Setting a base of "slskd" would make the web UI accessible at `http://:/slskd`. @@ -809,7 +811,7 @@ Logging of HTTP requests is disabled by default. | Command-Line | Environment Variable | Description | | -------------------------- | ------------------------------ | --------------------------------------------------- | | `-l\|--http-port` | `SLSKD_HTTP_PORT` | The HTTP listen port | -| `--http-listen-ip-address` | `SLSKD_HTTP_LISTEN_IP_ADDRESS` | The IP address on which to listen for HTTP requests | +| `--http-listen-ip-address` | `SLSKD_HTTP_IP_ADDRESS` | The IP address on which to listen for HTTP requests | | `--http-socket` | `SLSKD_HTTP_SOCKET` | The HTTP listen unix domain socket (UDS) path | | `--url-base` | `SLSKD_URL_BASE` | The base url for web requests | | `--content-path` | `SLSKD_CONTENT_PATH` | The path to static web content | @@ -819,6 +821,7 @@ Logging of HTTP requests is disabled by default. ```yaml web: port: 5030 + ip_address: "[::]" // any IPv4 or IPv6 address socket: ~ url_base: / content_path: wwwroot @@ -829,6 +832,8 @@ web: The default HTTPS port is 5031, but can be anything between 1 and 65535. +The default HTTPS IP address is `[::]` which corresponds to any IPv4 or IPv6 IP address; all network interfaces on the host. Specifying an IP address will cause the application to listen only on the specified network interface. Multiple IP addresses can be supplied in a comma-separated list, and both IPv4 and IPv6 formats can be supplied. + By default, the application generates a new, self-signed X509 certificate at each startup. If, for whatever reason, a self-signed certificate isn't sufficient, or if the certificate needs to be shared among systems or applications, a certificate `.pfx` and password can be defined. The application can produce a self-signed `.pfx` file and random password using the `--generate-cert` command. @@ -836,7 +841,7 @@ The application can produce a self-signed `.pfx` file and random password using | Command-Line | Environment Variable | Description | | --------------------------- | ------------------------------- | -------------------------------------------------------------- | | `-L\|--https-port` | `SLSKD_HTTPS_PORT` | The HTTPS listen port | -| `--https-listen-ip-address` | `SLSKD_HTTPS_LISTEN_IP_ADDRESS` | The IP address on which to listen for HTTPS requests | +| `--https-ip-address` | `SLSKD_HTTPS_IP_ADDRESS` | The IP address on which to listen for HTTPS requests | | `-f\|--force-https` | `SLSKD_HTTPS_FORCE` | Determines whether HTTP requests are to be redirected to HTTPS | | `--https-cert-pfx` | `SLSKD_HTTPS_CERT_PFX` | The path to the X509 certificate .pfx file | | `--https-cert-password` | `SLSKD_HTTPS_CERT_PASSWORD` | The password for the X509 certificate | @@ -848,6 +853,7 @@ web: https: disabled: false port: 5031 + ip_address: "[::]" // any IPv4 or IPv6 address force: false certificate: pfx: ~ -- cgit v1.2.3 From 3ec80e2cec7ebfda86493d76f3af0932197a5c98 Mon Sep 17 00:00:00 2001 From: JP Dillingham Date: Fri, 12 Dec 2025 09:36:02 -0600 Subject: docs --- docs/config.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'docs') diff --git a/docs/config.md b/docs/config.md index 36f57e89..40f186f6 100644 --- a/docs/config.md +++ b/docs/config.md @@ -870,7 +870,7 @@ The JWT TTL option determines how long issued JWTs are valid, defaulting to 7 da API keys can be configured to allow for secure communication without requiring the caller to obtain a JWT by signing in with a username and password. Each key must be given a name and a key with a length between 16 and 255 characters (inclusive). Callers may then supply one of the configured keys in the `X-API-Key` header when making web requests. Remember that API keys are secrets, so keep them safe. -You can generate a random, 32 bit API key by starting the application with `-k` or `--generate-secret` at the command line. +You can generate a random, 32 bit API key by starting the application with `--generate-secret` at the command line. An optional comma separated list of [CIDRs](https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) can be defined for each key, which will restrict usage of the key to callers with a remote IP address that falls within one of the defined CIDRs. The default CIDR list for each key is `0.0.0.0/0,::0`, which applies to any IP address (IPv4 or IPv6). @@ -1306,6 +1306,6 @@ The application can be run in "command mode", causing it to execute a command an | -------------------------------- | --------------------------------------------------- | | `-v\|--version` | Display the current application version | | `-h\|--help` | Display available command-line arguments | -| `-e\|--envars` | Display available environment variables | -| `-g\|--generate-cert` | Generate an X509 certificate and password for HTTPS | -| `-k\|--generate-secret ` | Generate a random secret of the specified length | +| `--envars` | Display available environment variables | +| `--generate-cert` | Generate an X509 certificate and password for HTTPS | +| `--generate-secret ` | Generate a random secret of the specified length | -- cgit v1.2.3 From 804f661ab5d0e3b6ffdfd6a5b38959ac1b1690be Mon Sep 17 00:00:00 2001 From: JP Dillingham Date: Sat, 13 Dec 2025 16:11:45 -0600 Subject: docs for API keys --- docs/config.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'docs') diff --git a/docs/config.md b/docs/config.md index 40f186f6..6ba5bd2a 100644 --- a/docs/config.md +++ b/docs/config.md @@ -864,10 +864,16 @@ web: Authentication for the web UI (and underlying API) is enabled by default, and the default username and password are both `slskd`. Changing both the username and password during the initial configuration is highly recommended. +### JWT (Json Web Token) + +JWTs are used to authenticate the UI, and are generated by making an API call and supplying a username and password. + By default, a random JWT secret key is generated at each start. It is convenient and secure, but restarting the application will invalidate any issued JWTs, causing users to sign in again. To avoid this, supply a custom secret at least 16 characters in length. Note that the secret can be used to generate valid JWTs for the application, so keep this value secret. The JWT TTL option determines how long issued JWTs are valid, defaulting to 7 days. +### API Keys + API keys can be configured to allow for secure communication without requiring the caller to obtain a JWT by signing in with a username and password. Each key must be given a name and a key with a length between 16 and 255 characters (inclusive). Callers may then supply one of the configured keys in the `X-API-Key` header when making web requests. Remember that API keys are secrets, so keep them safe. You can generate a random, 32 bit API key by starting the application with `--generate-secret` at the command line. @@ -876,6 +882,15 @@ An optional comma separated list of [CIDRs](https://en.wikipedia.org/wiki/Classl A common use case for CIDR filtering might be to restrict API access to clients within your home network. Assuming your network uses the common `192.168.1.x` addressing, you could specify a `cidr` of `192.168.1.0/24`, which would apply to any IP between `192.168.1.1` and `192.168.1.254`, inclusive. +An optional 'primary' API key can be configured by passiing it via `-k` or `--api-key` on the command line, or by setting the `SLSKD_API_KEY` environment variable. As with other API keys, a role and list of CIDRs can be supplied, but because the command line and environment variables are limited to a simple string, the role and CIDRs must be passed via tuples separated by semicolons: + +``` +role=ReadOnly;cidr=0.0.0.0/0,::/0;<16 to 255 character string> +``` + +By default, the role associated with the 'primary' API key is `Administrator` (other API keys default to `ReadOnly`) and list of CIDRs is `0.0.0.0/0,::0` (same as other API keys). + +#### Cautions Note that CIDR filtering may not work as expected behind a reverse proxy, ingress controller, or load balancer, because the remote IP address will be that of the device that's handling ingress. This application doesn't support the `X-Forwarded-For` header (or anything like it) because a bad actor can easily fake it. If you wish to use CIDR filtering in this scenario, you'll need to do it at the point of ingress to your network. Please also note that using API key authentication without HTTPS is **NOT RECOMMENDED**. API keys are sent in HTTP headers (and in the case of SignalR, in query parameters) and will be easily accessible to anyone eavesdropping on the network. This is a risk with JWTs as well, but JWTs expire and API keys don't. If you choose to use API keys over plain HTTP, seriously consider using CIDR filtering. @@ -885,6 +900,7 @@ Please also note that using API key authentication without HTTPS is **NOT RECOMM | `-X\|--no-auth` | `SLSKD_NO_AUTH` | Determines whether authentication is to be disabled | | `-u\|--username` | `SLSKD_USERNAME` | The username for the web UI | | `-p\|--password` | `SLSKD_PASSWORD` | The password for the web UI | +| `-k\|--api-key` | `SLSKD_API_KEY` | The primary API key | | `--jwt-key` | `SLSKD_JWT_KEY` | The secret key used to sign JWTs | | `--jwt-ttl` | `SLSKD_JWT_TTL` | The TTL (duration) of JWTs, in milliseconds | -- cgit v1.2.3 From 0d548ed62517ed1807d3c13f96772f33a9a3c1d1 Mon Sep 17 00:00:00 2001 From: JP Dillingham Date: Sat, 13 Dec 2025 16:33:37 -0600 Subject: warning about ipv6 --- docs/config.md | 3 +++ 1 file changed, 3 insertions(+) (limited to 'docs') diff --git a/docs/config.md b/docs/config.md index 6ba5bd2a..1ab7daec 100644 --- a/docs/config.md +++ b/docs/config.md @@ -891,6 +891,9 @@ role=ReadOnly;cidr=0.0.0.0/0,::/0;<16 to 255 character string> By default, the role associated with the 'primary' API key is `Administrator` (other API keys default to `ReadOnly`) and list of CIDRs is `0.0.0.0/0,::0` (same as other API keys). #### Cautions + +When using CIDR filtering, you *must* supply both IPv4 and IPv6 ranges. + Note that CIDR filtering may not work as expected behind a reverse proxy, ingress controller, or load balancer, because the remote IP address will be that of the device that's handling ingress. This application doesn't support the `X-Forwarded-For` header (or anything like it) because a bad actor can easily fake it. If you wish to use CIDR filtering in this scenario, you'll need to do it at the point of ingress to your network. Please also note that using API key authentication without HTTPS is **NOT RECOMMENDED**. API keys are sent in HTTP headers (and in the case of SignalR, in query parameters) and will be easily accessible to anyone eavesdropping on the network. This is a risk with JWTs as well, but JWTs expire and API keys don't. If you choose to use API keys over plain HTTP, seriously consider using CIDR filtering. -- cgit v1.2.3 From 1e0eb94a16fd6b8a3204bc14e11c0c5d47617d0c Mon Sep 17 00:00:00 2001 From: JP Dillingham Date: Sat, 13 Dec 2025 16:35:06 -0600 Subject: on second thought, remove caution --- docs/config.md | 2 -- 1 file changed, 2 deletions(-) (limited to 'docs') diff --git a/docs/config.md b/docs/config.md index 1ab7daec..3efe2e8a 100644 --- a/docs/config.md +++ b/docs/config.md @@ -892,8 +892,6 @@ By default, the role associated with the 'primary' API key is `Administrator` (o #### Cautions -When using CIDR filtering, you *must* supply both IPv4 and IPv6 ranges. - Note that CIDR filtering may not work as expected behind a reverse proxy, ingress controller, or load balancer, because the remote IP address will be that of the device that's handling ingress. This application doesn't support the `X-Forwarded-For` header (or anything like it) because a bad actor can easily fake it. If you wish to use CIDR filtering in this scenario, you'll need to do it at the point of ingress to your network. Please also note that using API key authentication without HTTPS is **NOT RECOMMENDED**. API keys are sent in HTTP headers (and in the case of SignalR, in query parameters) and will be easily accessible to anyone eavesdropping on the network. This is a risk with JWTs as well, but JWTs expire and API keys don't. If you choose to use API keys over plain HTTP, seriously consider using CIDR filtering. -- cgit v1.2.3 From cb31a68a6e7f6d195281a7a480af539ddd945688 Mon Sep 17 00:00:00 2001 From: JP Dillingham Date: Fri, 9 Jan 2026 08:43:38 -0600 Subject: update retention docs --- docs/config.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'docs') diff --git a/docs/config.md b/docs/config.md index 3efe2e8a..c47235af 100644 --- a/docs/config.md +++ b/docs/config.md @@ -950,7 +950,7 @@ By default, most things created by the application are retained indefinitely; th Completed searches can be configured to be removed from the UI and 'hard' deleted from the database. It's a good idea to set this to something relatively short, as old searches have diminishing value as they age and the records contain a lot of data. -Transfers can be configured to be removed from the UI after they are complete by specifying retention periods for uploads and downloads separately, and by transfer state; succeeded, errored, and cancelled. +Transfers can be configured to be removed from the UI after they are complete by specifying retention periods for uploads and downloads separately, and by transfer state; succeeded, errored, and cancelled. The 'failed' setting can be used instead of 'errored' and 'cancelled' to clean up all transfers that were not successful, regardless of reason. Files (on disk) can be configured to be deleted after the age of their last access time exceeds the configured time. Completed and incomplete files can be configured separately. @@ -967,10 +967,12 @@ retention: succeeded: 1440 # 1 day errored: 30 cancelled: 5 + failed: 180 download: succeeded: 1440 # 1 day errored: 20160 # 2 weeks cancelled: 5 + failed: 180 files: complete: 20160 # 2 weeks incomplete: 43200 # 30 days -- cgit v1.2.3