Deploy wacli (Self-Hosted)
Self-host wacli with persistent WhatsApp sessions and continuous sync.
Just deployed
/data
Deploy and Host wacli (Self-Hosted) on Railway
wacli is a command-line WhatsApp client for syncing messages, searching local history, and sending text or media. This template includes a prebuilt image, persistent session storage, and continuous sync after you link your phone.
About Hosting wacli (Self-Hosted)
The template deploys one worker with a persistent /data volume. Your linked-device session, messages, and downloaded media survive redeployments. The worker waits for you to pair WhatsApp, then starts continuous sync automatically. No public domain or separate database is required.
Common Use Cases
- Keep a searchable copy of WhatsApp conversations on your own infrastructure.
- Search synced messages from the terminal or scripts.
- Use WhatsApp CLI commands in your own workflows.
Dependencies for wacli (Self-Hosted) Hosting
- Persistent storage, included in this template.
- A WhatsApp account and access to its primary phone.
- Railway SSH access to pair the phone and run commands.
Deployment Dependencies
Implementation Details
After deployment, open the wacli service’s SSH terminal and run wacli-pair. On your phone, open WhatsApp → Linked devices → Link a device and scan the QR code. You can also run wacli-pair --phone +15551234567 to link using a phone-number code. Once pairing and the initial sync finish, the worker starts continuous sync.
Run wacli-run --json auth status to check your session and wacli-run messages search "invoice" to search synced history. Keep one replica per volume. The template does not send messages automatically. wacli uses the WhatsApp Web protocol and is not affiliated with WhatsApp or Meta.
See the source repository and wacli documentation for setup and commands.
Why Deploy wacli (Self-Hosted) 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 wacli (Self-Hosted) on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.
Template Content