GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com β€” GitHub - android-sms-gateway/server: The SMS Gateway for Androidβ„’ Server enables the dispatch of SMS messages through Android devices without requiring direct Internet access to them.

BranchesTags
Open more actions menu

Latest commit

 

History

618 Commits
618 Commits

Folders and files

NameName
Last commit message
Last commit date
.github
.github
 
 
.vscode
.vscode
 
 
api
api
 
 
build/package
build/package
 
 
cmd/sms-gateway
cmd/sms-gateway
 
 
configs
configs
 
 
db
db
 
 
deployments
deployments
 
 
internal
internal
 
 
pkg
pkg
 
 
scripts
scripts
 
 
test/e2e
test/e2e
 
 
.air.toml
.air.toml
 
 
.dockerignore
.dockerignore
 
 
.env.example
.env.example
 
 
.gitignore
.gitignore
 
 
.golangci.yml
.golangci.yml
 
 
.goreleaser.yaml
.goreleaser.yaml
 
 
CHANGELOG.md
CHANGELOG.md
 
 
Dockerfile.goreleaser
Dockerfile.goreleaser
 
 
LICENSE
LICENSE
 
 
Makefile
Makefile
 
 
README.md
README.md
 
 
go.mod
go.mod
 
 
go.sum
go.sum
 
 

Repository files navigation

πŸ“± SMSGate Server

Contributors Forks Stars Issues License

Backend for the SMSGate ecosystem: a REST API that dispatches SMS/MMS through connected Android devices, with optional private deployment.

πŸ“š Table of Contents

  • πŸ“± SMSGate Server
    • πŸ“š Table of Contents
    • πŸ“– About
    • ⭐ Features
    • πŸ“¦ Prerequisites
    • πŸš€ Quickstart
    • βš™οΈ Configuration
      • Worker Tasks
    • πŸ” Authentication
    • πŸ”Œ API Overview
    • πŸ“š Documentation
    • 🀝 Contributing
    • πŸ—ΊοΈ Roadmap
    • πŸ“ž Contact
    • βš–οΈ License
    • πŸ“œ Legal Notice

πŸ“– About

SMSGate Server is the backend of the SMSGate ecosystem. It accepts SMS/MMS dispatch requests through a REST API, routes them to connected Android devices over Firebase Cloud Messaging, and tracks delivery state. It runs in two modes: public (anonymous device registration, used at api.sms-gate.app) and private (token-protected registration, push relayed through the upstream). Deep docs: https://docs.sms-gate.app/.

⭐ Features

  • Text, data, scheduled SMS and MMS dispatch
  • Message status tracking and cancellation
  • Message listing with filtering, sorting and limit/offset pagination
  • Device management (list, delete, last-seen and SIM card info)
  • Health check endpoints (live, ready, startup)
  • JWT authentication with scopes and token refresh
  • OTP-based device registration
  • Inbox and settings APIs
  • Public and private deployment modes
  • Redis-backed cache and pub/sub for multi-replica deployments
  • Prometheus metrics at /metrics
  • MySQL 8.0.13+ / MariaDB 10.2.7+ storage (MariaDB LTS recommended)

πŸ“¦ Prerequisites

  • MySQL 8.0.13+ or MariaDB 10.2.7+ database (MariaDB LTS recommended)
  • Docker + Docker Compose for container setup
  • Go 1.26+ for building from source

πŸš€ Quickstart

  1. Create configs/config.yml from configs/config.example.yml.
  2. For private mode set gateway.mode: private and gateway.private_token.
  3. Start the server:
docker run -p 3000:3000 \
  -v ./configs/config.yml:/app/config.yml \
  ghcr.io/android-sms-gateway/server:latest

Or with Compose (backend + background worker + MariaDB):

docker compose -f deployments/docker-compose/docker-compose.yml up --build

The worker handles background tasks: message hashing, message/device/token/inbox cleanup. Run it as a separate process or via the worker subcommand:

./sms-gateway worker

Or with the Helm chart:

