Add example caddy-docker-proxy configuration to livekit documentation #1762

Open
Cease wants to merge 4 commits from Cease/continuwuity:main into main
First-time contributor

This pull request adds a full docker-compose example configuration using caddy-docker-proxy to the livekit section of the documentation

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 a full docker-compose example configuration using caddy-docker-proxy to the livekit section of the documentation <!-- 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. - [x] 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. <!-- 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
docs: add example caddy-docker-proxy configuration
Some checks are pending
Documentation / Build and Deploy Documentation (pull_request) Blocked by required conditions
Checks / Prek / Pre-commit & Formatting (pull_request) Blocked by required conditions
Checks / Prek / Check changed files (pull_request) Blocked by required conditions
Checks / Prek / Clippy and Cargo Tests (pull_request) Blocked by required conditions
Auto Labeler / Apply labels based on changed files (pull_request_target) Successful in 33s
Checks / Changelog / Check changelog is added (pull_request_target) Successful in 36s
8a4fb59bf9
Contributor

Hi Cease and thanks for the PR. As discussed in the mrtc room, would you mind only include the needed Caddy labels for livekit, jwt, and caddy? I'll leave some other comments below too

FYI, the example caddy labels have been updated (normal version, and delegated version)

Hi Cease and thanks for the PR. As discussed in the mrtc room, would you mind only include the needed Caddy labels for livekit, jwt, and caddy? I'll leave some other comments below too FYI, the example caddy labels have been updated ([normal version](https://continuwuity.org/deploying/docker.html#caddy-using-labels), and [delegated version](https://continuwuity.org/advanced/delegation#docker-compose-examples))
stratself requested changes 2026-05-14 05:05:22 +00:00
Dismissed
stratself left a comment

See review comments

See review comments
@ -190,0 +190,4 @@
<details>
<summary>Example full docker compose file with caddy-docker-proxy</summary>
```yaml
# This example uses a separate TURN server that is configured separately to provide backwards
Contributor

References to coturn could be removed entirely, to keep this short

References to coturn could be removed entirely, to keep this short
Author
First-time contributor

fixed

fixed
Cease marked this conversation as resolved
@ -190,0 +209,4 @@
networks:
- caddy
labels:
caddy: livekit.example.domain
Contributor

Please use example.com to be consistent with docs, for this instance and all other instances in your additions

Please use `example.com` to be consistent with docs, for this instance and all other instances in your additions
Author
First-time contributor

fixed

fixed
Cease marked this conversation as resolved
@ -190,0 +233,4 @@
- "7881:7881/tcp"
- "50100-50200:50100-50200/udp"
turn:
Contributor

References to TURN could be removed entirely

References to TURN could be removed entirely
Author
First-time contributor

removed turn mentions

removed turn mentions
Cease marked this conversation as resolved
@ -190,0 +258,4 @@
restart: unless-stopped
labels:
caddy: example.domain
caddy.0_header: "*"
Contributor

I'm not sure if the header labels are needed, since Continuwuity can function fine without them (and actually set the ACAO header itself). Do let me know if this is needed for any reason

I'm not sure if the header labels are needed, since Continuwuity can function fine without them (and actually set the ACAO header itself). Do let me know if this is needed for any reason
Author
First-time contributor

I had issues with this when I was setting up livekit initially - but that was a good while ago. I'll leave them commented out and add some details so people can uncomment them if they need them

I had issues with this when I was setting up livekit initially - but that was a good while ago. I'll leave them commented out and add some details so people can uncomment them if they need them
Cease marked this conversation as resolved
@ -190,0 +264,4 @@
caddy.0_header.Access-Control-Allow-Headers: "Authorization"
caddy.0_header.Content-Type: "application/json"
caddy.1_respond: /.well-known/matrix/server {"m.server":"matrix.example.domain:443"}
caddy.2_respond: /.well-known/matrix/client {"m.server":{"base_url":"https://matrix.example.domain"},"m.homeserver":{"base_url":"https://matrix.example.domain"},"org.matrix.msc4143.rtc_foci":[{"type":"livekit","livekit_service_url":"https://livekit.example.domain"}]}
Contributor

It's good to also include the option to reverse proxy .well-knowns back to continuwuity

Perhaps add some commented-out lines with the following:

        # If you already configured `[global.well_known]` with Continuwuity,
        # comment out the *_respond labels and add this line
        # caddy.reverse_proxy: /.well-known/matrix/* homeserver:8008
It's good to also include the option to reverse proxy .well-knowns back to continuwuity Perhaps add some commented-out lines with the following: ```yaml # If you already configured `[global.well_known]` with Continuwuity, # comment out the *_respond labels and add this line # caddy.reverse_proxy: /.well-known/matrix/* homeserver:8008 ```
Author
First-time contributor

