← BLOG

Slack bot hosting: Socket Mode or HTTP in production?

Host a Slack bot according to how it receives events. Socket Mode needs an always-on outbound WebSocket, while HTTP mode needs a public HTTPS endpoint that acknowledges Slack quickly.

HOSTING · 20 AUGUST 2026 · 6 MIN READ

Choose Slack bot hosting by receiver type. A Socket Mode app needs one process that keeps an outbound WebSocket open and reconnects after interruptions. An HTTP app needs a stable HTTPS URL, signature verification, and a handler that acknowledges each request before doing slow work.

Slack recommends Socket Mode for local development, apps behind a firewall, and cases where a public endpoint is unavailable. Its production guidance favors HTTP request URLs when possible because long-lived WebSockets can disconnect and are harder to scale. That distinction should drive the hosting decision.

Pick the receiver before the provider

SITUATIONRECEIVERHOST REQUIREMENT
Private app for one workspaceSocket Mode can be practicalContinuous outbound WebSocket and automatic reconnects
Public or distributed Slack appHTTP is the safer defaultPublic HTTPS, request verification, and quick acknowledgements
App running behind a corporate firewallSocket ModeOutbound access only, with no inbound route
Slow AI, report, or media taskEither receiver plus a queueAcknowledge first, then let a worker finish the job

What the common hosting options actually provide

OPTIONBEST FITTRADEOFF TO CHECK
SpocketSmall Node or Python Slack apps, Socket Mode or HTTPFixed per-app capacity, no managed database or horizontal autoscaling
RenderA web service or a separately defined background workerWorkers and web services are distinct paid compute resources
RailwayApps that need several connected services and usage billingThe subscription includes usage credit, then resource use sets the total
Cloud RunHTTP receivers that benefit from request-driven scalingContinuous non-HTTP work belongs in a worker pool, not a request service
VPSCustom binaries, private networking, or operating-system controlYou own patches, TLS, process supervision, and recovery

Do not buy a continuous worker for an HTTP-only app just because the code was first tested with Socket Mode. Do not put a Socket Mode process on a host that suspends idle services. A WebSocket waiting for an event can look idle even though it is doing its job.

The two tokens in Socket Mode are not interchangeable

A Bolt Socket Mode app normally needs a bot token that starts with xoxb and an app-level token that starts with xapp. The app-level token needs the connections:write scope so the SDK can request a temporary WebSocket URL. Keep both in environment variables.

JS
import { App } from '@slack/bolt';

const app = new App({
  token: process.env.SLACK_BOT_TOKEN,
  appToken: process.env.SLACK_APP_TOKEN,
  socketMode: true,
});

await app.start();
A minimal Bolt for JavaScript Socket Mode start.

A process that prints a connected message but receives no events may still have the wrong subscriptions, scopes, or installed app version. Hosting can keep the socket alive, but it cannot grant a missing Slack permission.

Production checks that catch the quiet failures

  • Confirm the app is installed in the workspace after the latest scope change.
  • Subscribe only to the events the code handles, and invite the bot to channels where membership is required.
  • Log startup, reconnects, Slack API errors, and handler failures without printing either token.
  • Acknowledge events and interactions before calling a model, generating a file, or waiting on another API.
  • Put durable jobs and user state in a database or queue outside the container.
  • Test a cold start, one reconnect, one bad token, and a real event from Slack before ending the migration.

Move the app without creating two consumers

Deploy the new copy with its tokens withheld, verify that dependencies install, then stop the old process. Add the tokens to the new host and watch one successful connection. For HTTP mode, move the Slack request URL only after the new endpoint answers its health check and verifies signatures.

Spocket runs Node 22 and Python 3.11 apps as continuous processes and gives HTTP apps an HTTPS URL. The Solo plan is $3 per month for one 512MB app. It is a direct fit for a small internal Slack app, but a platform with automatic replicas, a managed queue, or public Marketplace distribution needs a different architecture. Use /run/slack for the hosting path and /documentation/domains-and-webhooks for an HTTP receiver.

Need somewhere to put it?

Spocket runs apps, workers and scrapers that have to stay awake. Deploy from Claude or Cursor by asking, from $3/mo. First app is free for 7 days, no card.

Slack bot hostingRead the quickstart
Spocket
BlogDocsTermsPrivacyHome