Deploy Unthread WhatsApp Bot
Deploy and Host Unthread WhatsApp Bot with Railway
Client
WhatsApp Bot
Just deployed
Backend
Redis Webhook
Just deployed
Webhook Server
Just deployed
Database
Redis Platform
Just deployed
/data
Postgres Platform
Just deployed
/var/lib/postgresql/data
Deploy and Host Unthread WhatsApp Bot on Railway
The Unthread WhatsApp Bot is an official Unthread extension that connects a Twilio WhatsApp number to Unthread's support ticketing system. Incoming customer messages automatically become support tickets in Unthread, while agent replies and ticket status updates are delivered back to customers on WhatsApp.
About Hosting Unthread WhatsApp Bot
Hosting the Unthread WhatsApp Bot on Railway involves deploying the bot service alongside PostgreSQL and two Redis instances. The bot receives inbound WhatsApp messages via Twilio webhooks, creates or updates customer records and conversations in Unthread, and sends outbound replies through Twilio. One Redis instance handles platform caching and storage, while the second serves as a webhook queue consumed from the companion unthread-webhook-server. PostgreSQL provides durable persistence for customer and conversation data. Railway manages service networking and environment variable injection, making the full-stack deployment easy to configure and scale.
Common Use Cases
- Run customer support over a WhatsApp Business number while managing all tickets in Unthread
- Automatically notify customers on WhatsApp when their ticket is created, closed, placed on hold, or resumed
- Give support teams a bidirectional workflow where agents reply in Unthread and messages are instantly delivered to customers on WhatsApp
Dependencies for Unthread WhatsApp Bot Hosting
- Twilio account with a WhatsApp-enabled number and an Unthread workspace with an API key
- PostgreSQL database and two Redis instances for platform storage and webhook queue processing
Deployment Dependencies
- Railway: https://railway.com/
- Twilio WhatsApp: https://www.twilio.com/whatsapp
- Unthread: https://unthread.com/
- Unthread WhatsApp Bot repository: https://github.com/wgtechlabs/unthread-whatsapp-bot
- Companion webhook service: https://github.com/wgtechlabs/unthread-webhook-server
Implementation Details
The deployed bot exposes two core endpoints:
POST /webhooks/twilio
GET /health
Why Deploy Unthread WhatsApp Bot on Railway?
Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.
By deploying Unthread WhatsApp Bot on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.
Template Content
Redis Platform
redis:8.2.1Redis Webhook
redis:8.2.1Webhook Server
wgtechlabs/unthread-webhook-server:latestPostgres Platform
ghcr.io/railwayapp-templates/postgres-ssl:17WhatsApp Bot
wgtechlabs/unthread-whatsapp-bot:latestUNTHREAD_API_KEY
Get from the Unthread dashboard API settings; required
TWILIO_AUTH_TOKEN
Get from the Twilio Console auth token; required
TWILIO_ACCOUNT_SID
Get from the Twilio Console account SID; required
TWILIO_WHATSAPP_NUMBER
Your Twilio WhatsApp-enabled sender in whatsapp:+123456789 format; required
UNTHREAD_WEBHOOK_SECRET
Optional secret from Unthread webhook settings for request verification
UNTHREAD_SLACK_CHANNEL_ID
Target Slack channel ID in Unthread where tickets should be created; required

