diff options
| -rw-r--r-- | README.md | 9 | ||||
| -rw-r--r-- | docs/docker.md | 16 | ||||
| -rw-r--r-- | src/slskd/Program.cs | 2 |
3 files changed, 22 insertions, 5 deletions
@@ -50,6 +50,7 @@ docker run -d \ -p 5030:5030 \ -p 5031:5031 \ -p 50300:50300 \ + -e SLSKD_REMOTE_CONFIGURATION=true \ -v <path/to/application/data>:/app \ --name slskd \ slskd/slskd:latest @@ -68,6 +69,8 @@ services: - "5030:5030" - "5031:5031" - "50300:50300" + environment: + - SLSKD_REMOTE_CONFIGURATION=true volumes: - <path/to/application/data>:/app restart: always @@ -75,6 +78,10 @@ services: This command or docker-compose file (depending on your choice) starts a container instance of slskd on ports 5030 (HTTP) and 5031 (HTTPS using a self-signed certificate). slskd begins listening for incoming connections on port 50300 and maps the application directory to the provided path. +Once the container is running you can access the web UI over HTTP on port 5030, or HTTPS on port 5031. The default username and password are `slskd` and `slskd`, respectively. You'll want to change these if the application will be internet facing. + +The `SLSKD_REMOTE_CONFIGURATION` environment variable allows you to modify application configuration settings from the web UI. You might not want to enable this for an internet-facing installation. + You can find a more in-depth guide to running slskd in Docker [here](https://github.com/slskd/slskd/blob/master/docs/docker.md). ### With Binaries @@ -83,7 +90,7 @@ The latest stable binaries can be downloaded from the [releases](https://github. Binaries are shipped as zip files; extract the zip to your chosen directory and run. -An application directory will be created in either `~/.local/share/slskd` (on Linux and macOS) or `%localappdata%/slskd` (on Windows). +An application directory will be created in either `~/.local/share/slskd` (on Linux and macOS) or `%localappdata%/slskd` (on Windows). In the root of this directory the file `slskd.yml` will be created the first time the application runs. Edit this file to enter your credentials for the Soulseek network, and tweak any additional settings using the [configuration guide](https://github.com/slskd/slskd/blob/master/docs/config.md). ## Configuration diff --git a/docs/docker.md b/docs/docker.md index 8aecf2f9..aa11a610 100644 --- a/docs/docker.md +++ b/docs/docker.md @@ -1,12 +1,20 @@ # Running in Docker +You'll need to [install Docker](https://docs.docker.com/get-docker/) first. + +Next, you'll need to make a few choices: + +* The HTTP and/or HTTPS ports for the slskd web UI (defaults 5030 and 5031) +* The port for incoming connections from the Soulseek network (default 50300) +* The directory for the slskd application data + For most users, a quick start will be all that is needed: ```shell docker run -d \ - -p 5030:5030 \ - -p 5031:5031 \ - -p 50300:50300 \ + -p <HTTP port>:5030 \ + -p <HTTPS port>:5031 \ + -p <listen port>:50300 \ -v <path/to/application/data>:/app \ --name slskd \ slskd/slskd:latest @@ -25,6 +33,7 @@ docker run -d \ -p 5030:5030 \ -p 5031:5031 \ -p 50300:50300 \ + -e SLSKD_REMOTE_CONFIGURATION=true \ -v /var/slskd:/app \ -v /home/JohnDoe/Music:/music \ -v /home/JohnDoe/eBooks:/ebooks \ @@ -48,6 +57,7 @@ docker run -d \ -p 5030:5030 \ -p 5031:5031 \ -p 50300:50300 \ + -e SLSKD_REMOTE_CONFIGURATION=true \ -v /var/slskd:/app \ -v /home/JohnDoe/Music:/music \ -v /home/JohnDoe/eBooks:/ebooks \ diff --git a/src/slskd/Program.cs b/src/slskd/Program.cs index 65a42522..5674aa2b 100644 --- a/src/slskd/Program.cs +++ b/src/slskd/Program.cs @@ -815,7 +815,7 @@ namespace slskd // prepend the url base. app.UsePathBase(urlBase); app.UseHTMLRewrite("((\\.)?\\/static)", $"{(urlBase == "/" ? string.Empty : urlBase)}/static"); - app.UseHTMLInjection($"<script>window.urlBase=\"{urlBase};window.port={OptionsAtStartup.Web.Port}=\"</script>", excludedRoutes: new[] { "/api", "/swagger" }); + app.UseHTMLInjection($"<script>window.urlBase=\"{urlBase}\";window.port={OptionsAtStartup.Web.Port}</script>", excludedRoutes: new[] { "/api", "/swagger" }); Log.Information("Using base url {UrlBase}", urlBase); // serve static content from the configured path |
