gitmyhub

gorush

Go ★ 8.7k updated 2d ago

A push notification server written in Go (Golang).

A self-hosted push notification server written in Go that sends messages to iOS, Android, and Huawei devices through a simple HTTP or gRPC API call, no third-party SaaS required.

GoDockergRPCKubernetesYAMLsetup: moderatecomplexity 3/5

Gorush is a self-hosted push notification server written in Go. It acts as a central service you run on your own infrastructure that sends push notifications to iOS, Android, and Huawei devices on your behalf. Instead of each part of your backend talking directly to Apple or Google's notification systems, everything goes through gorush via a simple HTTP API call.

To send a notification, you POST a JSON payload to gorush specifying the device token, the platform (iOS, Android, or Huawei), a title, and a message. The server takes care of forwarding that to Apple Push Notification Service, Firebase Cloud Messaging, or Huawei's equivalent, whichever applies. You can include multiple notifications in a single request. The server queues incoming requests and processes them with a configurable number of worker processes running in parallel, which helps maintain throughput under load.

Setup involves downloading a binary (or running the provided Docker image), creating a YAML configuration file that specifies your Apple or Firebase credentials and which platforms to enable, and starting the server. The average memory footprint is around 28 megabytes. There is also a built-in statistics endpoint that shows how many notifications succeeded or failed.

Beyond the basics, gorush supports running as a gRPC service in addition to HTTP, integrates with several queue backends for higher-volume deployments, can expose metrics for monitoring tools, and handles TLS certificate provisioning automatically. It can run inside containers and is documented for deployment on Kubernetes and AWS Lambda.

A live demo instance is available, and the repository links to a sample Flutter application to test notifications end to end. The full README is longer than what was shown.

Where it fits