OpenSquadron is an open-source, Symfony-based alternative to commercial marketing and live chat platforms like ManyChat, Chatfuel, and Wati. Currently, it implements the underlying framework and Meta WhatsApp Cloud API connectivity for a Shared Live Inbox and Subscriber management.
Before you begin, ensure you have the following installed on your Windows machine:
- XAMPP (with PHP 8.2+ and MariaDB/MySQL).
- Composer (PHP package manager).
- Cloudflared CLI (for Cloudflare Tunnel).
- A Meta Developer Account with a configured WhatsApp Business App.
We have comprehensive guides for setting up, deploying, and customizing OpenSquadron:
- 🐳 Docker Deployment Guide - CLI deployments via Docker Compose (NPM, Cloudflare, HAProxy).
- 🚢 Portainer Deployment Guide - 1-Click GUI deployments via App Templates (GitOps/Auto-Updating).
- 🛡️ Nginx Proxy Manager Guide - Step-by-step NPM configuration for reverse proxying and SSL.
- ☁️ Cloudflare Tunnel Setup - Securely exposing your local server to the internet.
- 💬 Connect WhatsApp Cloud API - Step-by-step guide to linking WhatsApp.
- 📘 Connect Meta / Facebook App - Step-by-step guide for Facebook/Instagram integration.
- 🎨 CSS Customization - How to style the chat widget and dashboard.
- 🌍 White Label Domain Setup - Running OpenSquadron under your own custom branding.
-
Install Dependencies: Open a terminal in the project root and run:
composer install
-
Environment Variables: Open the
.envfile and configure your database credentials. (Tokens are now securely stored in the database via the Dashboard UI).DATABASE_URL="mysql://root:@127.0.0.1:3306/opensquadron?serverVersion=10.4.32-MariaDB&charset=utf8mb4"
To easily host this on XAMPP using a local domain (opensquadron.local):
- Right-click the
setup-local.ps1script and click Run with PowerShell. (Note: This requires Administrator privileges as it edits your Windowshostsfile and XAMPP'shttpd-vhosts.conf). - Open the XAMPP Control Panel.
- Restart Apache and Start MySQL.
Initialize your database schema and create your first administrator account using Symfony's Doctrine Migrations.
Open a terminal in your project root and run these commands:
- Create the database:
php bin/console doctrine:database:create
- Execute migrations:
php bin/console doctrine:migrations:migrate -n
- Create your admin account:
(You can change the email and password above to whatever you prefer).
php bin/console app:create-admin admin@opensquadron.local admin123
You can now log in to the application at https://opensquadron.local/login or http://localhost/login.
To connect your local environment to the Meta Cloud API webhook, your local server needs a public HTTPS URL (e.g., opensquadron.your.domain).
- Log into your Cloudflare Zero Trust dashboard and create a Tunnel.
- Route the public hostname (e.g.,
opensquadron.your.domain) tohttp://opensquadron.local:80. - Copy the Tunnel Token provided by Cloudflare.
- Edit the
start-tunnel.batfile in the root directory and replace the placeholder variable with your tunnel token. - Double-click
start-tunnel.batto start the tunnel.
- Log in to your OpenSquadron Dashboard (
https://opensquadron.your.domain/login). - Go to the Bot Channels -> Connect WhatsApp page (or
/whatsapp-business/connectdirectly) and input yourPhone Number ID,Access Token, and create aVerify Token. - In your Meta App Dashboard, go to WhatsApp -> Configuration (do not use the generic "Webhooks" product tab).
- Click Edit Webhook.
- Set the Callback URL to:
https://opensquadron.your.domain/webhook/whatsapp - Set the Verify Token to exactly match the one you saved in the OpenSquadron dashboard.
- Click Verify and Save.
- Underneath the Webhook URL, click Manage Webhook fields and subscribe to the
messagesevent.
For step-by-step setup details, refer to the Facebook Page Connection Guide.
- Go to the Bot Channels -> Connect Facebook page (or
/facebook/connectdirectly) inside the OpenSquadron Dashboard. - Enter your Facebook App ID and App Secret (make sure your App type is Business in the Meta Developer portal, and your valid redirect URI is configured to
https://opensquadron.your.domain/facebook/callback). - Click Connect with Facebook to authorize the application.
- Select the Facebook Page you want to connect from the list back in OpenSquadron.
- Set up your Webhook Callback URL:
https://opensquadron.your.domain/webhook/facebookwith your unique verify token in the Meta Developer dashboard under the Webhooks product, and subscribe tomessagesandmessaging_postbacksevents.
To receive messages from anyone in the world, your Meta App must be in Live Mode:
- OpenSquadron automatically generates Meta-compliant policy pages. In the Meta Dashboard -> App Settings -> Basic, paste these URLs:
- Privacy Policy:
https://opensquadron.your.domain/privacy - Terms of Service:
https://opensquadron.your.domain/terms
- Privacy Policy:
- App Review: Submit your Meta App for review for the necessary permissions (
whatsapp_business_messagingfor WhatsApp; orpages_messaging,pages_show_list,pages_read_engagement,pages_manage_metadataetc. for Facebook). - Toggle the App Mode at the top of the screen to Live.
- IMPORTANT: Ensure your Cloudflare WAF or "Bot Fight Mode" is not blocking the
facebookexternalhitcrawler or POST requests to the/webhook/whatsappand/webhook/facebookendpoints.
You can now use the Shared Inbox in the OpenSquadron dashboard to chat with users in real time!
This project is licensed under the GNU Affero General Public License v3.0 (AGPL-3.0). You are free to use, modify, and distribute this software under the terms of the AGPLv3 license.