
Open Source SMS Gateway: Self-Host Your Own with an Android Phone (2026)
textbee is an MIT-licensed, self-hostable SMS gateway. What open source means here, self-hosted vs managed, how to run it with Docker Compose, and how it compares with Gammu and other Android gateways.
TL;DR
- textbee is open source: the Android app, backend server, and web dashboard are all on GitHub under a permissive license.
- You can self-host the entire stack (backend + dashboard) on your own server, or use the managed textbee.dev service and skip the infrastructure work.
- The Android app is the same in both cases; it is the piece that does the actual SMS sending through your phone's SIM.
- Compared to hardware-based open source gateways (Gammu, gnokii), the Android approach requires no serial port adapters, no deprecated modem libraries, and works with modern SIM cards.
- If you value data sovereignty and full control, self-hosting is the right call. If you want to ship fast and not manage a server, textbee.dev handles it.
"Open source SMS gateway" searches peak whenever developers hit a wall with proprietary SMS APIs: surprise pricing changes, geographic restrictions, privacy concerns, or just the principle of owning your own infrastructure. This post covers what's actually available in 2026, how textbee fits in, and how to decide between self-hosting and using a managed service.
What makes an SMS gateway "open source"
The term gets used loosely. Here's what it can mean:
Source-available: The code is published on GitHub, but the license may restrict commercial use or forking. Read the license carefully.
Self-hostable: You can run the entire stack on your own infrastructure: server, database, web dashboard. The vendor may also offer a managed cloud version.
Open protocol: The gateway uses standard interfaces (HTTP, AT commands, SMPP) rather than a proprietary SDK, so you can integrate anything without vendor lock-in.
textbee is all three: MIT-licensed code on GitHub, self-hostable backend, and a standard REST API that any HTTP client can call.
textbee's open source model
The textbee project is published at github.com/textbee/textbee. The repository includes:
- Android app: the gateway client that runs on your phone and handles SMS send/receive via Android's
SmsManagerAPI - Backend server: Node.js/NestJS API server that manages devices, queues messages, and handles webhooks
- Web dashboard: Next.js frontend for device management, message history, and API key management
License: MIT. You can use, modify, and distribute without restriction, including commercially.
What textbee.dev adds: The managed cloud service at textbee.dev runs the backend and dashboard for you, with uptime monitoring, SSL, and support. The Android app connects to textbee.dev's servers by default, but can be pointed at a self-hosted backend.
Self-hosted vs textbee.dev managed: the real trade-offs
| Dimension | Self-hosted | textbee.dev managed |
|---|---|---|
| Server cost | Your own VPS (about $5-10/month) | Included in subscription |
| Maintenance | You update, patch, monitor | Handled for you |
| Data sovereignty | Messages pass through your server | Messages pass through textbee.dev |
| Setup time | 30-60 minutes | 5 minutes |
| SSL / domain | You configure | Included |
| Uptime SLA | Your responsibility | Managed |
| Customization | Full, modify any component | Limited to API/webhook config |
| Best for | Privacy-sensitive, regulated, or custom integrations | Fast setup, most use cases |
If you're building an internal tool where message metadata is sensitive (healthcare, legal, finance), self-hosting keeps message logs entirely on infrastructure you control. If you just want SMS automation without infrastructure work, textbee.dev is the straightforward path.
How to self-host textbee
The stack is a NestJS API, a Next.js dashboard, MongoDB, and Redis (for the send queue), plus a Firebase project because the backend wakes the Android app through Firebase Cloud Messaging. The repository ships a docker-compose.yaml at the root that runs all of it.
git clone https://github.com/textbee/textbee.git
cd textbee
# One env file for the API, one for the dashboard
cp api/.env.example api/.env
cp web/.env.example web/.envIn api/.env, set at least the Mongo connection, a JWT secret, and the dashboard URL:
MONGO_URI=mongodb://adminUser:adminPassword@textbee-db:27017/textbee?authSource=admin
JWT_SECRET=change-me-to-a-long-random-string
FRONTEND_URL=https://sms.example.comAdd your Firebase service account credentials to the API env as the example file shows, then start everything:
docker compose up -dThat brings up MongoDB, Redis, the API, and the dashboard. Put Caddy or nginx in front for TLS; the README has a Caddyfile that routes /api/* to the API and everything else to the dashboard.
The Android app is the part people miss. The app's backend URL is a build-time constant, not a setting, and it needs your own Firebase google-services.json. For a fully self-hosted setup you build the app from source: replace textbee.dev with your domain in the project, drop in your Firebase config, and run ./gradlew assembleRelease. The README's self-hosting section walks through it. If you would rather not maintain an app build, the managed service is the practical alternative.
Server size: a small VPS (1 vCPU, 1-2 GB RAM) is enough to start; MongoDB, Redis, and the Firebase project are the dependencies.
Alternatives: other open source SMS gateway projects
Gammu / Wammu
Gammu is a Linux command-line tool for controlling mobile phones and modems via AT commands or the Gammu protocol. It's been around since the early 2000s and supports a wide range of Nokia and other GSM-era devices.
Pros: Battle-tested, wide device compatibility for legacy hardware, no cloud dependency.
Cons: Requires a USB or serial connection between the phone/modem and your server. Modern Android phones don't expose AT commands over USB. You need a dedicated GSM modem (hardware) or an older phone with the right cable and drivers. Setup is complex and documentation is sparse for modern use cases.
Best for: Teams with existing GSM modem hardware and Linux admin skills who need to maintain a legacy setup.
Android SMS Gateway (open source alternatives)
Several open source Android apps expose a REST API for SMS sending, similar to textbee. Search GitHub for "Android SMS gateway" and you will find projects in various states of maintenance.
Pros: Self-contained, no backend server needed for basic sending.
Cons: Many are abandoned or unmaintained. Missing features like webhook delivery status, multi-device management, inbound SMS routing, and a web dashboard. No managed service option if you don't want to self-host.
Best for: Simple personal projects where you want zero cloud dependency and don't need a web dashboard.
SMSGatewayHub / similar commercial open core
Some vendors publish a "community edition" with core features and charge for advanced ones. Read the license carefully: open source in the branding doesn't always mean MIT or Apache in the actual file.
Why Android beats GSM modems in 2026
The traditional open source SMS gateway approach, a Linux server with a USB GSM modem, still works, but comes with real friction:
- Modem drivers: USB GSM modems require kernel modules that often break on OS updates.
- AT command compatibility: Modern SIM cards and carrier firmware increasingly limit AT command access for security.
- Single SIM per modem: Scaling means buying more modems and USB hubs.
- No screen/feedback: Debugging a stuck modem with no display is painful.
An Android phone is a fully self-contained GSM modem with a modern OS, a display, automatic carrier updates, and a battery backup. The textbee app handles the radio layer internally; you just call an HTTP API.
For new self-hosted SMS gateway deployments in 2026, Android is the practical choice.
What you own vs what the gateway owns
A common concern with any SMS gateway: what data does the service see?
With textbee self-hosted:
- Message content passes through your server only and never touches textbee's infrastructure.
- Recipient phone numbers are stored in your database under your control.
- Delivery status events are generated by your Android app and posted to your server.
With textbee.dev managed:
- Message content and metadata pass through textbee.dev's servers while in transit and for logging purposes. Review the privacy policy at textbee.dev for current retention terms.
With any cloud SMS API (Twilio, Vonage, Plivo):
- All message content and metadata are stored by the provider, typically for 7-90 days depending on the plan.
Frequently asked questions
Is textbee really open source?
Yes. The full codebase (Android app, backend, and dashboard) is MIT-licensed on GitHub at github.com/textbee/textbee. You can fork it, modify it, self-host it, and use it commercially.
Can I self-host the backend and keep using the textbee.dev Android app?
No. The app from the Play Store and the download page talks to textbee.dev's API; its backend URL is compiled in, and it uses textbee.dev's Firebase project for push wake-ups. A self-hosted backend needs an app built from source against your own domain and your own Firebase config, as described above.
What's the difference between textbee and textbee.dev?
textbee is the open source project on GitHub. textbee.dev is the managed cloud service built on that project. Same codebase, different infrastructure responsibility. textbee.dev adds uptime management, SSL, backups, and support.
Can I contribute to textbee?
Yes. Open an issue or pull request on GitHub. The project welcomes contributions to the Android app, backend API, and dashboard. Check the contributing guide in the repository for code style and PR conventions.
Does self-hosting affect delivery reliability?
Self-hosting moves the backend infrastructure responsibility to you, but delivery itself always goes through the Android device and your SIM carrier, the same physical path regardless of whether the backend is self-hosted or managed. A well-configured self-hosted backend on a stable VPS delivers the same reliability as the managed service.
Is there a Docker setup available?
Yes. The repository root has a docker-compose.yaml that runs MongoDB, Redis, the API, and the dashboard together. The README's self-hosting section covers the environment files, the Firebase setup, and the reverse proxy.
Get started
Managed (fastest):
- Create an account at textbee.dev: free tier, no credit card
- Download the Android app
- Follow the 5-minute quickstart
Self-hosted:
- Clone github.com/textbee/textbee
- Fill in
api/.envandweb/.env, including your Firebase credentials, and rundocker compose up -d - Build the Android app from source against your domain and install it on the gateway phone
- Send your first SMS via your self-hosted API
Related reading:
- What is an Android SMS gateway?: architecture and how-it-works primer
- Run an SMS gateway on a Raspberry Pi or Linux box: a self-hosting walkthrough for homelabs
- Receive SMS with webhooks: two-way SMS setup
You may also like

What Is an Android SMS Gateway? How It Works, Pros, Cons & When to Use One (2026)
An Android SMS gateway turns a phone you already own into a programmable SMS sender. Learn how it works, when it beats Twilio, real costs, and setup steps.

SMS Gateway for Raspberry Pi and Linux Servers: Alerts via Your Android Phone
Send SMS alerts from a Raspberry Pi or Linux server using textbee and an Android phone as the gateway. Python scripts, bash/curl one-liners, systemd services, and Uptime Kuma webhook config.

9 Best Twilio Alternatives in 2026 (Cheaper SMS APIs Compared)
Compared: Plivo, Telnyx, Vonage, Bird, Sinch, Bandwidth, AWS SNS, ClickSend, and textbee. Real 2026 pricing, pros, and cons for each alternative.