---
title: Last.fm
description: Last.fm (Source)
toc_min_heading_level: 2
toc_max_heading_level: 5
---

import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
import CodeBlock from '@theme/CodeBlock';
import LastfmConfig from '!!raw-loader!@site/../config/lastfm.json.example';

This Source **monitors your Last.fm scrobble history** and re-scrobbles new activity to configured [Clients.](/configuration/clients)

:::tip[Other Uses]

* To **scrobble to** Last.fm/Libre.fm, create a [Last.fm (Client)](/configuration/clients/lastfm)
* To accept scrobbles from outside applications as if multi-scrobbler was Last.fm, create a [Last.fm (Endpoint)](/configuration/sources/lastfm-endpoint)

:::

To configure this Source use the same registration instructions and configuration data shown in [Last.fm (Client)](/configuration/clients/lastfm) with the difference being `"configureAs": "source"` defined in the File/AIO configuration below.

## Configuration

<Config config="LastfmSourceConfig" fileContent={LastfmConfig} name="lastfm">
        | Environmental Variable       | Required? | Default                                 | Description                                                                   |
        | ---------------------------- | --------- | --------------------------------------- | ----------------------------------------------------------------------------- |
        | `SOURCE_LASTFM_API_KEY`      | Yes       |                                         | Api Key from your API Account                                                 |
        | `SOURCE_LASTFM_SECRET`       | Yes       |                                         | Shared secret from your API Account                                           |
        | `SOURCE_LASTFM_REDIRECT_URI` | No        | `http://localhost:9078/lastfm/callback` | Url to use for authentication. Must include `lastfm/callback` somewhere in it |
        | `SOURCE_LASTFM_SESSION`      | No        |                                         | Session id. Will be generated by authentication flow if not provided.         |
</Config>