added

added
Cease marked this conversation as resolved
@ -190,0 +293,4 @@
- caddy
labels:
caddy: matrix.example.domain
caddy.reverse_proxy: "{{upstreams 6167}}"
Contributor

s/6167/8008 to use the default port. Then the entire environment: section can be removed

s/6167/8008 to use the default port. Then the entire `environment:` section can be removed
Cease marked this conversation as resolved
@ -190,0 +296,4 @@
caddy.reverse_proxy: "{{upstreams 6167}}"
volumes:
Contributor

volumes: and networks: may be removed if all the container snippets are just focused on labels, e.g.:

services:
  caddy:
    image: docker.io/lucaslorentz/caddy-docker-proxy:ci-alpine
    # ...
    labels:
       caddy: example.com
       more_labels_here: true
`volumes:` and `networks:` may be removed if all the container snippets are just focused on labels, e.g.: ```yaml services: caddy: image: docker.io/lucaslorentz/caddy-docker-proxy:ci-alpine # ... labels: caddy: example.com more_labels_here: true ```
Author
First-time contributor

fixed

fixed
Cease marked this conversation as resolved
docs: clean up caddy-docker-proxy section as requested
Some checks are pending
Documentation / Build and Deploy Documentation (pull_request) Blocked by required conditions
Deploy Element Web / 🏗️ Build and Deploy (pull_request) Blocked by required conditions
Checks / Prek / Pre-commit & Formatting (pull_request) Blocked by required conditions
Checks / Prek / Check changed files (pull_request) Blocked by required conditions
Checks / Prek / Clippy and Cargo Tests (pull_request) Blocked by required conditions
Update flake hashes / update-flake-hashes (pull_request) Blocked by required conditions
Checks / Changelog / Check changelog is added (pull_request_target) Successful in 9s
d5ae34078a
Cease force-pushed main from d5ae34078a
Some checks are pending
Documentation / Build and Deploy Documentation (pull_request) Blocked by required conditions
Deploy Element Web / 🏗️ Build and Deploy (pull_request) Blocked by required conditions
Checks / Prek / Pre-commit & Formatting (pull_request) Blocked by required conditions
Checks / Prek / Check changed files (pull_request) Blocked by required conditions
Checks / Prek / Clippy and Cargo Tests (pull_request) Blocked by required conditions
Update flake hashes / update-flake-hashes (pull_request) Blocked by required conditions
Checks / Changelog / Check changelog is added (pull_request_target) Successful in 9s
to aa795dab7a
Some checks are pending
Documentation / Build and Deploy Documentation (pull_request) Blocked by required conditions
Checks / Prek / Pre-commit & Formatting (pull_request) Blocked by required conditions
Checks / Prek / Check changed files (pull_request) Blocked by required conditions
Checks / Prek / Clippy and Cargo Tests (pull_request) Blocked by required conditions
Checks / Changelog / Check changelog is added (pull_request_target) Successful in 9s
2026-05-15 16:41:27 +00:00
Compare
Contributor

LGTM