helm install sms-gate deployments/helm-chart

Local development:

make run        # go run ./cmd/sms-gateway/main.go
make air        # hot-reload dev server (TZ=UTC DEBUG=1)
make db-upgrade # apply migrations

βš™οΈ Configuration

Configuration lives in configs/config.example.yml; every key can be overridden by env vars using SECTION__KEY (e.g. DATABASE__HOST, GATEWAY__MODE). Key sections: database, gateway, http, fcm, sse, messages, cache, pubsub, jwt, otp, plus tasks (worker only).

export GATEWAY__MODE=private
export GATEWAY__PRIVATE_TOKEN=change-me
export DATABASE__HOST=localhost
export HTTP__LISTEN=0.0.0.0:3000

See configs/config.example.yml for all options and .env.example for every supported environment variable.

Worker Tasks

The background worker runs periodic tasks controlled by the tasks config section:

Task Default Interval Purpose
messages_hashing 168h (7 days) Hash processed messages to avoid plain text storage
messages_cleanup 24h Delete messages older than max_age (default 720h / 30 days)
devices_cleanup 24h Remove inactive devices older than max_age (default 8760h / 1 year)
tokens_cleanup 24h Revoke expired tokens past max_age grace (default 1h)
inbox_cleanup 24h Delete inbox messages and attachments older than max_age (default 720h / 30 days)

πŸ” Authentication

The API supports Basic auth and JWT bearer tokens. JWT tokens carry scopes and are issued per user:

  • POST /api/3rdparty/v1/auth/token - issue access/refresh pair (Basic auth)
  • POST /api/3rdparty/v1/auth/token/refresh - rotate access token (Bearer refresh)
  • DELETE /api/3rdparty/v1/auth/token/{jti} - revoke token (Basic auth)

Available scopes: messages:send, messages:list, messages:read, messages:export, messages:cancel, devices:list, devices:delete, inbox:list, inbox:read, inbox:refresh, logs:read, settings:read, settings:write, tokens:manage, tokens:refresh, webhooks:list, webhooks:write, webhooks:delete.

Full reference: integration/authentication.

πŸ”Œ API Overview

Group Base path
Messages /api/3rdparty/v1/messages
Devices /api/3rdparty/v1/devices
Webhooks /api/3rdparty/v1/webhooks
Inbox /api/3rdparty/v1/inbox
Settings /api/3rdparty/v1/settings
Health /api/3rdparty/v1/health[/live | /ready | /startup]
Auth /api/3rdparty/v1/auth/token
Mobile /api/mobile/v1

Also available: root health probes at /health, /health/live, /health/ready and /health/startup, Prometheus metrics at /metrics, and the API catalog at /.well-known/api-catalog.

GET /api/3rdparty/v1/logs is registered but always responds 501 Not Implemented.

Swagger UI is served at /api/docs/index.html (spec at /api/docs/doc.json) when http.openapi.enabled: true. It covers the third-party API; the mobile API is not part of the published schema.

πŸ“š Documentation

  • Private server setup
  • API integration
  • Authentication
  • Webhooks

🀝 Contributing

Open an issue first, then submit a PR. Run make lint and make test locally.

πŸ—ΊοΈ Roadmap

Track planned work and known issues in the issue tracker.

πŸ“ž Contact

  • Email: [email protected]
  • Documentation: docs.sms-gate.app
  • Issues: github.com/android-sms-gateway/server/issues

βš–οΈ License

Apache-2.0. See LICENSE.

πŸ“œ Legal Notice

Android is a trademark of Google LLC.

About

The SMS Gateway for Androidβ„’ Server enables the dispatch of SMS messages through Android devices without requiring direct Internet access to them.

docs.sms-gate.app

Topics

androidapibackendmobile-messagingremote-smsrest-apiserversms-gateway

Resources

Readme
Apache-2.0 license
Activity
Custom properties

Stars

207 stars

Watchers

1 watching

Forks

82 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402520 β€” GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800Γ—600. No cookies required.