Introducing Slack FM

March 11, 20202 minutes

Slack FM is a small open source side project I spent a few days working on that syncs your now playing music with your Slack status. It's inspired by the old days where I would sync my now playing music with my MSN Messenger account.

This post is only a short summary about how it works and how to set it up. For more information or details about how everything hangs together or all configurable settings, see the Slack FM repo on GitHub.

How it works

Every minute Slack FM will query both your Slack and profiles to determine whether or not your status on Slack should be updated under a few conditions:

  • you are not "away" on Slack
  • a custom status hasn't been set on Slack
  • something is now playing on
  • the time is between 8am and 5pm (configurable)
  • it's not a weekend (configurable)

How to set it up

First, you'll need a account and part of a Slack workspace where you're allowed to create Legacy Tokens for your account.

1. Scrobble your music to

For desktop music players or streaming services has this great page detailing some options you have on whatever platform you're using.

For web clients I use Web Scrobbler for listening to music in the browser from services like YouTube Music, YouTube itself, or the web variants of Spotify or Tidal.

2. Run an instance

This part might be the tricky bit for some but the easiest way to run your own instance of Slack FM is to use Docker. Below is a typical docker-compose.yml file that you might use to run this on your own machine.

version: '3.7'
    image: jckcthbrt/slack-fm:latest
    container_name: slack_fm
    restart: always
      TZ: 'Australia/Melbourne'      SLACK_TOKEN: 'xoxp-123-123-123-123'      LAST_FM_KEY: 'abcdefghijklmnopqrstuvwxyz123'      LAST_FM_USERNAME: 'jckcthbrt'

Simply swap out the highlighted lines with the details you retrieved above and run docker-compose up -d. This will pull the latest image and start the service.

How to contribute

Slack FMs code is hosted in this GitHub repo and is completely free and open source software. Every commit should adhere to the conventional commits specification to ensure that releases are created orrectly and subsequently built and pushed to DockerHub.

If you have any feature requests or have found a bug in the code, please feel free to open an issue.

This is a preview of a simpler page design that I'm working on over the next little bit. I've finally added a (click it!) but there's still a few pages left to be converted so don't worry if things don't look quite right just yet 🙏

Content on blog pages use the CC-BY-SA license. The source code and notes use the MIT license. Unsure? Mention me on Mastodon.