textbee Logotextbee.dev
Plans from $9.99/mo.View Plans
Open Source SMS Gateway: Self-Host Your Own with an Android Phone (2026)

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.

TT

textbee team

9 min read
Share

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 SmsManager API
  • 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

DimensionSelf-hostedtextbee.dev managed
Server costYour own VPS (about $5-10/month)Included in subscription
MaintenanceYou update, patch, monitorHandled for you
Data sovereigntyMessages pass through your serverMessages pass through textbee.dev
Setup time30-60 minutes5 minutes
SSL / domainYou configureIncluded
Uptime SLAYour responsibilityManaged
CustomizationFull, modify any componentLimited to API/webhook config
Best forPrivacy-sensitive, regulated, or custom integrationsFast 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.

Shell
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/.env

In 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.com

Add your Firebase service account credentials to the API env as the example file shows, then start everything:

Shell
docker compose up -d

That 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):

  1. Create an account at textbee.dev: free tier, no credit card
  2. Download the Android app
  3. Follow the 5-minute quickstart

Self-hosted:

  1. Clone github.com/textbee/textbee
  2. Fill in api/.env and web/.env, including your Firebase credentials, and run docker compose up -d
  3. Build the Android app from source against your domain and install it on the gateway phone
  4. Send your first SMS via your self-hosted API

Related reading: