---
title: "Deploy Chatwoot"
description: "Self-hosted Chatwoot: live chat, email, WhatsApp. Intercom alternative."
category: "Automation"
url: https://railway.com/deploy/chatwoot-self-hosted
---

# Deploy Chatwoot

Self-hosted Chatwoot: live chat, email, WhatsApp. Intercom alternative.

**[Deploy Chatwoot on Railway](https://railway.com/template/chatwoot-self-hosted)**

Machine-readable deploy manifest (JSON, validated by TemplateCI): https://railway.com/deploy/chatwoot-self-hosted/manifest.json

- **Creator:** SilverBanana
- **Category:** Automation
- **Total deploys:** 1

## Template content

### Chatwoot https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/chatwoot.svg

- **Image:** chatwoot/chatwoot:latest
- **Start command:** `bundle exec rails s -p 3000 -b 0.0.0.0`
- **Public domain:** Yes

### SideKiq https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/chatwoot.svg

- **Image:** chatwoot/chatwoot:latest
- **Start command:** `bundle exec sidekiq -C config/sidekiq.yml`

### PgVector https://devicons.railway.app/postgres

- **Image:** pgvector/pgvector:pg18
- **Start command:** `/bin/sh -c "unset PGPORT; docker-entrypoint.sh postgres --port=5432"`

### Redis https://cdn.sanity.io/images/sy1jschh/production/0ce0bfdcfbdbf69662b1116671f97c2dd788b655-157x157.svg

- **Image:** redis:8.2.1
- **Start command:** `/bin/sh -c "rm -rf $RAILWAY_VOLUME_MOUNT_PATH/lost+found/ && exec docker-entrypoint.sh redis-server --requirepass $REDIS_PASSWORD --save 60 1 --dir $RAILWAY_VOLUME_MOUNT_PATH"`

## Documentation

# Deploy and Host Chatwoot on Railway

![Chatwoot shared inbox with live chat, email and social conversations](https://raw.githubusercontent.com/chatwoot/chatwoot/develop/.github/screenshots/header.png)

Chatwoot is the open-source customer support platform with **38,000+ GitHub stars**: one inbox for website live chat, email, WhatsApp, Instagram, Facebook, Telegram and more. Intercom starts at $29 per seat per month and Zendesk Suite at $55 — self-host Chatwoot on Railway for ~$15–25/month with unlimited agents, and keep every customer conversation in your own database.

---

## What This Template Deploys

| Service | Purpose |
|---|---|
| **Chatwoot** | Rails web app, agent dashboard, REST API and live-chat widget (`chatwoot/chatwoot`, port 3000, public HTTPS domain). Runs database migrations automatically before each deploy. |
| **SideKiq** | Background worker from the same image (`bundle exec sidekiq`): sends emails, processes webhooks, fetches channel messages and runs scheduled jobs. |
| **PgVector** | PostgreSQL 18 with the pgvector extension. Stores accounts, contacts and conversations; pgvector is ready for Captain AI on paid plans. |
| **Redis** | Redis 8 for job queues, live presence and the real-time ActionCable connection to agents. |
| **Persistent Volume** | Mounted at `/var/lib/postgresql` on PgVector — all conversations and settings survive redeploys. |
| **Persistent Volume** | Mounted at `/app/storage` on Chatwoot and on SideKiq — locally stored attachments. |
| **Persistent Volume** | Mounted at `/data` on Redis — queued jobs survive restarts. |

Four services wired through Railway variable references; the web app and worker share the same secrets.

---

## About Hosting Chatwoot

Production Chatwoot needs a Rails server, a Sidekiq worker, PostgreSQL, Redis, TLS, migrations on every upgrade and encryption keys that match across processes. On a VPS that means Docker Compose, Nginx and Certbot, plus manual upgrades.

On Railway, Chatwoot gets an HTTPS domain, `FRONTEND_URL` points at it automatically, secrets and encryption keys are generated at deploy time and shared with SideKiq, and migrations run as a pre-deploy step.

**Outgoing email needs the Railway Pro plan.** Chatwoot sends email (agent invites, password resets, the email channel, notifications) over SMTP, and Railway blocks outbound SMTP on the Hobby plan. Live chat and social channels work on any plan.

Typical cost: **~$15–25/month** on Railway for a small team, with no per-agent fees. Intercom starts at $29 per seat and Zendesk Suite Team at $55 per agent (billed annually) — a 5-agent team pays $145–$275 every month before AI add-ons.

---

## Deploy Chatwoot in Under 10 Minutes

1. Click **Deploy on Railway** — all four services start and migrations run (~5–8 minutes on first deploy).
2. Leave the generated values as they are — database, Redis and encryption secrets are created and shared automatically.
3. Open the Chatwoot service's public URL and create your administrator account and first workspace.
4. Go to **Settings → Inboxes → Add Inbox → Website** and paste the generated script into your site to start live chat.
5. Add email (SMTP) settings on Chatwoot and SideKiq if you're on Railway Pro, then connect WhatsApp, Instagram or other channels.

No server to patch. No Nginx or Certbot. No manual migrations.

---

## Common Use Cases

- **Self-hosted Intercom alternative** — "open source intercom alternative" with no per-seat pricing
- **Website live chat** — embed a branded chat widget and answer visitors in real time
- **Shared team inbox** — email, WhatsApp, Instagram, Facebook and Telegram in one queue
- **Faster replies** — canned responses, macros and automation rules for repeat questions
- **Data-sensitive support** — keep customer conversations in your own Postgres for compliance
- **Pairs with n8n** — trigger workflows from Chatwoot webhooks to tag, route or escalate tickets

---

## Configuration

| Variable | Required | Description |
|---|---|---|
| `FRONTEND_URL` | ✅ Auto-injected | Public URL of your Chatwoot instance. **Must match the domain users visit**, or widget, email links and OAuth callbacks break. |
| `SECRET_KEY_BASE` | 🔐 Auto-generated | Rails secret for sessions and signed cookies. Shared with SideKiq. |
| `ACTIVE_RECORD_ENCRYPTION_*` | 🔐 Auto-generated | Three keys that encrypt sensitive columns. Shared with SideKiq. Never change them after first deploy. |
| `POSTGRES_*` | ✅ Auto-injected | Host, port, database, user and password from the PgVector service. |
| `REDIS_URL` | ✅ Auto-injected | Redis connection from the Redis service. |
| `ACTIVE_STORAGE_SERVICE` | Optional | `local` by default. Set to an S3-compatible provider for production attachments. |
| `ENABLE_ACCOUNT_SIGNUP` | Optional | Not set, so public sign-up is off. Set `true` only if strangers should be able to create accounts. |
| `SMTP_*`, `MAILER_SENDER_EMAIL` | Optional | Outgoing email. Requires Railway Pro. |
| `PORT` | Auto-set | `3000` on Chatwoot. |

**Attachments and two volumes:** Chatwoot and SideKiq each have their own `/app/storage` volume, and Railway volumes can't be shared between services. Files uploaded through the dashboard work, but attachments that SideKiq downloads (incoming email and some channel media) can be missing in the web app. For production, set `ACTIVE_STORAGE_SERVICE` to S3, Cloudflare R2 or another S3-compatible bucket on both services.

---

## Chatwoot vs. Alternatives

| | Chatwoot (Railway) | Intercom | Zendesk Suite | Zammad (self-hosted) |
|---|---|---|---|---|
| **Monthly cost** | ~$15–25 total usage | From $29 per seat | From $55 per agent | Free, you host it |
| **Self-hosted** | ✅ Yes | ❌ No | ❌ No | ✅ Yes |
| **Per-agent pricing** | ✅ None | ❌ Per seat | ❌ Per agent | ✅ None |
| **Website live chat widget** | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
| **WhatsApp, Instagram, Facebook** | ✅ Built in | ✅ Built in | ✅ Built in | ⚠️ Partial |
| **Data stays on your infra** | ✅ Yes | ❌ No | ❌ No | ✅ Yes |
| **AI assistant** | ⚠️ Captain AI, $19/agent plan | ⚠️ Fin, $0.99 per outcome | ⚠️ Paid add-on | ⚠️ Limited |
| **License** | ✅ MIT (core) | ❌ Proprietary | ❌ Proprietary | ✅ AGPL-3.0 |

---

## Dependencies for Chatwoot Hosting

- Railway account — Hobby ($5/month) runs live chat and social channels; Pro ($20/month) is needed for outgoing email. Plan for ~1.2–1.5 GB RAM across the four services.
- An SMTP provider (Amazon SES, Postmark, Mailgun, SendGrid) for email features.
- An S3-compatible bucket (S3, Cloudflare R2) for production attachments — recommended.

### Deployment Dependencies

- [Chatwoot GitHub](https://github.com/chatwoot/chatwoot) — source and releases
- [Chatwoot Self-Hosted Docs](https://developers.chatwoot.com/self-hosted) — setup and environment variables
- [pgvector](https://github.com/pgvector/pgvector) — vector search extension for Postgres
- [Railway Volumes Documentation](https://docs.railway.com/volumes) — persistence

### Implementation Details

The official `chatwoot/chatwoot` image runs twice — as **Chatwoot** (`rails s`, port 3000) and **SideKiq** — with `pgvector/pgvector:pg18` and `redis:8.2.1`. A pre-deploy `rails db:chatwoot_prepare` migrates the database before each new version goes live.

`FRONTEND_URL` must always equal the public URL — update it when you add a custom domain. `SECRET_KEY_BASE` and the `ACTIVE_RECORD_ENCRYPTION_*` keys are generated once on Chatwoot and referenced by SideKiq; changing them later makes encrypted data unreadable.

---

## Frequently Asked Questions

**What is Chatwoot and why self-host it?**
An open-source support platform that puts live chat, email and social messaging in one shared inbox. Self-hosting removes per-agent fees and keeps conversations in your own database.

**How much does self-hosting Chatwoot cost compared to Intercom or Zendesk?**
Expect about $15–25/month in Railway usage for a small team, with unlimited agents. Intercom starts at $29 per seat per month and Zendesk Suite Team at $55 per agent (billed annually), so a 5-agent team pays $145–$275/month on those plans.

**Why are Chatwoot emails not sending?**
Outgoing email needs SMTP settings (`SMTP_ADDRESS`, `SMTP_PORT`, `SMTP_USERNAME`, `SMTP_PASSWORD`, `MAILER_SENDER_EMAIL`) on both Chatwoot and SideKiq, and Railway only allows outbound SMTP on the Pro plan. On Hobby, emails time out even with correct settings.

**Do I lose conversations or attachments when I redeploy?**
No. Conversations, contacts and settings live in Postgres on a persistent volume, and attachments on the `/app/storage` volumes. For production, use S3-compatible storage so attachments are shared and backed up.

**Can I connect WhatsApp, Instagram and email to Chatwoot?**
Yes. Chatwoot supports website live chat, email, WhatsApp (Cloud API and Twilio), Facebook, Instagram, Telegram, Line, SMS and an API channel for custom sources. Each is added under Settings → Inboxes.

**Is self-hosted Chatwoot fully open source?**
The core is MIT-licensed and free for any use, including commercial, with unlimited agents. Code in the repository's `enterprise/` folder is under a separate license: Captain AI, custom roles and custom branding need the $19/agent Premium plan, and SSO/SAML and SLA policies need the $99/agent Enterprise plan.

---

## Why Deploy and Host Chatwoot 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 Chatwoot on Railway, you get an omnichannel support inbox with unlimited agents for a flat usage cost, and every customer conversation kept in your own database.


## Similar templates

- [N8N Main + Worker](https://railway.com/deploy/n8n-main-worker) — Deploy and Host N8N with Inactive worker.
- [Evolution API with n8n](https://railway.com/deploy/evolution-api-with-n8n) — Automate WhatsApp workflows with Evolution API, n8n, and Postgres.
- [Postgres Backup](https://railway.com/deploy/postgres-s3-backups) — Cron-based PostgreSQL backup to bucket storage

Open this page in a browser: https://railway.com/deploy/chatwoot-self-hosted
