Your Android phones as an SMS API for your apps and AI agents, on your own Cloudflare account.
Simline Community is one Cloudflare Worker: the REST API, the dashboard and one Durable Object per paired phone. It runs on the Workers Free plan. Your texts, contacts and keys stay in your own Cloudflare account.
- REST API and webhooks: send texts, read conversations, get signed
message.*anddevice.*events. - Dashboard: inbox, conversations, contacts with STOP opt-out, devices, API keys, members.
- Phones: pair Android phones (multi-SIM) and see who's online. iPhone texts go through Simline for Mac on a Mac with Messages.
- AI agents over MCP: each agent gets its own key and rules, and texts can wait for your approval in the dashboard or in Telegram.
- Telegram: connect your own bot for incoming texts, approvals and alerts.
Chat with us and other self-hosters on Discord: https://discord.gg/NNa99jE488
- Click Deploy to Cloudflare above. Cloudflare copies this repository to your GitHub
account, creates the D1 database and asks for the secrets:
SESSION_SECRET(required): 32+ random characters, e.g.openssl rand -hex 32.SETUP_TOKEN(required for the first sign-in): 24+ characters, e.g.openssl rand -hex 16.- The rest are optional (see Configuration); leave them empty for now.
- When the deploy finishes, open
https://<your worker>/setup?token=<SETUP_TOKEN>and create the owner account. The dashboard opens. - Set
APP_ORIGINandAPI_ORIGINinwrangler.jsoncto your Worker's URL and push, so links in emails and Telegram messages sent in the background point at your server. - Pair a phone (below).
You need Node.js 22+, pnpm and a Cloudflare account.
pnpm install
pnpm build
pnpm exec wrangler deploy # first time: creates the Worker and the D1 database
pnpm db:migrate # creates the tables
pnpm exec wrangler secret put SESSION_SECRET
pnpm exec wrangler secret put SETUP_TOKENThen open https://<your worker>/setup?token=<SETUP_TOKEN>. Later updates: pnpm build && pnpm run deploy
(applies new migrations, then deploys).
- Android: install Simline Community, the open-source app for Community servers, from its releases (an APK). In Devices → Pair a phone, scan the QR code with the phone's camera (it opens the app with your server and the code filled in), or type your server's address and the code in the app.
- iPhone (through a Mac): on a Mac signed in to Messages, run the command the dashboard
shows, e.g.
npx @simline/mac@latest pair ABC123 --api https://<your worker>.
- Owner link:
https://<your worker>/setup?token=<SETUP_TOKEN>creates the owner account the first time and signs the owner in afterwards. TreatSETUP_TOKENlike a password; delete the secret to turn the link off. - Email links: set up Email Routing on a
domain, uncomment the
send_emailbinding andEMAIL_FROMinwrangler.jsonc. On the Free plan a Worker can only email addresses you verified in Email Routing, so this suits a small team. - Google or GitHub: create an OAuth app, set
GOOGLE_CLIENT_ID/GITHUB_CLIENT_IDinwrangler.jsoncand the matching*_CLIENT_SECRETsecret. Callback URL:https://<your worker>/v1/auth/oauth/google/callback(or/github/callback). - Turnstile (optional): set
TURNSTILE_SITE_KEYand theTURNSTILE_SECRET_KEYsecret to protect the email form.
Invite teammates from Members in the dashboard.
Secrets (wrangler secret put NAME, or .dev.vars locally; see .dev.vars.example):
| Secret | |
|---|---|
SESSION_SECRET |
Required. Signs sign-in sessions. |
SETUP_TOKEN |
Owner link (/setup). |
SECRETS_KEY |
Encrypts Telegram bot tokens. Needed for Telegram. |
GOOGLE_CLIENT_SECRET, GITHUB_CLIENT_SECRET |
OAuth sign-in. |
TURNSTILE_SECRET_KEY |
Turnstile on the email form. |
FCM_SERVICE_ACCOUNT |
Your own Firebase service account (JSON), to wake sleeping Android phones. Without it phones stay connected on their own. |
Variables live in wrangler.jsonc (vars), with comments.
Simline uses no Queues and no paid features. What runs out first:
| Free-plan limit | What uses it | Roughly |
|---|---|---|
| D1: 100,000 rows written a day | Every text and status update (rows and their indexes) | About 70 rows per outbound text with one webhook endpoint, fewer without: around 1,400 outbound texts a day. |
| Workers + Durable Objects: 100,000 requests a day each | API calls, dashboard, cron (about 1,500 a day), phone messages | Plenty for the texts above; an open dashboard refreshes every 30 seconds. |
| Workers CPU: 10 ms per request | Every request | Most API calls fit. A burst of work (many texts at once) can go over; Cloudflare then answers that request with an error and the phone or client retries. |
| D1: 5 GB, Durable Objects: 5 GB | Message history | Years of texts for a small team. |
Need more? The Workers Paid plan lifts these limits without code changes. Prefer not to run a server at all? Simline Cloud is the hosted service from the same team.
pnpm install
cp .dev.vars.example .dev.vars # set SESSION_SECRET and SETUP_TOKEN
pnpm db:migrate:local
pnpm build && pnpm dev # http://localhost:8787, pairing code DEVABC with ENVIRONMENT=development
pnpm typecheck && pnpm testpnpm dev:dashboard runs the dashboard with hot reload against wrangler dev.
node scripts/dev-phone.mjs --url http://localhost:8787 pretends to be a phone, and
node scripts/webhook-receiver.mjs prints the webhooks it receives.
The phone ↔ server protocol is defined by the schemas in src/protocol.
| Path | |
|---|---|
src/index.ts |
The Worker: API, dashboard assets, Durable Objects, crons. |
src/api |
REST API, MCP, auth, webhooks, Telegram, the DeviceSession Durable Object. |
src/app |
The dashboard (React). |
src/protocol |
The phone protocol's schemas. |
migrations |
D1 schema. |
Simline Community is free software under the GNU Affero General Public License v3.0. If you run a modified version for others, the AGPL asks you to share your changes with them. For other terms, see COMMERCIAL.md. "Simline" is a trademark; see TRADEMARK.md.
Issues are the best way to contribute (we build Simline with an agent-driven workflow): see CONTRIBUTING.md. Security issues: SECURITY.md.