Comprehensive guide for setting up SlackONOS using the web-based setup wizard.
SlackONOS uses a web-based setup wizard that makes configuration easy. The wizard guides you through all necessary steps and validates your configuration automatically.
Before starting, make sure you have:
- ✅ Node.js installed (v18+ recommended)
- ✅ A Sonos speaker with Spotify configured
- ✅ Slack workspace admin access (for creating Slack app)
- ✅ Spotify Developer account (free)
- ✅ Discord Developer account (optional, for Discord support)
# Clone or download the repository
cd SlackONOS
# Install dependencies
npm install
# Start SlackONOS
node index.jsYou should see:
[info] Starting SlackONOS...
[info] 📻 HTTP server listening on port 8181
[info] Setup wizard: http://YOUR_IP:8181/setup
Open your browser and navigate to:
- Local setup:
http://localhost:8181/setup - Remote server:
http://YOUR_SERVER_IP:8181/setup
The setup wizard will automatically detect if configuration is needed and guide you through the process.
- Go to https://api.slack.com/apps
- Click "Create New App" → "From scratch"
- Name your app (e.g., "SlackONOS") and select your workspace
- Click "Create App"
- In your app, go to "Socket Mode" (under Features)
- Toggle "Enable Socket Mode" to ON
- Click "Generate App-Level Token"
- Name it (e.g., "SlackONOS Socket")
- Add scope:
connections:write - Click "Generate"
- Copy the token (starts with
xapp-) - this is your App-Level Token
- Go to "OAuth & Permissions"
- Scroll to "Bot Token Scopes"
- Add these scopes:
app_mentions:readchat:writechannels:readchannels:historygroups:readgroups:history
- Scroll up and click "Install to Workspace"
- Authorize the app
- Copy the Bot User OAuth Token (starts with
xoxb-)
- Go to "Event Subscriptions"
- Toggle "Enable Events" to ON
- Under "Subscribe to bot events", add:
app_mentionmessage.channelsmessage.groups(if using private channels)
- Click "Save Changes"
In the setup wizard's Slack step:
- Paste your App-Level Token (xapp-...)
- Paste your Bot User OAuth Token (xoxb-...)
- Enter channel names or IDs:
- Admin Channel: Where admin commands work (e.g., "music-admin")
- Standard Channel: Where users request music (e.g., "music")
- Click "Validate Tokens" to verify
- Click "Next"
Tip: For large workspaces (100+ channels), use channel IDs instead of names. Find IDs by right-clicking channel → "View channel details" → copy ID from bottom.
- Click "Discover Sonos Devices"
- Wait a few seconds
- Select your Sonos speaker from the list
- Click "Next"
- Find your Sonos IP address:
- Open Sonos app
- Settings → System → About My System
- Note the IP address
- Enter IP in "Or Enter IP Address Manually"
- Click "Next"
Troubleshooting:
- If discovery finds nothing, ensure Sonos is on same network
- Check firewall allows UDP port 1900 (SSDP)
- Try manual entry if discovery fails
- Go to https://developer.spotify.com/dashboard
- Log in with your Spotify account
- Click "Create an app"
- Fill in:
- App name: "SlackONOS" (or your choice)
- App description: "Music bot for Slack"
- Redirect URI: Not needed for this use case
- Accept terms and click "Create"
- Click on your app
- Copy Client ID
- Click "Show Client Secret" and copy it
- Paste Client ID
- Paste Client Secret
- Select your market/country (where your Spotify account is registered)
- Click "Validate Credentials" to verify
- Click "Next"
Skip this step if you only want Slack support.
- Go to https://discord.com/developers/applications
- Click "New Application"
- Name it (e.g., "SlackONOS")
- Go to "Bot" section
- Click "Add Bot"
- Under "Privileged Gateway Intents", enable:
- ✅ Message Content Intent
- Copy the token (click "Reset Token" if needed)
- Go to "OAuth2" → "URL Generator"
- Select scope:
bot - Select permissions:
- Send Messages
- Read Messages/View Channels
- Read Message History
- Add Reactions
- Copy the generated URL
- Open URL in browser and select your server
- Authorize
- In Discord, enable Developer Mode:
- User Settings → Advanced → Developer Mode
- Right-click on channels where bot should work
- Click "Copy Channel ID"
- Collect all channel IDs
- Paste Discord bot token
- Enter channel IDs (comma-separated)
- Enter admin role names (comma-separated, e.g., "DJ, Admin")
- Click "Validate Token" to verify
- Click "Next"
- Review your configuration summary
- Verify all required fields are filled
- Click "Save Configuration"
- Wait for success message
- Stop SlackONOS (Ctrl+C in terminal)
- Start it again:
node index.js - You should see:
[info] ✅ Successfully connected to Slack via Socket Mode [info] ✅ Voting module initialized
In Slack:
/invite @SlackONOS
Do this for both your admin channel and music channel.
Test that everything works:
- Slack: Send
@SlackONOS currentin your music channel - Sonos: Check logs for connection success
- Spotify: Try
add song namecommand - Discord: If configured, test commands in Discord channels
To update your configuration later:
- Start SlackONOS
- Open setup wizard:
http://localhost:8181/setup - Make changes
- Save and restart
Or edit config/config.json manually and restart.
- Read README.md for command reference
- Check TROUBLESHOOTING.md if you have issues
- See AI_FEATURE.md for AI natural language setup
- See SOUNDCRAFT.md for mixer integration
You can override config with environment variables:
SONOS=192.168.1.100 \
SLACK_APP_TOKEN=xapp-... \
TOKEN=xoxb-... \
node index.jsdocker run -d \
-p 8181:8181 \ # HTTP (redirectar)
-p 8443:8443 \ # HTTPS (faktiska förfrågningar)
-v /path/to/config:/app/config \
htilly/slackonos:latestThen access setup wizard at:
- HTTP:
http://localhost:8181/setup(redirects to HTTPS if SSL is enabled) - HTTPS:
https://localhost:8443/setup(if SSL certificates are configured)
- Documentation: See other .md files in repository
- Issues: Open an issue on GitHub
- Questions: Check TROUBLESHOOTING.md