sidebar_position | title |
---|---|
1 |
Overview |
After installation see service.md to configure multi-scrobbler to run automatically in the background.
Clone this repository somewhere and then install from the working directory
git clone https://github.com/FoxxMD/multi-scrobbler.git .
cd multi-scrobbler
nvm use # optional, to set correct Node version
npm install
npm run build
npm run start
During building if you encounter an error like: Your current platform "XXX" and architecture "XXX" combination is not yet supported by the native Rollup build.
Modify overrides
in package.json
to use @rollup/wasm-node
as a drop-in replacement for rollup:
"overrides": {
"spotify-web-api-node": {
"superagent": "$superagent"
}
"vite": {
"rollup": "npm:@rollup/wasm-node@^4.9.6"
}
}
See this issue for more detail.
- The web UI and API is served on port
9078
. This can be modified using thePORT
environmental variable.
Using file-based configuration
npm run start
Using env-based configuration
SPOTIFY_CLIENT_ID=yourId SPOTIFY_CLIENT_SECRET=yourSecret MALOJA_URL="http://domain.tld" node src/index.js
You must have Flatpak installed on your system.
flatpak install flathub io.github.foxxmd.multiscrobbler
Note: Flatpak users have experienced issues when using multi-scrobbler as a long-running process. Due to the relative difficulty in debugging issues with flatpak installations it is recommended:
- to use a Docker installation if possible or
- only if you need access to host-level resources like dbus for MPRIS and cannot run a nodejs installation
Using file-based configuration
The config directory for multi-scrobbler as a flatpak can be found under /home/YourUser/.var/app/io.github.foxxmd.multiscrobbler/config
flatpak run io.github.foxxmd.multiscrobbler
Using env-based configuration
There are a few options for running flatpak applications with temporary or permanent environmental variables.
flatpak run --env=SPOTIFY_CLIENT_ID=yourId --envSPOTIFY_CLIENT_SECRET=yourSecret --env=MALOJA_URL="http://domain.tld" io.github.foxxmd.multiscrobbler
Cross-platform images are built for x86 (Intel/AMD) and ARM64 (IE Raspberry Pi)
docker.io/foxxmd/multi-scrobbler:latest
ghcr.io/foxxmd/multi-scrobbler:latest
Or use the provided docker-compose.yml after modifying it to fit your configuration.
Recommended configuration steps for docker or docker-compose usage:
You must bind a host directory into the container for storing configurations and credentials. Otherwise, these will be lost when the container is updated.
- Using
-v
method for docker:-v /path/on/host/config:/config
- Using docker-compose:
- /path/on/host/config:/config
If you are using a bridge network (default docker setup) you must map a port to the container in order to access the dashboard and use MS with some sources (Plex, Jellyfin).
The default container port is 9078
. To map container to host port:
- With docker:
-p 9078:9078
(first port is the port on the host to use) - With docker-compose:
- "9078:9078"
Optionally, when
- using a Source or Client that has a "Redirect URI" that you have not explicitly defined
- and
- using a bridge network or
- installing MS on a different machine than the one used to view the dashboard
set the Base URL as the IP of the host machine. (This is the IP you would use to view the dashboard in a browser)
- With docker:
-e BASE_URL="http://hostMachineIP"
(first port is the port on the host to use) - With docker-compose: see comments in docker-compose.yml
- (Optionally) set the timezone for the container using the environmental variable
TZ
(docker) (docker-compose)
If you are
- using rootless containers with Podman
- running docker on MacOS or Windows
this DOES NOT apply to you.
If you are running Docker on a Linux Host you must specify user:group
permissions of the user who owns the configuration directory on the host to avoid docker file permission problems. These can be specified using the environmental variables PUID and PGID.
To get the UID and GID for the current user run these commands from a terminal:
id -u
-- prints UIDid -g
-- prints GID
If you encounter networking issues like:
- sporadic timeouts (
ETIMEDOUT
) without a pattern - DNS errors (
EAI_AGAIN
) that do no occur consistently - Failures to reach a host that was previously fine (
EHOSTUNREACH
)
there may be an issue with the underlying docker image OS (alpine) that may be solved by switching to a different image. Try switching to a *-debian
variant tag (only available for x86/x64 hosts) to see if this resolves your issue. IE multi-scrobbler:latest-debian
or multi-scrobbler:develop-debian
If installing on a different machine make sure all redirect URIs are defined or that you have set a Base URL.
Using env-based configuration
docker run -e "SPOTIFY_CLIENT_ID=yourId" -e "SPOTIFY_CLIENT_SECRET=yourSecret" -e "MALOJA_URL=http://domain.tld" -e "MALOJA_API_KEY=1234" -e "PUID=1000" -e "PGID=1000" -p 9078:9078 -v /path/on/host/config:/config foxxmd/multi-scrobbler
Using file-based configuration
docker run -e "PUID=1000" -e "PGID=1000" -p 9078:9078 -v /path/on/host/config:/config foxxmd/multi-scrobbler
See the docker-compose.yml file for how to use with docker-compose.