Overview
Pre-built binaries provide a lightweight deployment option without Docker. Binaries are built using GoReleaser and available for multiple platforms and architectures.
Starting from version 7.x , binaries are built with GoReleaser for better cross-platform support and optimized builds.
Platform Architecture Binary Name Linux x86_64 (AMD64) whatsapp_Linux_x86_64.tar.gzLinux ARM64 whatsapp_Linux_arm64.tar.gzmacOS Intel (AMD64) whatsapp_Darwin_x86_64.tar.gzmacOS Apple Silicon (ARM64) whatsapp_Darwin_arm64.tar.gzWindows x86_64 (AMD64) whatsapp_Windows_x86_64.zip
System Requirements
Required Dependencies
# Debian/Ubuntu
sudo apt update
sudo apt install ffmpeg webp
# Fedora/RHEL
sudo dnf install ffmpeg libwebp-tools
# Arch Linux
sudo pacman -S ffmpeg libwebp
brew install ffmpeg webp
export CGO_CFLAGS_ALLOW = "-Xpreprocessor"
The CGO_CFLAGS_ALLOW export is required on macOS to prevent compilation errors.
If you must use native Windows:
Install FFmpeg:
Download from ffmpeg.org
Extract and add bin folder to PATH
Install libwebp:
Add to Environment Variables:
Search “Environment Variables” in Windows Settings
Edit PATH to include FFmpeg and libwebp bin folders
Why FFmpeg and libwebp?
FFmpeg : Required for video compression and audio/video processing
libwebp : Required for sticker support (WebP encoding/decoding and animated stickers)
The libwebp package provides:
cwebp - WebP encoder
dwebp - WebP decoder
webpmux - Frame extraction for animated stickers
Download Binary
Latest Release
Download the latest version from GitHub Releases:
GitHub Releases →
Command-Line Download
Linux (AMD64)
Linux (ARM64)
macOS (Intel)
macOS (Apple Silicon)
wget https://github.com/aldinokemal/go-whatsapp-web-multidevice/releases/latest/download/whatsapp_Linux_x86_64.tar.gz
tar -xzf whatsapp_Linux_x86_64.tar.gz
chmod +x whatsapp
Running the Binary
REST API Mode
# Basic usage
./whatsapp rest
# With configuration
./whatsapp rest --port=8080 --debug=true
# Basic usage
.\ whatsapp.exe rest
# With configuration
.\ whatsapp.exe rest -- port = 8080 -- debug = true
Breaking Change (v6+): You must explicitly specify rest mode. Running ./whatsapp without a mode will show the help menu.
MCP Server Mode
# Linux / macOS
./whatsapp mcp --host=localhost --port=8080
# Windows
. \ whatsapp.exe mcp --host=localhost --port=8080
View Available Options
./whatsapp --help
./whatsapp rest --help
./whatsapp mcp --help
Configuration
Using Command-Line Flags
./whatsapp rest \
--port=3000 \
--debug=true \
--os=MyApp \
--basic-auth=admin:secret \
--autoreply= "Thanks for your message" \
--webhook=https://webhook.site/your-endpoint \
--webhook-secret=my-secret-key
Using Environment Variables
Create a .env file:
# Copy example file
cp .env.example .env
# Edit configuration
nano .env
Example .env:
APP_PORT = 3000
APP_DEBUG = false
APP_OS = MyApp
APP_BASIC_AUTH = admin:secret
WHATSAPP_AUTO_REPLY = "Thanks for contacting us"
WHATSAPP_WEBHOOK = https://webhook.site/your-endpoint
WHATSAPP_WEBHOOK_SECRET = your-secret-key
WHATSAPP_AUTO_REJECT_CALL = true
Then run:
Configuration Priority
Command-line flags (highest priority)
Environment variables
.env file (lowest priority)
See Environment Variables for all options.
Production Deployment
Systemd Service (Linux)
Create /etc/systemd/system/whatsapp.service:
[Unit]
Description =GOWA WhatsApp API Server
After =network.target
[Service]
Type =simple
User =whatsapp
Group =whatsapp
WorkingDirectory =/opt/whatsapp
ExecStart =/opt/whatsapp/whatsapp rest
Restart =always
RestartSec =10
# Security settings
NoNewPrivileges =true
PrivateTmp =true
ProtectSystem =strict
ProtectHome =true
ReadWritePaths =/opt/whatsapp/storages
# Environment
Environment = "APP_PORT=3000"
Environment = "APP_DEBUG=false"
Environment = "WHATSAPP_WEBHOOK=https://api.example.com/webhook"
[Install]
WantedBy =multi-user.target
Setup:
# Create user
sudo useradd -r -s /bin/ false whatsapp
# Create directories
sudo mkdir -p /opt/whatsapp/storages
sudo chown -R whatsapp:whatsapp /opt/whatsapp
# Copy binary
sudo cp whatsapp /opt/whatsapp/
sudo chmod +x /opt/whatsapp/whatsapp
# Enable and start service
sudo systemctl daemon-reload
sudo systemctl enable whatsapp
sudo systemctl start whatsapp
# Check status
sudo systemctl status whatsapp
# View logs
sudo journalctl -u whatsapp -f
Supervisor (Alternative)
Create /etc/supervisor/conf.d/whatsapp.conf:
[program:whatsapp]
command =/opt/whatsapp/whatsapp rest
directory =/opt/whatsapp
user =whatsapp
autostart =true
autorestart =true
startretries =3
stderr_logfile =/var/log/whatsapp/error.log
stdout_logfile =/var/log/whatsapp/access.log
environment = APP_PORT = "3000" , APP_DEBUG = "false"
sudo supervisorctl reread
sudo supervisorctl update
sudo supervisorctl start whatsapp
PM2 (Node.js Process Manager)
Create ecosystem.config.js:
module . exports = {
apps: [{
name: 'whatsapp' ,
script: './whatsapp' ,
args: 'rest' ,
cwd: '/opt/whatsapp' ,
env: {
APP_PORT: 3000 ,
APP_DEBUG: false ,
WHATSAPP_WEBHOOK: 'https://api.example.com/webhook'
},
autorestart: true ,
max_restarts: 10 ,
restart_delay: 5000
}]
}
pm2 start ecosystem.config.js
pm2 save
pm2 startup
Building from Source
If you need to build the binary yourself:
# Clone repository
git clone https://github.com/aldinokemal/go-whatsapp-web-multidevice
cd go-whatsapp-web-multidevice/src
# Build
go build -o whatsapp
# Run
./whatsapp rest
# Linux AMD64
GOOS = linux GOARCH = amd64 go build -o whatsapp
# Linux ARM64
GOOS = linux GOARCH = arm64 go build -o whatsapp
# macOS Intel
GOOS = darwin GOARCH = amd64 go build -o whatsapp
# macOS Apple Silicon
GOOS = darwin GOARCH = arm64 go build -o whatsapp
# Windows
GOOS = windows GOARCH = amd64 go build -o whatsapp.exe
Troubleshooting
”command not found” Error
Ensure the binary is executable:
chmod +x whatsapp
./whatsapp rest
FFmpeg Not Found
# Verify FFmpeg installation
ffmpeg -version
# Install if missing
sudo apt install ffmpeg # Linux
brew install ffmpeg # macOS
libwebp Not Found
# Verify webp tools
cwebp -version
webpmux -version
# Install if missing
sudo apt install webp # Linux
brew install webp # macOS
macOS: “invalid flag in pkg-config”
Run this before starting the binary:
export CGO_CFLAGS_ALLOW = "-Xpreprocessor"
Add to ~/.zshrc or ~/.bashrc to make permanent:
echo 'export CGO_CFLAGS_ALLOW="-Xpreprocessor"' >> ~/.zshrc
source ~/.zshrc
Permission Denied on Storage
Ensure the storages directory is writable:
mkdir -p storages
chmod 755 storages
Next Steps
Environment Variables Complete configuration reference
Docker Deployment Alternative containerized deployment