From 7f92659a98ca8d1dbe832602ac53596d92265276 Mon Sep 17 00:00:00 2001 From: stratself Date: Sat, 4 Apr 2026 07:03:12 +0000 Subject: [PATCH] docs(docker): Revert to mounting /etc/resolv.conf as `configs:` won't work * Fix wording to make mounting resolv.conf more imperative * Linting and other changes --- docs/deploying/docker.mdx | 26 +++++++++---------- .../deploying/docker-compose.for-traefik.yml | 15 +---------- .../docker-compose.with-caddy-labels.yml | 11 +------- .../deploying/docker-compose.with-caddy.yml | 11 ++------ .../deploying/docker-compose.with-traefik.yml | 21 +++------------ docs/public/deploying/docker-compose.yml | 13 ++-------- 6 files changed, 22 insertions(+), 75 deletions(-) diff --git a/docs/deploying/docker.mdx b/docs/deploying/docker.mdx index 5dd471575..887f06444 100644 --- a/docs/deploying/docker.mdx +++ b/docs/deploying/docker.mdx @@ -88,7 +88,7 @@ Get a working Continuwuity server with an admin user in four steps: In order to use your new homeserver, you need to create its first user account. Open your Matrix client of choice and register an account - on example.com using registration token x5keUZ811RqvLsNa . + on example.com using registration token x5keUZ811RqvLsNa . Pick your own username and password! ``` @@ -113,24 +113,22 @@ See the [reference configuration](../reference/config) page for all config optio These examples include reverse proxy configurations for Matrix federation, which will route your Matrix domain (and optionally .well-known paths) to Continuwuity. :::note Docker DNS Performance -Docker's default DNS resolver are [known to cause issues](../troubleshooting#dns-issues) for Matrix federation such as very slow federation or DNS timeouts. As a workaround, we will mount a custom `/etc/resolv.conf` config file into the Continuwuity service, in order to bypass Docker and use a more performant resolver. +Docker's default DNS resolver are known to [cause timeout issues](../troubleshooting#dns-issues) for Matrix federation. To bypass it and use a more performant resolver, mount a custom `/etc/resolv.conf` config file into the Continuwuity container. ```yaml title='docker-compose.yml' services: homeserver: # ... - configs: - - source: continuwuity-resolv.conf - target: /etc/resolv.conf - -configs: - continuwuity-resolv.conf: - content: | - nameserver 1.0.0.1 - nameserver 1.1.1.1 + volumes: + - ./continuwuity-resolv.conf:/etc/resolv.conf ``` -It is strongly recommended to consult the [**DNS tuning guide**](../advanced/dns) for full solutions to this issue. +```txt title='continuwuity-resolv.conf' +nameserver 1.0.0.1 +nameserver 1.1.1.1 +``` + +Consult the [**DNS tuning guide (recommended)**](../advanced/dns) for full solutions to this issue. ::: #### Caddy (using Caddyfile) @@ -224,7 +222,7 @@ You will then need to point your reverse proxy towards Continuwuity at `127.0.0. In order to use your new homeserver, you need to create its first user account. Open your Matrix client of choice and register an account - on example.com using registration token x5keUZ811RqvLsNa . + on example.com using registration token x5keUZ811RqvLsNa . Pick your own username and password! ``` @@ -241,4 +239,4 @@ section in the development documentation. ## Next steps - For smooth federation, set up a caching resolver according to the [DNS tuning guide](../advanced/dns) -- To set up Audio/Video communication, see the [Calls](../calls.mdx) page. \ No newline at end of file +- To set up Audio/Video communication, see the [Calls](../calls.mdx) page. diff --git a/docs/public/deploying/docker-compose.for-traefik.yml b/docs/public/deploying/docker-compose.for-traefik.yml index 36ef07c01..e7b1a46ff 100644 --- a/docs/public/deploying/docker-compose.for-traefik.yml +++ b/docs/public/deploying/docker-compose.for-traefik.yml @@ -7,6 +7,7 @@ services: command: /sbin/conduwuit volumes: - db:/var/lib/continuwuity + - ./continuwuity-resolv.conf:/etc/resolv.conf # use custom resolvers rather than Docker's #- ./continuwuity.toml:/etc/continuwuity.toml networks: - proxy @@ -34,14 +35,6 @@ services: client=https://matrix.example.com, server=matrix.example.com:443 } - #cpuset: "0-4" # Uncomment to limit to specific CPU cores - ulimits: # Continuwuity uses quite a few file descriptors, and on some systems it defaults to 1024, so you can tell docker to increase it - nofile: - soft: 1048567 - hard: 1048567 - configs: # using custom resolver instead of Docker's - - source: continuwuity-resolv.conf - target: /etc/resolv.conf volumes: db: @@ -51,9 +44,3 @@ networks: # name, don't forget to change it here and in the docker-compose.override.yml proxy: external: true - -configs: - continuwuity-resolv.conf: - content: | - nameserver 1.0.0.1 - nameserver 1.1.1.1 \ No newline at end of file diff --git a/docs/public/deploying/docker-compose.with-caddy-labels.yml b/docs/public/deploying/docker-compose.with-caddy-labels.yml index 306f78aa5..8e42a41bf 100644 --- a/docs/public/deploying/docker-compose.with-caddy-labels.yml +++ b/docs/public/deploying/docker-compose.with-caddy-labels.yml @@ -24,6 +24,7 @@ services: command: /sbin/conduwuit volumes: - db:/var/lib/continuwuity + - ./continuwuity-resolv.conf:/etc/resolv.conf # use custom resolvers rather than Docker's #- ./continuwuity.toml:/etc/continuwuity.toml environment: CONTINUWUITY_SERVER_NAME: example.com # EDIT THIS @@ -40,18 +41,8 @@ services: labels: caddy: matrix.example.com caddy.reverse_proxy: "{{upstreams 8008}}" - configs: # using custom resolver instead of Docker's - - source: continuwuity-resolv.conf - target: /etc/resolv.conf volumes: db: networks: caddy: - -configs: - continuwuity-resolv.conf: - content: | - nameserver 1.0.0.1 - nameserver 1.1.1.1 - diff --git a/docs/public/deploying/docker-compose.with-caddy.yml b/docs/public/deploying/docker-compose.with-caddy.yml index 46c357938..b5f65ef3e 100644 --- a/docs/public/deploying/docker-compose.with-caddy.yml +++ b/docs/public/deploying/docker-compose.with-caddy.yml @@ -13,13 +13,14 @@ services: configs: - source: Caddyfile target: /etc/caddy/Caddyfile - + homeserver: image: forgejo.ellis.link/continuwuation/continuwuity:latest restart: unless-stopped command: /sbin/conduwuit volumes: - db:/var/lib/continuwuity + - ./continuwuity-resolv.conf:/etc/resolv.conf # use custom resolvers rather than Docker's #- ./continuwuity.toml:/etc/continuwuity.toml environment: CONTINUWUITY_SERVER_NAME: example.com @@ -29,9 +30,6 @@ services: #CONTINUWUITY_CONFIG: '/etc/continuwuity.toml' # Uncomment if you mapped config toml above networks: - caddy - configs: # using custom resolvers instead of Docker's - - source: continuwuity-resolv.conf - target: /etc/resolv.conf networks: caddy: @@ -45,8 +43,3 @@ configs: https://example.com, https://example.com:8448 { reverse_proxy http://homeserver:8008 } - - continuwuity-resolv.conf: - content: | - nameserver 1.0.0.1 - nameserver 1.1.1.1 diff --git a/docs/public/deploying/docker-compose.with-traefik.yml b/docs/public/deploying/docker-compose.with-traefik.yml index e6815be83..e971aaa0d 100644 --- a/docs/public/deploying/docker-compose.with-traefik.yml +++ b/docs/public/deploying/docker-compose.with-traefik.yml @@ -7,6 +7,7 @@ services: command: /sbin/conduwuit volumes: - db:/var/lib/continuwuity + - ./continuwuity-resolv.conf:/etc/resolv.conf # use custom resolvers rather than Docker's #- ./continuwuity.toml:/etc/continuwuity.toml networks: - proxy @@ -31,14 +32,6 @@ services: client=https://matrix.example.com, server=matrix.example.com:443 } - #cpuset: "0-4" # Uncomment to limit to specific CPU cores - ulimits: # Continuwuity uses quite a few file descriptors, and on some systems it defaults to 1024, so you can tell docker to increase it - nofile: - soft: 1048567 - hard: 1048567 - configs: # using custom resolver instead of Docker's - - source: continuwuity-resolv.conf - target: /etc/resolv.conf traefik: image: "traefik:latest" @@ -86,14 +79,8 @@ services: TRAEFIK_PROVIDERS_DOCKER_EXPOSEDBYDEFAULT: false volumes: - db: - acme: + db: + acme: networks: - proxy: - -configs: - continuwuity-resolv.conf: - content: | - nameserver 1.0.0.1 - nameserver 1.1.1.1 \ No newline at end of file + proxy: diff --git a/docs/public/deploying/docker-compose.yml b/docs/public/deploying/docker-compose.yml index 0737bca39..86a3f2edd 100644 --- a/docs/public/deploying/docker-compose.yml +++ b/docs/public/deploying/docker-compose.yml @@ -9,23 +9,14 @@ services: - 127.0.0.1:8008:8008 volumes: - db:/var/lib/continuwuity + - ./continuwuity-resolv.conf:/etc/resolv.conf # use custom resolvers rather than Docker's #- ./continuwuity.toml:/etc/continuwuity.toml environment: CONTINUWUITY_SERVER_NAME: example.com # EDIT THIS CONTINUWUITY_DATABASE_PATH: /var/lib/continuwuity CONTINUWUITY_ADDRESS: 0.0.0.0 - CONTINUWUITY_PORT: 8008 + CONTINUWUITY_PORT: 8008 #CONTINUWUITY_CONFIG: '/etc/continuwuity.toml' # Uncomment if you mapped config toml above - configs: # using custom resolver instead of Docker's - - source: continuwuity-resolv.conf - target: /etc/resolv.conf - volumes: db: - -configs: - continuwuity-resolv.conf: - content: | - nameserver 1.0.0.1 - nameserver 1.1.1.1 \ No newline at end of file