LGTM
stratself approved these changes 2026-05-16 10:23:06 +00:00
Dismissed
docs: additional livekit caddy-docker-proxy cleanup
Some checks failed
Documentation / Build and Deploy Documentation (pull_request) Blocked by required conditions
Checks / Prek / Pre-commit & Formatting (pull_request) Blocked by required conditions
Checks / Prek / Check changed files (pull_request) Blocked by required conditions
Checks / Prek / Clippy and Cargo Tests (pull_request) Blocked by required conditions
Checks / Changelog / Check changelog is added (pull_request_target) Successful in 30s
Update flake hashes / update-flake-hashes (pull_request) Has been cancelled
f3b178b333
Cease force-pushed main from f3b178b333
Some checks failed
Documentation / Build and Deploy Documentation (pull_request) Blocked by required conditions
Checks / Prek / Pre-commit & Formatting (pull_request) Blocked by required conditions
Checks / Prek / Check changed files (pull_request) Blocked by required conditions
Checks / Prek / Clippy and Cargo Tests (pull_request) Blocked by required conditions
Checks / Changelog / Check changelog is added (pull_request_target) Successful in 30s
Update flake hashes / update-flake-hashes (pull_request) Has been cancelled
to 86e75f064a
Some checks are pending
Documentation / Build and Deploy Documentation (pull_request) Blocked by required conditions
Checks / Prek / Pre-commit & Formatting (pull_request) Blocked by required conditions
Checks / Prek / Check changed files (pull_request) Blocked by required conditions
Checks / Prek / Clippy and Cargo Tests (pull_request) Blocked by required conditions
Checks / Changelog / Check changelog is added (pull_request_target) Successful in 31s
2026-05-16 12:43:34 +00:00
Compare
Cease force-pushed main from 86e75f064a
Some checks are pending
Documentation / Build and Deploy Documentation (pull_request) Blocked by required conditions
Checks / Prek / Pre-commit & Formatting (pull_request) Blocked by required conditions
Checks / Prek / Check changed files (pull_request) Blocked by required conditions
Checks / Prek / Clippy and Cargo Tests (pull_request) Blocked by required conditions
Checks / Changelog / Check changelog is added (pull_request_target) Successful in 31s
to 817821b073
Some checks failed
Checks / Changelog / Check changelog is added (pull_request_target) Successful in 8s
Documentation / Build and Deploy Documentation (pull_request) Has been cancelled
Checks / Prek / Pre-commit & Formatting (pull_request) Has been cancelled
Checks / Prek / Check changed files (pull_request) Has been cancelled
Checks / Prek / Clippy and Cargo Tests (pull_request) Has been cancelled
2026-05-16 13:53:10 +00:00
Compare
Contributor

Maintainers don't merge, gonna review a bit

Maintainers don't merge, gonna review a bit
@ -190,0 +267,4 @@
volumes:
db:
networks:
Contributor

Currently, networks is missing in the homeserver service, but available on all other containers, which can be confusing. I think it's better to remove networks: entirely including this global definition

Currently, `networks` is missing in the `homeserver` service, but available on all other containers, which can be confusing. I think it's better to remove `networks:` entirely including this global definition
Author
First-time contributor

fixed

fixed
Cease marked this conversation as resolved
stratself left a comment

SFLR, I requested some changes. Lemme know what you think

