Firebase Cloud Messaging self-hosted relay redirecting push notifications through UnifiedPush — Open Grind's optional add-on
go
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-10-27 19:39:32 +01:00
internal Add the self-hosted single-device FCM to UnifiedPush relay 2026-10-27 19:19:18 +01:00
.gitignore Add the Go module and the FCM/MCS client adapted from fcmandroid 2026-10-27 18:27:50 +01:00
go.mod Add the Go module and the FCM/MCS client adapted from fcmandroid 2026-10-27 18:27:50 +01:00
LICENSE Add the Go module and the FCM/MCS client adapted from fcmandroid 2026-10-27 18:27:50 +01:00
main.go Add the self-hosted single-device FCM to UnifiedPush relay 2026-10-27 19:19:18 +01:00
README.md Add arm64 build command to README 2026-10-27 19:39:32 +01:00
THIRD-PARTY.md Add the Go module and the FCM/MCS client adapted from fcmandroid 2026-10-27 18:27:50 +01:00

Open Grind FCM relay

A self-hosted Firebase relay that receives Grindr's push notifications and pushes to your Android device via UnifiedPush.

Caution

FCM relay can read all your push notifications, including personal chats. Host on your own server in a trusted environment. Never use shared FCM relays.

Download fcm-relay (zero dependencies, reproducible, single binary).

How it works

Without fcm-relay (default Open Grind's Fast Mode):

      ┌──────────────┐            ╭~─~─~─~─~─~╮
      │  Grindr API  │───push────▶│ FCM cloud │
      └──────────────┘            ╰~─~─~┬~─~─~╯
             ▲                          ╎
             │                          ╎
             │                          ╎
             │                          ╎
             │                          ╎
             │                      ┌───┴────┐
             │                      │        │
             │                      │  your  │
             └──register FCM token──┤ device │
                                    │        │
                                    └────────┘

With self-hosted fcm-relay (de-Googled Open Grind's Fast Mode users):

      ┌──────────────┐           ╭~─~─~─~─~─~╮
      │  Grindr API  │───push───▶│ FCM cloud │
      └──────────────┘           ╰~─~─~┬~─~─~╯
             ▲                         ╎
             │                         ╎╶╶ plain text push
             │                         ╎
             │   ┌─ your own server ───╎────────┐         
             │   │               ┌─────┴─────┐  │                    ┌─────────────┐
             │   │               │ fcm-relay │──┼──encrypted push───▶│ UnifiedPush │      
             │   │               └───────────┘  │                    │ distributor │
             │   │                     ⇡        │                    └──────┬──────┘
             │   │  ⚠ can view your chats       │                           ╎
             │   └──────────────────────────────┘                           ╎
             │                                                              ╎
             │                                                          ┌───┴────┐
             │                                                          │        │
             │                                                          │  your  │
             └──────────────────────register FCM token──────────────────┤ device │
                                                                        │        │
                                                                        └────────┘

Each fcm-relay instance serves a single device to prevent public shared instances.

Usage

  1. Download the binary:

    wget https://git.opengrind.org/open-grind/fcm-relay/releases/download/v1.0.0/fcm-relay-v1.0.0-linux-x86_64 -O fcm-relay
    

    or compile yourself (requires Go 1.26+; to reproduce the release, see reproducible builds):

    git clone https://git.opengrind.org/open-grind/fcm-relay.git fcm-relay
    cd fcm-relay
    go build -o fcm-relay .
    
  2. Then install it to the system:

install -o root -g root -m755 ./fcm-relay /usr/local/bin/fcm-relay
  1. Run fcm-relay
./fcm-relay --listen 127.0.0.1:8787 --data-dir /var/lib/fcm-relay

Flags:

  • --listen — TCP address to listen on
  • --data-dir (default $STATE_DIRECTORY, falls back to ~/.config/fcm-relay) — state directory for state.json (0600) file

On first start it registers the fake device, generates a VAPID key, and prints a pairing code. Put fcm-relay behind a reverse proxy with TLS to make it reachable from your phone.

Reproducible builds

Prerequisites:

  • the same source, same commit checked out
  • GOTOOLCHAIN=go1.27.1
  • CGO_ENABLED=0
  • -trimpath
  • -buildvcs=false

Build a release artifact for a given target from any host:

for pair in amd64:x86_64 arm64:aarch64; do
  arch=${pair%%:*}; name=${pair##*:}
  CGO_ENABLED=0 GOOS=linux GOARCH="$arch" GOTOOLCHAIN=go1.27.1 \
    go build -trimpath -buildvcs=false -ldflags='-s -w' -o "fcm-relay-v1.0.0-linux-$name" .
done

License

MIT