docs: Add livekit testing + troubleshooting instructions, and other small changes #1429

Open
stratself wants to merge 21 commits from stratself/continuwuity:stratself/docs-livekit-fixes into main
Contributor

This pull request adds two new sections for the Livekit page. First, the testing instructions to replicate its token flow against the new /get_token endpoint. Second, the troubleshooting section with commonly-seen issues. It also:

  • Moves Livekit's inbuilt TURN section above the external TURN integration section
  • Advertises both inbuilt + external TURN options in the Calls page
  • Adds a caveat for non-federating deployments (#1440) (now included as part of Troubleshooting section)
  • Smaller fixes:
    • Improves Livekit's related documentations section with organized links
    • Fixes some URLs to match with rest of documentation
    • Add Livekit key:secret pair examples in docs
    • Add matrixrtc room address for further assistance

Pull request checklist:

  • This pull request targets the main branch, and the branch is named something other than
    main.
  • I have written an appropriate pull request title and my description is clear.
  • I understand I am responsible for the contents of this pull request.
  • I have followed the contributing guidelines:
<!-- In order to help reviewers know what your pull request does at a glance, you should ensure that 1. Your PR title is a short, single sentence describing what you changed 2. You have described in more detail what you have changed, why you have changed it, what the intended effect is, and why you think this will be beneficial to the project. If you have made any potentially strange/questionable design choices, but didn't feel they'd benefit from code comments, please don't mention them here - after opening your pull request, go to "files changed", and click on the "+" symbol in the line number gutter, and attach comments to the lines that you think would benefit from some clarification. --> This pull request adds two new sections for the Livekit page. First, the testing instructions to replicate its token flow against the new `/get_token` endpoint. Second, the troubleshooting section with commonly-seen issues. It also: - Moves Livekit's inbuilt TURN section above the external TURN integration section - Advertises both inbuilt + external TURN options in the Calls page - Adds a caveat for non-federating deployments (#1440) (now included as part of Troubleshooting section) - Smaller fixes: - Improves Livekit's related documentations section with organized links - Fixes some URLs to match with rest of documentation - Add Livekit key:secret pair examples in docs - Add matrixrtc room address for further assistance <!-- Example: This pull request allows us to warp through time and space ten times faster than before by double-inverting the warp drive with hyperheated jump fluid, both making the drive faster and more efficient. This resolves the common issue where we have to wait more than 10 milliseconds to engage, use, and disengage the warp drive when travelling between galaxies. --> <!-- Closes: #... --> <!-- Fixes: #... --> <!-- Uncomment the above line(s) if your pull request fixes an issue or closes another pull request by superseding it. Replace `#...` with the issue/pr number, such as `#123`. --> **Pull request checklist:** <!-- You need to complete these before your PR can be considered. If you aren't sure about some, feel free to ask for clarification in #dev:continuwuity.org. --> - [x] This pull request targets the `main` branch, and the branch is named something other than `main`. - [x] I have written an appropriate pull request title and my description is clear. - [x] I understand I am responsible for the contents of this pull request. - I have followed the [contributing guidelines][c1]: - [x] My contribution follows the [code style][c2], if applicable. - [ ] I ran [pre-commit checks][c1pc] before opening/drafting this pull request. - [x] I have [tested my contribution][c1t] (or proof-read it for documentation-only changes) myself, if applicable. This includes ensuring code compiles. - [x] My commit messages follow the [commit message format][c1cm] and are descriptive. - [ ] I have written a [news fragment][n1] for this PR, if applicable<!--(can be done after hitting open!)-->. <!-- Notes on these requirements: - While not required, we encourage you to sign your commits with GPG or SSH to attest the authenticity of your changes. - While we allow LLM-assisted contributions, we do not appreciate contributions that are low quality, which is typical of machine-generated contributions that have not had a lot of love and care from a human. Please do not open a PR if all you have done is asked ChatGPT to tidy up the codebase with a +-100,000 diff. - In the case of code style violations, reviewers may leave review comments/change requests indicating what the ideal change would look like. For example, a reviewer may suggest you lower a log level, or use `match` instead of `if/else` etc. - In the case of code style violations, pre-commit check failures, minor things like typos/spelling errors, and in some cases commit format violations, reviewers may modify your branch directly, typically by making changes and adding a commit. Particularly in the latter case, a reviewer may rebase your commits to squash "spammy" ones (like "fix", "fix", "actually fix"), and reword commit messages that don't satisfy the format. - Pull requests MUST pass the `Checks` CI workflows to be capable of being merged. This can only be bypassed in exceptional circumstances. If your CI flakes, let us know in matrix:r/dev:continuwuity.org. - Pull requests have to be based on the latest `main` commit before being merged. If the main branch changes while you're making your changes, you should make sure you rebase on main before opening a PR. Your branch will be rebased on main before it is merged if it has fallen behind. - We typically only do fast-forward merges, so your entire commit log will be included. Once in main, it's difficult to get out cleanly, so put on your best dress, smile for the cameras! --> [c1]: https://forgejo.ellis.link/continuwuation/continuwuity/src/branch/main/CONTRIBUTING.md [c2]: https://forgejo.ellis.link/continuwuation/continuwuity/src/branch/main/docs/development/code_style.mdx [c1pc]: https://forgejo.ellis.link/continuwuation/continuwuity/src/branch/main/CONTRIBUTING.md#pre-commit-checks [c1t]: https://forgejo.ellis.link/continuwuation/continuwuity/src/branch/main/CONTRIBUTING.md#running-tests-locally [c1cm]: https://forgejo.ellis.link/continuwuation/continuwuity/src/branch/main/CONTRIBUTING.md#commit-messages [n1]: https://towncrier.readthedocs.io/en/stable/tutorial.html#creating-news-fragments
* separate links into categories in order of importance: guides, specs, source codes
* add short description to included community guides
* add Element Call, lk-jwt-service, and the livekit MSCs too
The purpose is to simplify new deployments, which are more likely
to use Livekit-only calls. This also makes docs flow a bit better
docs: add livekit testing instructions against new /get_token endpoint
Some checks failed
Documentation / Build and Deploy Documentation (pull_request) Has been skipped
Checks / Prek / Pre-commit & Formatting (pull_request) Failing after 15m12s
Checks / Prek / Clippy and Cargo Tests (pull_request) Failing after 20m59s
dece29f19f
ginger left a comment
Owner

lgtm, just a few copyedits

lgtm, just a few copyedits
@ -262,0 +237,4 @@
To improve LiveKit's reliability, you can configure it to use your coturn server.
Generate a long random secret for LiveKit, and add it to your coturn config under the `static-auth-secret` option. You can add as many secrets as you want - so set a different one for each thing using your TURN server.
Owner

that should probably be a comma, not a hyphen

that should probably be a comma, not a hyphen
stratself marked this conversation as resolved
@ -239,3 +208,1 @@
## LiveKit's built in TURN server
Livekit includes a built in TURN server which can be used in place of an external option. This TURN server will only work with Livekit, so you can't use it for legacy Matrix calling - or anything else.
Livekit includes a built in TURN server which can be used in place of an external option. This TURN server will only work with Livekit, so you can't use it for legacy Matrix calling or anything else.
Owner

inconsistent capitalization of LiveKit

inconsistent capitalization of LiveKit
stratself marked this conversation as resolved
@ -262,0 +239,4 @@
Generate a long random secret for LiveKit, and add it to your coturn config under the `static-auth-secret` option. You can add as many secrets as you want - so set a different one for each thing using your TURN server.
Then configure livekit, making sure to replace `COTURN_SECRET` with the ones you generated:
Owner

inconsistent capitalization of LiveKit

inconsistent capitalization of LiveKit
stratself marked this conversation as resolved
@ -262,0 +261,4 @@
## Testing
To test that Livekit is successfully integrated with Continuwuity, you will need to replicate its [Token Exchange Flow](https://github.com/element-hq/lk-jwt-service?tab=readme-ov-file#%EF%B8%8F-how-it-works--token-exchange-flow). First, request an OpenID token from your Matrix server:
Owner

inconsistent capitalization of LiveKit

inconsistent capitalization of LiveKit
@ -262,0 +268,4 @@
https://matrix.example.com/_matrix/client/v3/user/@user:example.com/openid/request_token
```
Your `<session-access-token>` can be found in your client device, or via [this website](https://timedout.uk/mxtoken.html). The step above will respond with an `access_token` for use with the lk-jwt-service.
Owner

s/client device/client's settings

s/client device/client's settings
stratself marked this conversation as resolved
@ -262,0 +303,4 @@
curl -X POST -d @payload.json https://livekit.example.com/get_token
```
The JWT service will respond with a `jwt` token. Use this token to test at the [LiveKit Connection Tester](https://livekit.io/connection-test) - if everything works there, then you have set up Livekit successfully!
Owner

inconsistent capitalization of LiveKit

inconsistent capitalization of LiveKit
stratself marked this conversation as resolved
docs: apply changes from feedback
Some checks failed
Documentation / Build and Deploy Documentation (pull_request) Has been skipped
Checks / Prek / Pre-commit & Formatting (pull_request) Failing after 3m36s
Update flake hashes / update-flake-hashes (pull_request) Successful in 1m11s
Checks / Prek / Clippy and Cargo Tests (pull_request) Failing after 20m0s
5244c55bf9
turn all the things into LiveKit
Author
Contributor

I've applied the corrections

I've applied the corrections
docs: add caveat for deployment with non-federated instances
Some checks failed
Documentation / Build and Deploy Documentation (pull_request) Has been skipped
Update flake hashes / update-flake-hashes (pull_request) Successful in 1m9s
Checks / Prek / Pre-commit & Formatting (pull_request) Failing after 1m53s
Checks / Prek / Clippy and Cargo Tests (pull_request) Failing after 7m33s
2f1d4ecdbc
Author
Contributor

Added a reference to #1440. Could be removed later

Added a reference to #1440. Could be removed later
stratself force-pushed stratself/docs-livekit-fixes from 2f1d4ecdbc
Some checks failed
Documentation / Build and Deploy Documentation (pull_request) Has been skipped
Update flake hashes / update-flake-hashes (pull_request) Successful in 1m9s
Checks / Prek / Pre-commit & Formatting (pull_request) Failing after 1m53s
Checks / Prek / Clippy and Cargo Tests (pull_request) Failing after 7m33s
to aa1fcade9d
All checks were successful
Documentation / Build and Deploy Documentation (pull_request) Has been skipped
Checks / Prek / Pre-commit & Formatting (pull_request) Successful in 2m17s
Checks / Prek / Clippy and Cargo Tests (pull_request) Successful in 48m44s
2026-02-24 14:28:44 +00:00
Compare
@ -241,0 +276,4 @@
```
The JWT service will respond with a `jwt` token. Use this token to test at the [LiveKit Connection Tester](https://livekit.io/connection-test) - if everything works there, then you have set up LiveKit successfully!
<<<<<<< HEAD
Contributor

Uh did you forget to resolve a merge conflict?

Uh did you forget to resolve a merge conflict?
Contributor

Just because this <<<<<<< HEAD I think is not intended.

Just because this `<<<<<<< HEAD` I think is not intended.
stratself marked this conversation as resolved
@ -241,0 +293,4 @@
Guides:
- [Element Call self-hosting documentation](https://github.com/element-hq/element-call/blob/livekit/docs/self-hosting.md)
<<<<<<< HEAD
Contributor

Same here.

Same here.
Author
Contributor

I have resolved the conflicts in a new commit.

I have resolved the conflicts in a new commit.
stratself marked this conversation as resolved
* separate links into categories in order of importance: guides, specs, source codes
* add short description to included community guides
* add Element Call, lk-jwt-service, and the livekit MSCs too
The purpose is to simplify new deployments, which are more likely
to use Livekit-only calls. This also makes docs flow a bit better
docs: add livekit testing instructions against new /get_token endpoint
Some checks failed
Documentation / Build and Deploy Documentation (pull_request) Has been skipped
Checks / Prek / Pre-commit & Formatting (pull_request) Failing after 15m12s
Checks / Prek / Clippy and Cargo Tests (pull_request) Failing after 20m59s
dece29f19f
docs: apply changes from feedback
Some checks failed
Documentation / Build and Deploy Documentation (pull_request) Has been skipped
Checks / Prek / Pre-commit & Formatting (pull_request) Failing after 3m36s
Update flake hashes / update-flake-hashes (pull_request) Successful in 1m11s
Checks / Prek / Clippy and Cargo Tests (pull_request) Failing after 20m0s
5244c55bf9
turn all the things into LiveKit
docs: add caveat for deployment with non-federated instances
Some checks failed
Documentation / Build and Deploy Documentation (pull_request) Has been skipped
Update flake hashes / update-flake-hashes (pull_request) Successful in 1m9s
Checks / Prek / Pre-commit & Formatting (pull_request) Failing after 1m53s
Checks / Prek / Clippy and Cargo Tests (pull_request) Failing after 7m33s
2f1d4ecdbc
docs(livekit): new troubleshooting section and other small changes
Some checks failed
Documentation / Build and Deploy Documentation (pull_request) Has been skipped
Checks / Prek / Pre-commit & Formatting (pull_request) Has been cancelled
Checks / Prek / Clippy and Cargo Tests (pull_request) Has been cancelled
Update flake hashes / update-flake-hashes (pull_request) Successful in 45s
6f100b73ce
* add link to matrix-rtc room
* include livekit key-secret pair examples for clarity with livekit.yaml
* troubleshooting: add common EC errors and docker networking subsections
* fix a merge conflict issue
stratself changed title from docs: Add livekit testing instructions, prioritize Livekit's inbuilt TURN instructions, and small changes to docs: Add livekit testing + troubleshooting instructions, and other small changes 2026-03-03 19:58:32 +00:00
@ -25,0 +28,4 @@
~$ docker run --rm livekit/livekit-server:latest generate-keys
API Key: APIUxUnMnSkuFWV
API Secret: t93ZVjPeoEdyx7Wbet3kG4L3NGZIZVEFvqe0UuiVc22A
Contributor

Should there be a newline here?

Should there be a newline here?
@ -241,0 +242,4 @@
## Testing
To test that LiveKit is successfully integrated with Continuwuity, you will need to replicate its [Token Exchange Flow](https://github.com/element-hq/lk-jwt-service?tab=readme-ov-file#%EF%B8%8F-how-it-works--token-exchange-flow). First, request an OpenID token from your Matrix server:
Contributor

This one doesn't really matter but you can shorten this a little: https://github.com/element-hq/lk-jwt-service#%EF%B8%8F-how-it-works--token-exchange-flow

This one doesn't really matter but you can shorten this a little: https://github.com/element-hq/lk-jwt-service#%EF%B8%8F-how-it-works--token-exchange-flow
@ -241,0 +249,4 @@
https://matrix.example.com/_matrix/client/v3/user/@user:example.com/openid/request_token
```
Your `<session-access-token>` can be found in your client's settings, or via [this website](https://timedout.uk/mxtoken.html). The step above will respond with an `access_token` for use with the lk-jwt-service.
Contributor

Should this maybe be the first step instead? (Fetching an access token)

And then the fetching OpenID can be second step?

Might be more intuitive, when reading this it kind of jumps in order.

Should this maybe be the first step instead? (Fetching an access token) And then the fetching OpenID can be second step? Might be more intuitive, when reading this it kind of jumps in order.
Some checks failed
Documentation / Build and Deploy Documentation (pull_request) Has been skipped
Checks / Prek / Pre-commit & Formatting (pull_request) Has been cancelled
Required
Details
Checks / Prek / Clippy and Cargo Tests (pull_request) Has been cancelled
Required
Details
Update flake hashes / update-flake-hashes (pull_request) Successful in 45s
This pull request is blocked because it's outdated.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u stratself/docs-livekit-fixes:stratself-stratself/docs-livekit-fixes
git switch stratself-stratself/docs-livekit-fixes
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
continuwuation/continuwuity!1429
No description provided.