SFLR, I requested some changes. Lemme know what you think
@ -190,0 +190,4 @@
<details>
<summary>Example docker compose file with caddy-docker-proxy labels</summary>
```yaml
services:
Contributor

Since we'll be removing all networks: attribute, let's add a comment at the top saying that this setup assumes all containers share the same bridge network

Since we'll be removing all `networks:` attribute, let's add a comment at the top saying that this setup assumes all containers share the same bridge network
Author
First-time contributor

fixed

fixed
Cease marked this conversation as resolved
@ -190,0 +202,4 @@
caddy.@lk-jwt-service.path: "/sfu/get* /healthz* /get_token*"
caddy.reverse_proxy: "@lk-jwt-service {{upstreams 8081}}"
ports:
- "8081:8081"
Contributor

this wouldn't be needed in a Docker bridge network

this wouldn't be needed in a Docker bridge network
Author
First-time contributor

fixed

fixed
Cease marked this conversation as resolved
@ -190,0 +218,4 @@
volumes:
- ./livekit.yaml:/etc/livekit.yaml:ro
ports:
- "127.0.0.1:7880:7880/tcp"
Contributor

this wouldn't be needed in a Docker bridge network

this wouldn't be needed in a Docker bridge network
Author
First-time contributor

fixed

fixed
Cease marked this conversation as resolved
@ -190,0 +239,4 @@
- ./data:/data
restart: unless-stopped
labels:
# If you are having problems with continuwuity serving headers uncomment
Contributor

Let's move the header stuff below the .well-known stuff

Let's move the header stuff below the `.well-known` stuff
Author
First-time contributor

fixed

fixed
Cease marked this conversation as resolved
@ -190,0 +225,4 @@
caddy:
# This compose file uses caddy-docker-proxy as the reverse proxy for Continuwuity!
# For more info, visit https://github.com/lucaslorentz/caddy-docker-proxy
Contributor

These 2 lines of comments can be removed

These 2 lines of comments can be removed
Cease marked this conversation as resolved
@ -190,0 +249,4 @@
# caddy.0_header.Access-Control-Allow-Headers: "Authorization"
# caddy.0_header.Content-Type: "application/json"
# If you already configured `[global.well_known]` with Continuwuity,
Contributor

Let's move the .well-known stuff above the headers stuff - they're more important contextually

Let's move the `.well-known` stuff above the headers stuff - they're more important contextually
Author
First-time contributor

fixed

fixed
Cease marked this conversation as resolved
@ -190,0 +258,4 @@
homeserver:
image: forgejo.ellis.link/continuwuation/continuwuity:latest
restart: unless-stopped
# add additional environment and network config here...
Contributor

environment, volume, and network config

environment, **volume**, and network config
Author
First-time contributor

fixed

fixed
Cease marked this conversation as resolved
@ -190,0 +264,4 @@
caddy.reverse_proxy: "{{upstreams 8008}}"
volumes:
Contributor

The volumes: stuff can be removed

The `volumes:` stuff can be removed
Author
First-time contributor

fixed

fixed
Cease marked this conversation as resolved
stratself requested changes 2026-05-21 06:49:19 +00:00
Dismissed
stratself left a comment
No description provided.
<!-- placeholder -->
Contributor

You may wanna add a newsfrag describing your additions and crediting yourself :)

You may wanna add a [newsfrag](https://continuwuity.org/development/contributing.html#writing-news-fragments) describing your additions and crediting yourself :)
docs: remove network tags from config and improve clarity on comments
Some checks are pending
Documentation / Build and Deploy Documentation (pull_request) Blocked by required conditions
Checks / Prek / Pre-commit & Formatting (pull_request) Blocked by required conditions
Checks / Prek / Check changed files (pull_request) Blocked by required conditions
Checks / Prek / Clippy and Cargo Tests (pull_request) Blocked by required conditions
Update flake hashes / update-flake-hashes (pull_request) Blocked by required conditions
Checks / Changelog / Check changelog is added (pull_request_target) Successful in 31s
e14f99f5c2
stratself approved these changes 2026-05-23 18:29:24 +00:00
stratself left a comment

LGTM. Maintainers pls merge

LGTM. Maintainers pls merge
Some checks are pending
Documentation / Build and Deploy Documentation (pull_request) Blocked by required conditions
Checks / Prek / Pre-commit & Formatting (pull_request) Blocked by required conditions
Required
Details
Checks / Prek / Check changed files (pull_request) Blocked by required conditions
Required
Details
Checks / Prek / Clippy and Cargo Tests (pull_request) Blocked by required conditions
Required
Details
Update flake hashes / update-flake-hashes (pull_request) Blocked by required conditions
Checks / Changelog / Check changelog is added (pull_request_target) Successful in 31s
Required
Details
This pull request is blocked because it's outdated.
Some workflows are waiting to be reviewed.
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 main:Cease-main
git switch Cease-main
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 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!1762
No description provided.