{"id":19339479,"url":"https://github.com/code-tool/matrix-stack","last_synced_at":"2026-06-16T01:01:58.094Z","repository":{"id":237502578,"uuid":"793986883","full_name":"code-tool/matrix-stack","owner":"code-tool","description":"K8s charts for the matrix homeserver","archived":false,"fork":false,"pushed_at":"2026-06-07T09:43:04.000Z","size":568,"stargazers_count":4,"open_issues_count":1,"forks_count":3,"subscribers_count":4,"default_branch":"main","last_synced_at":"2026-06-07T11:23:23.162Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/code-tool.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-04-30T08:40:26.000Z","updated_at":"2026-06-07T09:42:56.000Z","dependencies_parsed_at":"2024-05-02T09:00:46.724Z","dependency_job_id":"0693ffbf-61ae-4c33-be45-0444bded5bbb","html_url":"https://github.com/code-tool/matrix-stack","commit_stats":null,"previous_names":["code-tool/matrix-stack"],"tags_count":287,"template":false,"template_full_name":null,"purl":"pkg:github/code-tool/matrix-stack","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/code-tool%2Fmatrix-stack","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/code-tool%2Fmatrix-stack/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/code-tool%2Fmatrix-stack/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/code-tool%2Fmatrix-stack/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/code-tool","download_url":"https://codeload.github.com/code-tool/matrix-stack/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/code-tool%2Fmatrix-stack/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34386320,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-15T02:00:07.085Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2024-11-10T03:22:23.782Z","updated_at":"2026-06-16T01:01:58.033Z","avatar_url":"https://github.com/code-tool.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Matrix-Stack\n\n\n## Helm repository\n\n```\nhelm repo add code-tool https://code-tool.github.io/matrix-stack/\n```\n\n\n## Charts overview\n\n1. `synapse` - for setting up matrix workers, MAS, sliding-sync, admin component\n1. `ldap` - for setting up LDAP proxy\n1. `sentry-webhook` - for webhook from sentry to matrix chat\n1. `webhook` - for webhook from slack-compatible clients to matrix chat\n1. `matrix-alertmanager-receiver` - for webhook from Prometheus Alertmanager to matrix chat\n1. `livekit-jwt` - for LiveKit management service\n1. `compress-state` - experimental tools that attempt to reduce the number of rows in the state_groups_state table inside of a Synapse Postgresql database\n\n\n## Visualisation\n\n![Matrix home servers setup overview](overview.png)\n\n## Synapse worker architecture\n\nThe core of synapse monolith distribution is complex regexp routing to particular workers.\n\nWorker types\n\n### synapse.app.generic_worker\n\nMost common worker type: can read data, respond to HTTP API, client and federation requests. Has no streams and cannot write any stream by itself.\n\nA generic worker can be:\n- reader - client_reader, federation_reader, sync, room\n- stream writer - if configured in the stream_writers section\n- both simultaneously\n\ngeneric_worker is not an architecture type - it is a behavior type determined by config.\n\n### Stream writer\n\nNot a separate app type - this is a role for a generic worker when it is listed in stream_writers. The stream writer owns a Redis stream exclusively; other workers write to that stream by\nsending HTTP requests to it.\n\nRequirements:\n- must be in instance_map\n- must have a replication listener (port 9093)\n\nSingleton streams (one writer only): typing, to_device, account_data, presence, push_rules\n\nScalable streams (round-robin across multiple writers): receipts, device_lists, thread_subscriptions, quarantined_media, events\n\n### synapse.app.media_repository\n\nThe only distinct worker app type, different from generic_worker:\n- uses media-specific headers\n- responds to /_matrix/media/, /_matrix/client/v1/media/, /_matrix/federation/v1/media/\n- can have a background job: media_instance_running_background_jobs\n- cannot be a stream writer\n- cannot respond to any client/federation endpoints\n\n### Background jobs\n\nGeneric workers with no HTTP endpoints:\n- background - singleton; stats, media cleanup, user directory updates\n- pusher - pusher_instances: [pusher1, pusher2]; sends push notifications\n- federation_sender - federation_sender_instances: [sender1, sender2]; outbound federation only\n\nWorker reference table\n\n| worker                                 | type          | scalable | possible lb algo     | http |\n|----------------------------------------|---------------|----------|----------------------|------|\n| typing                                 | stream writer | no       | -                    | yes  |\n| to_device                              | stream writer | no       | -                    | yes  |\n| account_data                           | stream writer | no       | -                    | yes  |\n| presence                               | stream writer | no       | -                    | yes  |\n| push_rules                             | stream writer | no       | -                    | yes  |\n| receipts                               | stream writer | yes      | round-robin          | yes  |\n| device_lists                           | stream writer | yes      | round-robin          | yes  |\n| thread_subscriptions                   | stream writer | yes      | round-robin          | yes  |\n| quarantined_media                      | stream writer | yes      | round-robin          | yes  |\n| events (persister)                     | stream writer | yes      | shard by room_id     | yes  |\n| media_repository                       | app           | yes      | least_conn           | yes  |\n| media_instance_running_background_jobs | app           | no       | -                    | no   |\n| room_worker                            | generic       | yes      | hash by room_id      | yes  |\n| sync_worker                            | generic       | yes      | hash by user_id      | yes  |\n| federation_reader                      | generic       | yes      | hash by source ip    | yes  |\n| client_reader                          | generic       | yes      | least_conn           | yes  |\n| user_dir                               | generic       | no       | -                    | yes  |\n| background_worker                      | generic       | no       | -                    | no   |\n| pusher                                 | generic       | yes      | shard by user        | no   |\n| federation_sender                      | generic       | yes      | shard by destination | no   |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcode-tool%2Fmatrix-stack","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcode-tool%2Fmatrix-stack","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcode-tool%2Fmatrix-stack/lists"}