### config.json example Source: https://github.com/etkecc/ketesa/blob/main/docs/config.md Example configuration for Ketesa using a config.json file. ```json { "restrictBaseUrl": [ "https://matrix.example.com", "https://synapse.example.net" ], "asManagedUsers": [ "^@baibot:example\\.com$", "^@slackbot:example\\.com$", "^@slack_[a-zA-Z0-9\\-]+:example\\.com$", "^@telegrambot:example\\.com$", "^@telegram_[a-zA-Z0-9]+:example\\.com$" ], "menu": [ { "label": "Contact support", "icon": "SupportAgent", "url": "https://github.com/etkecc/ketesa/issues" } ] } ``` -------------------------------- ### Development Example with Password Source: https://github.com/etkecc/ketesa/blob/main/docs/prefill-login-form.md This example shows how to prefill username, homeserver URL, and password for local development. ```bash http://localhost:8080?username=admin&server=https://matrix.example.com&password=secret ``` -------------------------------- ### Production Example Source: https://github.com/etkecc/ketesa/blob/main/docs/prefill-login-form.md This example demonstrates how to prefill the username and homeserver URL for a production environment. ```bash https://admin.etke.cc?username=admin&server=https://matrix.example.com ``` -------------------------------- ### config.json example Source: https://github.com/etkecc/ketesa/blob/main/docs/restrict-hs.md Example of restricting Ketesa to specific homeservers using config.json. ```json { "restrictBaseUrl": [ "https://matrix.example.com", "https://synapse.example.net" ] } ``` -------------------------------- ### Development Example with Access Token Source: https://github.com/etkecc/ketesa/blob/main/docs/prefill-login-form.md This example demonstrates prefilling the homeserver URL and access token for local development. ```bash http://localhost:8080?server=https://matrix.example.com&accessToken=secret ``` -------------------------------- ### Example CSV Source: https://github.com/etkecc/ketesa/blob/main/docs/csv-import.md An example of a CSV file that can be used for bulk user import, including required and optional columns. ```csv id,displayname,password,admin,is_guest,deactivated,avatar_url,threepids alice,Alice Example,s3cr3t,false,false,false,,email:alice@example.com bob,Bob Example,,false,false,false,, @carol:example.com,Carol Example,hunter2,true,false,false,mxc://example.com/abc123,email:carol@example.com ``` -------------------------------- ### /.well-known/matrix/client example Source: https://github.com/etkecc/ketesa/blob/main/docs/restrict-hs.md Example of restricting Ketesa to specific homeservers using the /.well-known/matrix/client endpoint. ```json { "cc.etke.ketesa": { "restrictBaseUrl": [ "https://matrix.example.com", "https://synapse.example.net" ] } } ``` -------------------------------- ### config.json Source: https://github.com/etkecc/ketesa/blob/main/docs/custom-menu.md Example configuration for adding a custom menu item in config.json. ```json { "menu": [ { "label": "Contact support", "i18n": { "de": "Support kontaktieren", "fr": "Contacter le support", "zh": "联系支持" }, "icon": "SupportAgent", "url": "https://github.com/etkecc/ketesa/issues" } ] } ``` -------------------------------- ### Example .well-known/matrix/client configuration for asManagedUsers Source: https://github.com/etkecc/ketesa/blob/main/docs/system-users.md This JSON snippet demonstrates how to configure `asManagedUsers` within the `.well-known/matrix/client` endpoint for Ketesa. ```json { "cc.etke.ketesa": { "asManagedUsers": [ "^@baibot:example\\.com$", "^@slackbot:example\\.com$", "^@slack_[a-zA-Z0-9\\-]+:example\\.com$", "^@telegrambot:example\\.com$", "^@telegram_[a-zA-Z0-9]+:example\\.com$" ] } } ``` -------------------------------- ### Injecting config.json into a Docker container Source: https://github.com/etkecc/ketesa/blob/main/README.md Example of how to use a bind mount to inject a config.json file into a Ketesa Docker container. ```yaml services: ketesa: ... volumes: - ./config.json:/var/public/config.json:ro ... ``` -------------------------------- ### /.well-known/matrix/client Source: https://github.com/etkecc/ketesa/blob/main/docs/custom-menu.md Example configuration for adding a custom menu item in /.well-known/matrix/client. ```json { "cc.etke.ketesa": { "menu": [ { "label": "Contact support", "i18n": { "de": "Support kontaktieren", "fr": "Contacter le support", "zh": "联系支持" }, "icon": "SupportAgent", "url": "https://github.com/etkecc/ketesa/issues" } ] } } ``` -------------------------------- ### Traefik reverse proxy configuration Source: https://github.com/etkecc/ketesa/blob/main/README.md Example Traefik configuration to serve Ketesa under a custom path. ```yaml services: traefik: image: traefik:v3 restart: unless-stopped ports: - 80:80 - 443:443 volumes: - /var/run/docker.sock:/var/run/docker.sock:ro ketesa: image: ghcr.io/etkecc/ketesa:latest restart: unless-stopped labels: - "traefik.enable=true" - "traefik.http.routers.admin.rule=Host(`example.com`) && PathPrefix(`/admin`)" - "traefik.http.services.admin.loadbalancer.server.port=8080" - "traefik.http.middlewares.admin-slashless-redirect.redirectregex.regex=(/admin)$$" - "traefik.http.middlewares.admin-slashless-redirect.redirectregex.replacement=$${1}/" - "traefik.http.middlewares.admin-strip-prefix.stripprefix.prefixes=/admin" - "traefik.http.routers.admin.middlewares=admin-slashless-redirect,admin-strip-prefix" ``` -------------------------------- ### Traefik docker-compose labels for Ketesa Source: https://github.com/etkecc/ketesa/blob/main/docs/reverse-proxy.md Example of Traefik labels for a docker-compose.yml file to serve Ketesa. ```yaml services: ketesa: image: ghcr.io/etkecc/ketesa:latest restart: unless-stopped labels: - "traefik.enable=true" - "traefik.http.routers.ketesa.rule=Host(`example.com`)" ``` -------------------------------- ### Nginx configuration for /auth-callback Source: https://github.com/etkecc/ketesa/blob/main/docs/external-auth-provider.md Example Nginx configuration to serve the auth-callback endpoint correctly when using MAS. ```nginx location / { try_files $uri $uri/ /index.html; } ``` -------------------------------- ### config.json example for externalAuthProvider Source: https://github.com/etkecc/ketesa/blob/main/docs/external-auth-provider.md Example of how to set the externalAuthProvider flag in config.json. ```json { "externalAuthProvider": true } ``` -------------------------------- ### Clone the repository Source: https://github.com/etkecc/ketesa/blob/main/README.md Steps to clone the Ketesa repository and set up the development environment. ```bash git clone https://github.com/etkecc/ketesa.git cd ketesa yarn install yarn start ``` -------------------------------- ### Building from source with custom prefixes Source: https://github.com/etkecc/ketesa/blob/main/docs/availability.md For custom prefixes other than /admin, build from source with yarn build --base=/your-prefix/ or pass the BASE_PATH Docker build argument. ```bash yarn build --base=/your-prefix/ ``` -------------------------------- ### /.well-known/matrix/client Source: https://github.com/etkecc/ketesa/blob/main/docs/cors-credentials.md Example configuration for corsCredentials in /.well-known/matrix/client. ```json { "cc.etke.ketesa": { "corsCredentials": "include" } } ``` -------------------------------- ### config.json Source: https://github.com/etkecc/ketesa/blob/main/docs/cors-credentials.md Example configuration for corsCredentials in config.json. ```json { "corsCredentials": "include" } ``` -------------------------------- ### Applying the Apache License Source: https://github.com/etkecc/ketesa/blob/main/LICENSES/Apache-2.0.txt This snippet shows how to apply the Apache License to your work by including the boilerplate notice. ```text Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. ```