
Most teams don’t need another SaaS invoice just to answer customers. You need a shared inbox, live chat, and an audit trail you can trust. You also want it on infrastructure you control. If you want an Intercom-style workflow without handing every conversation to a third party, self-host Chatwoot on your own VPS. That keeps your data, logs, and retention policy in your hands.
This is an open-source spotlight, so we’ll keep it practical. We’ll cover who Chatwoot fits, what it can replace, and how to run it on real infrastructure. That includes Docker Compose, HTTPS, backups, and upgrades you can predict.
Why Chatwoot is worth self-hosting (and who it’s for)
Chatwoot is a customer support platform with a shared team inbox and a website live chat widget. It also includes contact management and multi-channel messaging, depending on which channels you connect. It’s a good match for small-to-mid teams that want “one place to reply” without building an internal support tool.
- SaaS teams that need sales + support visibility without letting every vendor touch customer conversations.
- Agencies managing multiple client sites and wanting separate inboxes per brand.
- Operators who care about the boring but critical stuff: backups, retention, IP allowlists, and log access.
Chatwoot is open-source (AGPL-3.0). The license is straightforward, but it isn’t optional. If you modify Chatwoot and provide it to users over a network, you’re generally expected to provide the source of your modified version.
For most teams, the cleanest path is to run upstream images. That avoids maintaining a private fork.
Self-host Chatwoot vs Intercom (and other hosted inboxes)
Intercom is polished, and the price buys convenience. You get hosted infrastructure, managed upgrades, and bundled analytics. Chatwoot covers the core workflow—conversations, assignments, internal notes, and web chat—while keeping your data on your server.
- Data control: You decide where conversations live (PostgreSQL), how long you retain them, and how you back them up.
- Cost profile: You trade per-seat/per-contact fees for predictable infrastructure costs (VPS + storage + email/SMS providers if you add channels).
- Ops responsibility: You own upgrades, monitoring, and incident response. The goal here is to keep that low-drama.
If you already run WordPress, app backends, or internal tools on a VPS, Chatwoot fits right in. Just don’t run it “raw” on port 3000 and call it production. Put it behind a reverse proxy, keep secrets out of your shell history, and plan backups on day one.
What you’ll run on your VPS (components and ports)
A typical Docker-based Chatwoot deployment includes:
- Chatwoot web (Rails app) – serves the UI and API.
- PostgreSQL – primary database.
- Redis – background jobs and caching.
- Sidekiq (or background worker) – processes jobs (emails, webhooks, etc.).
From the public internet, you only need ports 80/443 open. Everything else should stay on an internal Docker network. If you host multiple apps, a shared reverse proxy (Nginx or Traefik) keeps routing tidy. It also avoids “random port sprawl.”
Resource requirements (what to buy for a stable setup)
Chatwoot isn’t huge, but it’s a real app. You’re running a database, background jobs, and a web process. Sizing depends on concurrent agents, message volume, and which integrations you enable.
- Small team (1–5 agents): 2 vCPU, 4 GB RAM, 40+ GB SSD/NVMe.
- Growing support desk (5–20 agents): 4 vCPU, 8 GB RAM, 80+ GB SSD/NVMe.
- High volume / multiple brands: 8 vCPU, 16 GB RAM, separate database tuning and backup storage.
Disk is the quiet limiter. Conversations, attachments, and database churn add up over time. If you want steady performance and comfortable upgrade headroom, start with NVMe storage.
For production, a HostMyCode VPS is a sensible default. If you’d rather not own OS patching, Docker upkeep, and backup validation, managed VPS hosting keeps your team focused on support instead of server maintenance.
Deploy Chatwoot with Docker Compose (clean layout, minimal surprises)
You can run Chatwoot on Ubuntu or Debian without a control panel. Consistency matters more than tooling. Use a dedicated directory, an env file you can back up, and named volumes (or bind mounts) for stateful data.
A layout that stays sane six months later:
/opt/chatwoot/fordocker-compose.ymland.env- Named Docker volumes for PostgreSQL and Redis (or bind mounts if you want filesystem visibility)
Install Docker and Compose (Ubuntu/Debian):
sudo apt update
sudo apt install -y ca-certificates curl gnupg
# Docker Engine (official repo is recommended for production)
# Follow Docker’s docs for your distro, then:
docker compose version
Create the app directory:
sudo mkdir -p /opt/chatwoot
sudo chown -R $USER:$USER /opt/chatwoot
cd /opt/chatwoot
Generate secrets before you write your env file:
openssl rand -hex 32
Create .env (trimmed to the essentials; add email settings later):
# Public URL
FRONTEND_URL=https://support.example.com
# Rails secrets
SECRET_KEY_BASE=put-your-long-random-string-here
# Postgres
POSTGRES_DB=chatwoot
POSTGRES_USER=chatwoot
POSTGRES_PASSWORD=use-a-strong-password
# Redis
REDIS_URL=redis://redis:6379
# Chatwoot
RAILS_ENV=production
INSTALLATION_ENV=docker
# Optional but recommended: control file uploads
# ACTIVE_STORAGE_SERVICE=local
Create docker-compose.yml. Don’t bind the app directly to a public interface. Let the reverse proxy handle inbound traffic.
services:
postgres:
image: postgres:16
environment:
POSTGRES_DB: ${POSTGRES_DB}
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
volumes:
- chatwoot_postgres:/var/lib/postgresql/data
restart: unless-stopped
redis:
image: redis:7
restart: unless-stopped
chatwoot:
image: chatwoot/chatwoot:latest
env_file: .env
depends_on:
- postgres
- redis
restart: unless-stopped
sidekiq:
image: chatwoot/chatwoot:latest
env_file: .env
depends_on:
- postgres
- redis
command: bundle exec sidekiq -C config/sidekiq.yml
restart: unless-stopped
volumes:
chatwoot_postgres:
First start:
docker compose up -d
docker compose ps
Then run Chatwoot’s setup/migrations inside the container. The exact task name can vary by upstream image. If it fails, check the logs.
docker compose exec chatwoot bundle exec rails db:prepare
For quick diagnostics, tail logs while you run migrations:
docker compose logs -f --tail=200 chatwoot sidekiq
If Docker basics are new to your team, standardize how you update Compose apps. That saves time and prevents mistakes. The approach in our Watchtower guide fits well here too, even if you keep updates manual: Docker Compose auto-updates with Watchtower.
Reverse proxy with HTTPS (Nginx example you can paste)
Put Chatwoot behind a reverse proxy. You get HTTPS, HTTP/2, sensible headers, and one obvious place to add rate limits later. If you already run Nginx for other sites, it’s a natural choice.
Two common patterns:
- Nginx on the host proxying to Chatwoot’s internal Docker port.
- Traefik in Docker handling certificates automatically.
If you run multiple Compose stacks, Traefik can reduce per-app config. We’ve documented the pattern here: Traefik with Docker Compose for HTTPS.
For the Nginx-on-host approach, expose Chatwoot only to localhost by adding a port mapping (edit docker-compose.yml):
chatwoot:
image: chatwoot/chatwoot:latest
env_file: .env
ports:
- "127.0.0.1:3000:3000"
depends_on:
- postgres
- redis
restart: unless-stopped
Restart:
docker compose up -d
Now configure Nginx. Create /etc/nginx/sites-available/support.example.com:
server {
listen 80;
server_name support.example.com;
location /.well-known/acme-challenge/ {
root /var/www/html;
}
location / {
return 301 https://$host$request_uri;
}
}
server {
listen 443 ssl http2;
server_name support.example.com;
ssl_certificate /etc/letsencrypt/live/support.example.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/support.example.com/privkey.pem;
# Basic hardening
add_header X-Content-Type-Options nosniff always;
add_header X-Frame-Options SAMEORIGIN always;
add_header Referrer-Policy strict-origin-when-cross-origin always;
client_max_body_size 25m;
location / {
proxy_pass http://127.0.0.1:3000;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}
Enable the site and reload:
sudo ln -s /etc/nginx/sites-available/support.example.com /etc/nginx/sites-enabled/
sudo nginx -t
sudo systemctl reload nginx
Then issue the certificate with Certbot (Ubuntu/Debian package names may vary):
sudo apt install -y certbot python3-certbot-nginx
sudo certbot --nginx -d support.example.com
If you want to go further for modern browsers, HTTP/3 support on Nginx is achievable on Ubuntu with the right build and config. This guide explains what needs to line up: Enable HTTP/3 on Nginx with QUIC.
Email delivery: don’t skip it (password resets and notifications depend on it)
Chatwoot sends invites, password resets, and conversation notifications. If your server can’t deliver mail reliably, you’ll feel it fast. It usually shows up when someone can’t log in.
Two stable options:
- SMTP relay (recommended): send through a provider or a relay VPS with correct SPF/DKIM/DMARC.
- Full mail server: only if you’re ready to maintain reputation, DNS records, and anti-spam hygiene.
If you already run WordPress on the same VPS and fought deliverability, the same approach applies here: Set Up Postfix Relay on a VPS. Configure Chatwoot’s SMTP settings in its env (names depend on upstream docs). Then test from the UI using a mailbox you control.
Backups you can trust: database + uploads + env
For Chatwoot, “back up the server” is not a plan. You need three specific artifacts that you can restore.
- PostgreSQL dump (conversations, accounts, users, settings)
- File uploads (attachments; depends on whether you store locally or on S3-compatible storage)
- Configuration (your
.env, plus any reverse proxy config)
A pragmatic backup strategy on a single VPS:
- Nightly database dump to
/var/backups/chatwoot/ - Daily rsync or object storage sync off the VPS (separate storage account or separate server)
- Monthly restore test to a staging container
Example: create a DB dump via Docker (store with date stamp):
sudo mkdir -p /var/backups/chatwoot
sudo chown -R $USER:$USER /var/backups/chatwoot
# Dump from the postgres container
docker compose exec -T postgres pg_dump -U "$POSTGRES_USER" "$POSTGRES_DB" \
| gzip > /var/backups/chatwoot/chatwoot-$(date +%F).sql.gz
If you use local uploads, back up the relevant volume too. Named volumes are slightly awkward to back up blindly. Many operators map uploads to a bind mount (for example /opt/chatwoot/storage) and back up that directory directly.
Either approach works—just pick one now. Migrating upload storage later is possible, but it’s the last thing you want to do mid-incident.
One habit that prevents real downtime: test restores. Spin up a disposable Compose project on the same VPS (different ports). Restore the dump into a fresh Postgres volume. You’ll catch permission issues and missing files before they matter.
Safe updates: how to upgrade without breaking your inbox
Updating Chatwoot isn’t just “pull a new image.” The app is tied to a database schema. That means your upgrade process must be repeatable and documented.
A low-risk upgrade flow:
- Take a fresh DB backup (and confirm the file exists and is non-empty).
- Pull new images.
- Restart containers.
- Run migrations.
- Watch logs for a few minutes.
Commands:
cd /opt/chatwoot
# 1) Backup (keep the last known-good)
# (use the pg_dump command from the backup section)
# 2) Pull
docker compose pull
# 3) Restart
docker compose up -d
# 4) Migrate
docker compose exec chatwoot bundle exec rails db:migrate
# 5) Verify
docker compose logs -f --tail=200 chatwoot sidekiq
Pinning versions is a smart production default. If you use :latest, you hand change control to someone else’s release schedule. Once you validate an upgrade in staging, pin to a specific tag.
Operational hardening: quick checks that prevent common incidents
Chatwoot is a front door to sensitive customer conversations. Treat it like an admin surface, not a marketing site.
- Firewall: only allow 22 (restricted), 80, 443. Keep Postgres and Redis private.
- SSH hygiene: key-based auth, no root login, and rate-limiting (Fail2ban).
- Separate DNS name: run Chatwoot on
support.example.comand keep it isolated from app backends. - Disk monitoring: database growth + logs can fill small disks quietly.
If you’ve ever had a VPS flip read-only at 3 a.m., you already know why disk checks matter. This guide helps you find what’s growing fast: Disk Full on VPS: Find Large Files and Free Space Safely.
Where Chatwoot fits in your hosting stack
Chatwoot runs fine alongside WordPress, WooCommerce, and custom apps. You need clean routing and enough headroom to avoid resource contention. For many businesses, the simplest model looks like this:
- WordPress site on managed WordPress or shared hosting
- Chatwoot on a small VPS (separate from your public site)
- DNS records pointing
wwwandsupportto different origins
If you’re migrating off a hosted chat platform, plan a short cutover. Deploy Chatwoot first. Then test inbound messages end-to-end. After that, swap the website widget snippet during a low-traffic hour.
If you’re also moving the underlying site or app, bundle the change into a planned migration window. HostMyCode can help through HostMyCode migrations.
Summary: self-hosting Chatwoot without turning it into a side project
You don’t need a complicated platform to run a serious support inbox. You need a predictable Compose stack, HTTPS in front, email delivery you trust, and backups you’ve restored at least once. Nail those four basics and Chatwoot stays boring—in the best way.
If you’re ready to self-host Chatwoot on reliable infrastructure, start with a HostMyCode VPS sized for your ticket volume. If you’d rather hand off patching, monitoring, and the “why did Docker stop?” moments, managed VPS hosting keeps Chatwoot stable while you focus on customers.
Want an Intercom-style inbox without a monthly per-seat bill? Run Chatwoot on a VPS with enough RAM for PostgreSQL cache and background jobs. A HostMyCode VPS is a solid starting point, and managed VPS hosting makes sense if you don’t want to maintain the ops runbook.
FAQ
Do I need a dedicated server to self-host Chatwoot?
No. Most teams do fine on a 2 vCPU / 4 GB VPS. Move to a larger VPS (or separate DB host) when your database and background jobs compete for RAM.
Can I run Chatwoot behind Traefik instead of Nginx?
Yes. Traefik works well for Docker-heavy servers and simplifies certificate automation. Use labels per service and keep Chatwoot off public ports.
What should I back up first if I’m short on time?
Back up PostgreSQL first. That’s your source of truth for conversations and accounts. Next, back up uploads/attachments and your .env secrets.
How do I reduce risk during upgrades?
Pin image tags, take a fresh DB backup, then upgrade during a low-traffic window. Run migrations explicitly and tail logs for Sidekiq and the web container.
Can I host Chatwoot and my main website on the same VPS?
You can, but isolate traffic with a reverse proxy and watch resource contention. If your website is already busy, splitting Chatwoot onto its own VPS usually makes incidents easier to contain.