---
title: "How to Build a Self-Hosted WhatsApp Bot with n8n and WAHA"
url: https://daily.dev/posts/how-to-build-a-self-hosted-whatsapp-bot-with-n8n-and-waha-ojn4xefsi
source_url: https://www.freecodecamp.org/news/how-to-build-a-self-hosted-whatsapp-bot-with-n8n-and-waha
type: article
source: "freeCodeCamp"
published: 2026-05-11T16:57:20.041Z
updated: 2026-05-11T16:58:17.544Z
tags: ["docker", "n8n"]
reading_time: 17
upvotes: 4
comments: 0
language: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# How to Build a Self-Hosted WhatsApp Bot with n8n and WAHA

**[freeCodeCamp](https://daily.dev/sources/freecodecamp)** · 17 min read · 4 upvotes · 0 comments

## Summary

A step-by-step guide to building a self-hosted WhatsApp bot using WAHA (WhatsApp HTTP API) and n8n, both running in Docker. Covers setting up WAHA as a WhatsApp Web gateway, connecting it to n8n via webhooks, building a keyword-based auto-reply bot, and sending proactive outbound messages (e.g., booking confirmations from a database). Also covers production hardening: HTTPS with Caddy, API key rotation, rate limiting, n8n Queue Mode with Redis, session monitoring, backup strategies, live-agent handoff with Chatwoot, and common pitfalls like duplicate messages, session disconnects, and account bans.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.freecodecamp.org/news/how-to-build-a-self-hosted-whatsapp-bot-with-n8n-and-waha>

## Similar posts on daily.dev

- [How to Build and Deploy a Production-Ready WhatsApp Bot with FastAPI, Evolution API, Docker, EasyPanel, and GCP](https://daily.dev/posts/how-to-build-and-deploy-a-production-ready-whatsapp-bot-with-fastapi-evolution-api-docker-easypan-frfyleupc) · freeCodeCamp · 3 upvotes · 0 comments

---

Tags: [#docker](https://daily.dev/tags/docker), [#n8n](https://daily.dev/tags/n8n)

[View this post on daily.dev](https://daily.dev/posts/how-to-build-a-self-hosted-whatsapp-bot-with-n8n-and-waha-ojn4xefsi)
