{"id":17443070,"url":"https://github.com/adrianrudnik/matrix-wellknown-server","last_synced_at":"2025-03-01T20:31:02.110Z","repository":{"id":104038327,"uuid":"320683152","full_name":"adrianrudnik/matrix-wellknown-server","owner":"adrianrudnik","description":"Simple and slim server to answer well-known requests for matrix.org servers.","archived":false,"fork":false,"pushed_at":"2022-08-21T18:30:27.000Z","size":269,"stargazers_count":10,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-23T22:11:13.679Z","etag":null,"topics":["golang","matrix-org","matrix-schema","well-known"],"latest_commit_sha":null,"homepage":"","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/adrianrudnik.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}},"created_at":"2020-12-11T21:01:13.000Z","updated_at":"2024-09-25T07:56:56.000Z","dependencies_parsed_at":"2023-09-22T15:32:50.948Z","dependency_job_id":null,"html_url":"https://github.com/adrianrudnik/matrix-wellknown-server","commit_stats":{"total_commits":8,"total_committers":1,"mean_commits":8.0,"dds":0.0,"last_synced_commit":"b2bb70b8371c63f4bf35fb181adcc9dc7234564e"},"previous_names":["adrianrudnik/matrix-schema-server"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adrianrudnik%2Fmatrix-wellknown-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adrianrudnik%2Fmatrix-wellknown-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adrianrudnik%2Fmatrix-wellknown-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adrianrudnik%2Fmatrix-wellknown-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/adrianrudnik","download_url":"https://codeload.github.com/adrianrudnik/matrix-wellknown-server/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241421043,"owners_count":19960213,"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":["golang","matrix-org","matrix-schema","well-known"],"created_at":"2024-10-17T16:43:18.305Z","updated_at":"2025-03-01T20:31:01.775Z","avatar_url":"https://github.com/adrianrudnik.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Matrix schema server\n\nSimple and slim server to answer `well-known` requests for [matrix.org](https://matrix.org) servers based on the request\nhost header, to be used behind a reverse proxy of your choice.\n\nFeatures:\n\n- Have a single server instance serve as many different domains on the same reverse proxy as required.\n- Simple managment by passing through your JSON files queried by the `Host`-header.\n- Low footprint (~8MB RAM, 10MB binary), no heavy dependencies (single binary), fast responses (~1ms).\n\n# Setup example\n\nFor my own domain `klonmaschine.de` I use the following docker-compose setup:\n\n```\nversion: '3.7'\n\nservices:\n  updater:\n    image: adrianrudnik/matrix-wellknown-server:latest\n    volumes:\n      - ./schema:/var/schema\n    ports:\n      - 8080:8080\n```\n\nNow let's define the response to `/.well-known/matrix/server` if a request with an `Host: klonmaschine.de` header is\nreceived by placing a file into `./schema/klonmaschine.de.server.json`:\n\n```json\n{\n  \"m.server\": \"matrix.klonmaschine.de:8448\"\n}\n```\n\nThe same for `/.well-known/matrix/client` requests, placed into `./schema/klonmaschine.de.client.json`:\n\n```json\n{\n  \"m.homeserver\": {\n    \"base_url\": \"https://matrix.klonmaschine.de:8448\"\n  }\n}\n```\n\nNow boot it up with `docker-compose up -d` and the following requests are answered correctly and offer CORS support as\nwell:\n\nhttps://klonmaschine.de/.well-known/matrix/server  \nhttp://klonmaschine.de/.well-known/matrix/client\n\n# Environment variables\n\nThe following configuration can be done by passing environment variables to this app:\n\n| Key | Description | Default |\n| --- | --- | --- |\n| BIND_ADDR | HTTP bind address | `:8080` |\n| SCHEMA_ROOT | Root folder for schema JSON files | `/var/schema` |\n\n# Remarks\n\nThe element.io client does not use the server schema to resolve the homeserver. You need to specify the matrix server as\nfull domain, in my example `matrix.klonmaschine.de` to connect to it.\n\n# Reserver proxy examples\n\n## Traefik\n\nI use this slightly redacted version to serve the app:\n\n```yaml\nhttp:\n  routers:\n    matrix-wellknown-server:\n      rule: \"PathPrefix(`/.well-known/matrix/`)\"\n      priority: 1000\n      entryPoints:\n        - https\n      service: wellknown-server\n      tls:\n        certResolver: http-le\n        \n  services:\n    wellknown-server:\n      loadBalancer:\n        servers:\n          - url: \"http://wellknown-server:8080\"\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadrianrudnik%2Fmatrix-wellknown-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadrianrudnik%2Fmatrix-wellknown-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadrianrudnik%2Fmatrix-wellknown-server/lists"}