Skip to content

A tiny self-hosted service that automatically updates your Slack status from your profile.


Notifications You must be signed in to change notification settings


Repository files navigation

Travis CI Docker Pulls
slack-fm - Self-hosted service to sync with your Slack status | Product Hunt Embed


Slack-fm is a tiny self-hosted service that automatically updates your Slack status from your profile. It updates your Slack status when all the following conditions are met:

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

To clear the status it will search for the now playing tracks duration and use that as the status expiration time. If there is no duration information it defaults to a 10 minute expiration (configurable).

It looks like this:

Slack Preview


  1. API key (get one here)
  2. username (this is probably your own username!)
  3. Slack "legacy" token (get one here)


All configuration is available via environment variables. Values without defaults are required.

Variable Default Description
LAST_FM_KEY Access to data
LAST_FM_USERNAME Which user to get track info for
SLACK_TOKEN Personal "legacy" token for updating your Slack status
SLACK_EMOJI :headphones: Specify which emoji to use in the status
SLACK_SEPARATOR Specify which character to use as a separator between the track name and artist
TZ UTC Set the timezone
ACTIVE_HOURS_START 8 The hour of the day to start updating your Slack status
ACTIVE_HOURS_END 18 The hour of the day to stop updating your Slack status
UPDATE_INTERVAL 1 The time in minutes to wait until updating your Slack Status
UPDATE_WEEKENDS undefined Provide any value to enable status updates during the weekend
UPDATE_EXPIRATION 10 The time in minutes to use as a default status expiration length
SENTRY_DSN undefined Optionally provide a Sentry DSN to enable error reporting
ENABLE_LOGGING undefined Enable verbose console output


I designed this to be easily self hosted, just use the Docker image! It's automatically built and versioned on Docker Hub based on GitHub activity.

Docker run

docker run \

Docker compose

version: '3.7'
    image: jckcthbrt/slack-fm:latest
    container_name: slack_fm
    restart: unless-stopped
docker-compose up


This should be relatively simple to set up and run, all that's required is Node v12 and some environment variables.

  1. Fork this repository and clone your version
  2. Install dependencies with npm install
  3. Run the tests with npm test
  4. Set up your environment variables as above (direnv is great for this)
  5. Start the app locally with npm start
  6. Commit and push your changes then submit a PR back to this repository