Self-hosted SMS Gateway for Android private server plus a full Web UI control layer and Zapier-friendly API.
- SMS Gateway: Android app connects here; you send/receive SMS via the API.
- Web UI (port 4842): Admin login (optional), then Dashboard, Send SMS, Devices, Messages, Logs, Webhooks, Settings, Health. Set "Device account" (sms-gate credentials from the app) in the Web UI to use API-backed pages. Credentials are stored only in your session.
- Zapier:
POST /api/sendremains public; see zapier/README.md.
On a fresh machine: clone the repo, cd into it, then run:
./install-and-run-sms-gate-server.shThe script generates secrets, creates config.yml and .env, starts the stack, and prints a private token. Use that token in the Android app (Settings → Cloud Server). To send SMS, open the Web UI and enter the device Username and Password (from the app) plus phone and message; credentials are not stored on the server.
Updating an existing install: Run ./install-and-run-sms-gate-server.sh and choose Update (U). Database, config, and .env are kept; only images are rebuilt and containers restarted (no re-registering phones or losing SMS history).
Manual setup (alternative):
- Copy
config.example.ymltoconfig.yml; set database password,gateway.private_token, andjwt.secret(e.g.openssl rand -base64 32). - Create
.envwithDB_PASSWORD. Optionally setWEBUI_ADMIN_USER,WEBUI_ADMIN_PASSWORD, andWEBUI_SECRET_KEY(e.g.openssl rand -hex 24) to enable Web UI login. - Run
docker compose up -d. API: http://localhost:4841, Web UI: http://localhost:4842.
| Path | Description |
|---|---|
install-and-run-sms-gate-server.sh |
Interactive install: creates config and .env, starts stack; device credentials are entered in the Web UI |
docker-compose.yml |
db, server (sms-gate), worker, webui |
config.yml |
Server config (not in git; created by install script or from config.example.yml) |
webui/ |
Flask app: admin auth, Dashboard, Send SMS, Devices, Messages, Logs, Webhooks, Settings, Health; POST /api/send public for Zapier |
zapier/README.md |
Copy-pastable Zapier blocks |
- Login: If
WEBUI_ADMIN_USERandWEBUI_ADMIN_PASSWORDare set, you must log in first. SetWEBUI_SECRET_KEYwhen using auth. - Device account: After login, set the "Device account" (sms-gate device username/password from the Android app) to use Devices, Messages, Logs, Webhooks, Settings. Stored in session only.
- Pages: Dashboard, Send SMS, Devices (list/remove), Messages (list/detail/enqueue), Logs (from/to filter), Webhooks (list/add/delete), Settings (view/patch), Health.
- POST /api/send – Public; JSON body:
{"username": "...", "password": "...", "phone": "+...", "message": "..."}. For Zapier/scripts; credentials sent per request.
- Run behind a reverse proxy (e.g. Nginx/Caddy) with HTTPS.
- Use a subdomain (e.g.
https://sms.yourcompany.com) for the Web UI and/or the sms-gate API as needed. - Keep
config.ymland.envout of version control; useconfig.example.ymlas reference.
- SEND-SMS-API.md – API usage and send flow.
- TAILSCALE-SERVE.md – Tailscale HTTPS for the Android app.
- zapier/README.md – Zapier webhook and direct API blocks.
SMS Gateway for Android is under its own license. This repo’s additions (Web UI, scripts, docs) are for use with that project.