{"id":13557765,"url":"https://github.com/matrix-org/sygnal","last_synced_at":"2025-05-16T04:03:44.180Z","repository":{"id":24776361,"uuid":"28189842","full_name":"matrix-org/sygnal","owner":"matrix-org","description":"Sygnal: reference Push Gateway for Matrix","archived":false,"fork":false,"pushed_at":"2025-05-12T11:32:40.000Z","size":925,"stargazers_count":187,"open_issues_count":40,"forks_count":153,"subscribers_count":27,"default_branch":"main","last_synced_at":"2025-05-12T11:37:13.050Z","etag":null,"topics":["hacktoberfest","matrix","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/matrix-org.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2014-12-18T15:48:48.000Z","updated_at":"2025-04-06T15:54:38.000Z","dependencies_parsed_at":"2023-10-01T15:29:29.863Z","dependency_job_id":"81c48d4a-4096-41b7-b3b2-9a7ca1218f25","html_url":"https://github.com/matrix-org/sygnal","commit_stats":{"total_commits":390,"total_committers":48,"mean_commits":8.125,"dds":0.7717948717948718,"last_synced_commit":"b83661c8991e4cd5ebe3c248992a9cb40451eaae"},"previous_names":[],"tags_count":31,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matrix-org%2Fsygnal","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matrix-org%2Fsygnal/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matrix-org%2Fsygnal/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matrix-org%2Fsygnal/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/matrix-org","download_url":"https://codeload.github.com/matrix-org/sygnal/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254464891,"owners_count":22075570,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["hacktoberfest","matrix","python"],"created_at":"2024-08-01T12:04:32.019Z","updated_at":"2025-05-16T04:03:44.157Z","avatar_url":"https://github.com/matrix-org.png","language":"Python","funding_links":[],"categories":["Python","hacktoberfest"],"sub_categories":[],"readme":"Introduction\n============\n\nSygnal is a reference Push Gateway for [Matrix](https://matrix.org/).\n\nSee https://spec.matrix.org/latest/push-gateway-api/#overview for a high\nlevel overview of how notifications work in Matrix.\n\nThe [Matrix Specification](https://spec.matrix.org/latest/push-gateway-api/)\ndescribes the protocol that Matrix Home Servers use to send notifications to Push\nGateways such as Sygnal.\n\n\nContributing\n============\n\nLooking to contribute to Sygnal? See [CONTRIBUTING.md](CONTRIBUTING.md)\n\n\nSetup\n=====\n\nSygnal is configured through a YAML configuration file. By default, this\nconfiguration file is assumed to be named `sygnal.yaml` and to be in the\nworking directory. To change this, set the `SYGNAL_CONF` environment\nvariable to the path to your configuration file. A sample configuration\nfile is provided in this repository; see `sygnal.yaml.sample`.\n\nThe `apps:` section is where you set up different apps that\nare to be handled. Each app should be given its own subsection, with the\nkey of that subsection being the app's `app_id`. Keys in this section\ntake the form of the `app_id`, as specified when setting up a Matrix\npusher (see\nhttps://spec.matrix.org/latest/client-server-api/#post_matrixclientv3pushersset).\n\nSee the sample configuration for examples.\n\nYou can find a docker image for sygnal [on DockerHub](https://hub.docker.com/r/matrixdotorg/sygnal).\n\n\nApp Types\n---------\n\nThere are two supported App Types:\n\n\n### apns\n\nThis sends push notifications to iOS apps via the Apple Push\nNotification Service (APNS).\n\nThe expected configuration depends on which kind of authentication you\nwish to use.\n\nFor certificate-based authentication, it expects:\n\n- the `certfile` parameter to be a path relative to sygnal's\n  working directory of a PEM file containing the APNS\n  certificate and unencrypted private key.\n\nFor token-based authentication, it expects:\n\n- the `keyfile` parameter to be a path relative to Sygnal's\n  working directory of a p8 file\n- the `key_id` parameter\n- the `team_id` parameter\n- the `topic` parameter, which is most commonly the 'Bundle Identifier' for your\n  iOS application\n\nFor either type, it can accept:\n\n- the `platform` parameter which determines whether the production or sandbox\n  APNS environment is used.\n  Valid values are 'production' or 'sandbox'. If not provided, 'production' is used.\n- the `push_type` parameter which determines what value for the `apns-push-type` header is sent to\n  APNs. If not provided, the header is not sent.\n- the `convert_device_token_to_hex` parameter which determines if the\n  token provided from the client is b64 decoded and converted to\n  hex. Some client libraries already provide the token in hex, and\n  this should be set to `False` if so.\n\n### gcm\n\nThis sends messages via Google/Firebase Cloud Messaging (GCM/FCM)\nand hence can be used to deliver notifications to Android apps.\n\nThe expected configuration depends on which version of the firebase api you\nwish to use.\n\nFor legacy API, it expects:\n\n- the `api_key` parameter to contain the `Server key`,\n  which can be acquired from Firebase Console at:\n  `https://console.firebase.google.com/project/\u003cPROJECT NAME\u003e/settings/cloudmessaging/`\n    \nFor API v1, it expects:\n\n- the `api_version` parameter to contain `v1`\n- the `project_id` parameter to contain the `Project ID`,\n  which can be acquired from Firebase Console at:\n  `https://console.cloud.google.com/project/\u003cPROJECT NAME\u003e/settings/general/`\n- the `service_account_file` parameter to contain the path to the service account file,\n  which can be acquired from Firebase Console at:\n  `https://console.firebase.google.com/project/\u003cPROJECT NAME\u003e/settings/serviceaccounts/adminsdk`\n\nUsing an HTTP Proxy for outbound traffic\n----------------------------------------\n\nSygnal will, by default, automatically detect an `HTTPS_PROXY`\nenvironment variable on start-up.\n\nIf one is present, it will be used for outbound traffic to APNs and\nGCM/FCM.\n\nCurrently only HTTP proxies with the CONNECT method are supported. (Both\nAPNs and FCM use HTTPS traffic which is tunnelled in a CONNECT tunnel.)\n\nIf you wish, you can instead configure a HTTP CONNECT proxy in\n`sygnal.yaml`.\n\n\nPusher `data` configuration\n===========================\n\nThe following parameters can be specified in the `data`\ndictionary which is given when configuring the pusher via\n[POST /_matrix/client/v3/pushers/set](https://spec.matrix.org/latest/client-server-api/#post_matrixclientv3pushersset):\n\n- `default_payload`: a dictionary which defines the basic payload to\n  be sent to the notification service. Sygnal will merge information\n  specific to the push event into this dictionary. If unset, the empty\n  dictionary is used.\n\n  This can be useful for clients to specify default push payload\n  content. For instance, iOS clients will have freedom to use\n  silent/mutable notifications and be able to set some default\n  alert/sound/badge fields.\n\n\nRunning\n=======\n\nWith default configuration file name of `sygnal.yaml`:\n\n```sh\npython -m sygnal.sygnal\n```\n\nWith custom configuration file name:\n\n```sh\nSYGNAL_CONF=/path/to/custom_sygnal.conf python -m sygnal.sygnal\n```\n\nPython 3.8 or higher is required.\n\n\nLog Rotation\n============\n\nSygnal's logging appends to files but does not use a rotating logger.\nThe recommended configuration is therefore to use `logrotate`. The log\nfile will be automatically reopened if the log file changes, for example\ndue to `logrotate`.\n\n\nMore Documentation\n==================\n\nMore documentation for Sygnal is available in the `docs` directory:\n\n-   [Notes for Application Developers](docs/applications.md)\n-   [Troubleshooting](docs/troubleshooting.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmatrix-org%2Fsygnal","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmatrix-org%2Fsygnal","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmatrix-org%2Fsygnal/lists"}