Skip to content

Slack Setup โ€‹

Experimental: not part of 1.0

Chat-platform integrations (Slack, Microsoft Teams, Discord and spore-bot) are walled off for spore.host 1.0. The hosted spore-bot is decommissioned as of 2026-11: the spore.host Slack apps, the hosted Teams bot and its public endpoints are being retired, so there is nothing hosted to install or connect. The code is kept, and you can still self-host it, but it is experimental and unsupported, and it may change or be removed. See spore-host#611.

Connecting spore.host to Slack gives you /spore commands in any channel and direct message notifications when your instances change state โ€” useful whenever you're away from the terminal.

What you'll get โ€‹

Slash commands โ€” type these in any Slack channel:

/spore list                    โ€” all your registered instances
/spore status rstudio          โ€” current state, type, URL, TTL countdown
/spore start rstudio           โ€” start a stopped instance
/spore stop rstudio            โ€” stop a running instance
/spore extend rstudio 4h       โ€” extend the auto-terminate deadline
/spore hibernate rstudio       โ€” hibernate (save RAM state; compute billing stops, EBS continues)
/spore connect                 โ€” generate a one-time code for a collaborator
/spore notify rstudio          โ€” subscribe to DM notifications for this instance
/spore help                    โ€” command reference

Direct message notifications for lifecycle events:

  • โฑ๏ธ rstudio terminates in 5 minutes
  • โœ… bert-finetune has completed
  • ๐Ÿ’ค analysis has hibernated โ€” idle timeout reached
  • โš ๏ธ training received a Spot interruption notice

Step 1: Create a Slack app โ€‹

  1. Go to api.slack.com/apps and click Create New App โ†’ From scratch
  2. Name it spore-bot (or whatever you prefer) and pick your workspace
  3. Under OAuth & Permissions โ†’ Bot Token Scopes, add:
    • commands
    • chat:write
    • users:read
    • users:read.email
    • incoming-webhook
  4. Under Slash Commands, create a new command:
    • Command: /spore
    • Request URL: https://<your-spore-bot-function-url>/slack โ€” the Function URL of your own self-hosted spore-bot. The hosted spore.host endpoint is decommissioned.
    • Short Description: Control your spore.host instances
  5. Under Settings โ†’ Basic Information, enable Token Rotation under App Credentials
  6. Install the app to your workspace โ€” Slack will ask which channel to post notifications to

Step 2: Connect your workspace โ€‹

After installing the app, you can either use the OAuth flow (recommended) or register manually.

Click Add to Slack and authorize the app. The Lambda automatically stores your bot token and signing secret.

TIP

Your "Add to Slack" URL is your self-hosted spore-bot's OAuth path:

https://<your-spore-bot-function-url>/<platform>/oauth

There is no hosted spore.host "Add to Slack" URL any more.

Manual registration โ€‹

sh
spawn notify workspace add \
  --platform slack \
  --workspace-id T03NE3GTY \
  --workspace-name "My Workspace" \
  --bot-token xoxb-... \
  --signing-secret abc123...

Your workspace ID appears in your Slack URL: https://app.slack.com/client/T03NE3GTY/...

Step 3: Register an instance โ€‹

Once the workspace is connected, register your instances so spore-bot can find them:

sh
spawn notify register \
  --platform slack \
  --user you@university.edu \
  --workspace-id T03NE3GTY \
  --instance i-0a1b2c3d4e5f \
  --nickname rstudio \
  --allow start,stop,status,hibernate,url

spawn notify enable \
  --platform slack \
  --user-id U04KZABCD \
  --workspace-id T03NE3GTY \
  --nickname rstudio

register accepts an email (--user) and resolves it with Slack's users.lookupByEmail, printing the Slack user ID it found (Resolved you@university.edu โ†’ Slack user ID U04KZABCD). enable (and disable) needs that ID: --user-id is required, alongside --platform, --workspace-id and --nickname.

The --nickname is what you'll use in Slack commands (/spore status rstudio). The --allow flag controls which operations this user can perform.

Step 4: Enable notifications at launch โ€‹

Set the --slack-workspace flag when launching to enable DM notifications:

sh
spawn launch \
  --name rstudio \
  --instance-type r6i.2xlarge \
  --ttl 8h \
  --slack-workspace T03NE3GTY

Or save it as a default so you never have to type it:

sh
spawn defaults set slack-workspace T03NE3GTY

Adding collaborators โ€‹

Give a collaborator access to an instance without giving them AWS credentials. They can start, stop, and check status entirely from Slack.

sh
# Register a collaborator by email
spawn notify register \
  --platform slack \
  --user collaborator@partner.edu \
  --workspace-id T03NE3GTY \
  --instance i-0a1b2c3d4e5f \
  --nickname rstudio \
  --allow status,start,stop

# Use the user ID that register printed
spawn notify enable \
  --platform slack \
  --user-id U05COLLAB1 \
  --workspace-id T03NE3GTY \
  --nickname rstudio

Alternatively, generate a one-time connect code that the collaborator uses themselves:

sh
/spore connect     # generates a code like SPORE-XXXXXX

Share the code with the collaborator. They run:

sh
spawn notify register --connect-code SPORE-XXXXXX --nickname rstudio

Notification-only subscriptions โ€‹

If a collaborator wants DM notifications but shouldn't control the instance:

/spore notify rstudio

This subscribes them to all lifecycle notifications for rstudio without granting start/stop access.

To unsubscribe: /spore unnotify rstudio

Rotating credentials โ€‹

To replace the signing secret, bot token, refresh token or channel webhook without downtime, and store the new value encrypted, see Rotating bot credentials.

Troubleshooting โ€‹

Commands return "workspace not found" โ€” check that the signing secret in your Slack app matches what was registered. Signing secrets are regenerated if you change your app's scopes. Re-register with the new secret:

sh
spawn notify workspace add --platform slack --workspace-id T0... \
  --bot-token xoxb-... --signing-secret <new-secret>

workspace add replaces the whole workspace record, so include the bot token (and --webhook-url, if you set one) again.

Not receiving DM notifications โ€” make sure the instance was launched with --slack-workspace and that you've run /spore notify <nickname> for your user.