diff --git a/docs/deploying/docker.mdx b/docs/deploying/docker.mdx index d7133ee68..7a0a65dd7 100644 --- a/docs/deploying/docker.mdx +++ b/docs/deploying/docker.mdx @@ -53,7 +53,7 @@ For more setups with `.well-known` delegation and split-domain deployments, cons Docker Compose is the recommended deployment method for Continuwuity containers. The following environment variables will be set: - `CONTINUWUITY_SERVER_NAME` - Your Matrix server's domain name. **This CANNOT be changed later without a data wipe.** -- `CONTINUWUITY_DATABASE_PATH` - Where to store your database. This must match the docker volume mount. +- `CONTINUWUITY_DATABASE_PATH` - Where to store your database. This must match the docker bind mount. - `CONTINUWUITY_ADDRESS` - Bind address (for Docker, use `0.0.0.0` to listen on all interfaces). Alternatively, you can specify a path to mount the configuration file using the `CONTINUWUITY_CONFIG` environment variable. @@ -89,7 +89,9 @@ Consult the [**DNS tuning guide (recommended)**](../guides/dns.mdx) for full sol docker-compose.with-caddy.yml ([view raw](/deploying/docker-compose.with-caddy.yml)) -Create a Caddyfile with the following content: +Create a directory called `caddy-data`, which will store TLS certs obtained by Caddy. + +Then, create a Caddyfile with the following content: ``` https://example.com:443, https://example.com:8448 { @@ -97,7 +99,7 @@ https://example.com:443, https://example.com:8448 { } ``` -Then, for the docker-compose: +Then, for the docker compose file: ```yaml file="../public/deploying/docker-compose.with-caddy.yml" @@ -110,6 +112,10 @@ Then, for the docker-compose:
docker-compose.with-caddy-labels.yml ([view raw](/deploying/docker-compose.with-caddy-labels.yml)) +Create a directory called `caddy-data`, which will store TLS certs obtained by Caddy. + +Then, for the docker compose file: + ```yaml file="../public/deploying/docker-compose.with-caddy-labels.yml" ``` @@ -132,6 +138,10 @@ Then, for the docker-compose:
docker-compose.with-traefik.yml ([view raw](/deploying/docker-compose.with-traefik.yml)) +Create a directory called `traefik-acme-data`, which will store TLS certs obtained by Caddy. + +Then, for the docker compose file: + ```yaml file="../public/deploying/docker-compose.with-traefik.yml" ``` @@ -164,10 +174,15 @@ See the [Other reverse proxies](generic.mdx#setting-up-the-reverse-proxy) sectio ### Starting Your Server -1. Choose your compose file from the above, and rename it to `docker-compose.yml`. Replace `example.com` with your homeserver's domain name, and edit other values as you see fit. -2. If using the override file, rename it to `docker-compose.override.yml` and - edit your values. -3. Start the server: +1. Create a directory named `continuwuity-data`. This will be where your server's database lives. + +2. Choose your compose file from the above, and rename it to `docker-compose.yml`. Replace `example.com` with your homeserver's domain name, and edit other values as you see fit. + + - Follow all extra instructions as needed. + + - If using the override file, rename it to `docker-compose.override.yml` and edit your values. + +3. Start the server with the following command: ```bash docker compose up -d @@ -189,9 +204,7 @@ See the [Other reverse proxies](generic.mdx#setting-up-the-reverse-proxy) sectio Pick your own username and password! ``` -5. Log in to your server with any Matrix client, and register for an account with the registration token from step 4. You'll automatically be invited to the admin room where you can [manage your server](../reference/admin). - -See the [generic deployment guide](generic.mdx) for more deployment options. +5. Log in to your server with any Matrix client, and register for an account with the registration token from the previous step. You'll automatically be invited to the admin room where you can [manage your server](../reference/admin). ## Testing diff --git a/docs/public/advanced/delegated.docker-compose.for-traefik.yml b/docs/public/advanced/delegated.docker-compose.for-traefik.yml index 4b5d0fed8..c0e034d78 100644 --- a/docs/public/advanced/delegated.docker-compose.for-traefik.yml +++ b/docs/public/advanced/delegated.docker-compose.for-traefik.yml @@ -6,7 +6,7 @@ services: restart: unless-stopped command: /sbin/conduwuit volumes: - - db:/var/lib/continuwuity + - ./continuwuity-data:/var/lib/continuwuity - ./continuwuity-resolv.conf:/etc/resolv.conf # use custom resolvers rather than Docker's #- ./continuwuity.toml:/etc/continuwuity.toml networks: diff --git a/docs/public/advanced/delegated.docker-compose.with-caddy-labels.yml b/docs/public/advanced/delegated.docker-compose.with-caddy-labels.yml index 3a0f9566b..f1509f756 100644 --- a/docs/public/advanced/delegated.docker-compose.with-caddy-labels.yml +++ b/docs/public/advanced/delegated.docker-compose.with-caddy-labels.yml @@ -12,7 +12,7 @@ services: - proxy volumes: - /var/run/docker.sock:/var/run/docker.sock - - ./data:/data + - ./caddy-data:/data restart: unless-stopped labels: caddy: example.com @@ -23,7 +23,7 @@ services: restart: unless-stopped command: /sbin/conduwuit volumes: - - db:/var/lib/continuwuity + - ./continuwuity-data:/var/lib/continuwuity - ./continuwuity-resolv.conf:/etc/resolv.conf # use custom resolvers rather than Docker's # - ./continuwuity.toml:/etc/continuwuity.toml environment: @@ -46,8 +46,5 @@ services: caddy: matrix.example.com caddy.reverse_proxy: "{{upstreams 8008}}" -volumes: - db: - networks: proxy: diff --git a/docs/public/advanced/delegated.docker-compose.with-caddy.yml b/docs/public/advanced/delegated.docker-compose.with-caddy.yml index 99c3b3435..4385ed3eb 100644 --- a/docs/public/advanced/delegated.docker-compose.with-caddy.yml +++ b/docs/public/advanced/delegated.docker-compose.with-caddy.yml @@ -9,7 +9,7 @@ services: networks: - caddy volumes: - - ./data:/data + - ./caddy-data:/data # mount your created Caddyfile into the container - ./Caddyfile:/etc/caddy/Caddyfile restart: unless-stopped @@ -19,7 +19,7 @@ services: restart: unless-stopped command: /sbin/conduwuit volumes: - - db:/var/lib/continuwuity + - ./continuwuity-data:/var/lib/continuwuity - ./continuwuity-resolv.conf:/etc/resolv.conf # use custom resolvers rather than Docker's # - ./continuwuity.toml:/etc/continuwuity.toml environment: @@ -41,6 +41,3 @@ services: networks: proxy: - -volumes: - db: diff --git a/docs/public/advanced/delegated.docker-compose.with-traefik.yml b/docs/public/advanced/delegated.docker-compose.with-traefik.yml index 675f2a18e..54aea19ec 100644 --- a/docs/public/advanced/delegated.docker-compose.with-traefik.yml +++ b/docs/public/advanced/delegated.docker-compose.with-traefik.yml @@ -6,7 +6,7 @@ services: restart: unless-stopped command: /sbin/conduwuit volumes: - - db:/var/lib/continuwuity + - ./continuwuity-data:/var/lib/continuwuity - ./continuwuity-resolv.conf:/etc/resolv.conf # use custom resolvers rather than Docker's #- ./continuwuity.toml:/etc/continuwuity.toml networks: @@ -40,7 +40,7 @@ services: - "443:443" volumes: - "/var/run/docker.sock:/var/run/docker.sock:ro" - - "acme:/etc/traefik/acme" + - "./traefik-acme-data:/etc/traefik/acme" labels: - "traefik.enable=true" @@ -77,9 +77,5 @@ services: TRAEFIK_PROVIDERS_DOCKER_ENDPOINT: "unix:///var/run/docker.sock" TRAEFIK_PROVIDERS_DOCKER_EXPOSEDBYDEFAULT: false -volumes: - db: - acme: - networks: proxy: diff --git a/docs/public/deploying/docker-compose.for-traefik.yml b/docs/public/deploying/docker-compose.for-traefik.yml index 61cdb1bea..229a95a66 100644 --- a/docs/public/deploying/docker-compose.for-traefik.yml +++ b/docs/public/deploying/docker-compose.for-traefik.yml @@ -6,7 +6,7 @@ services: restart: unless-stopped command: /sbin/conduwuit volumes: - - db:/var/lib/continuwuity + - ./continuwuity-data:/var/lib/continuwuity - ./continuwuity-resolv.conf:/etc/resolv.conf # use custom resolvers rather than Docker's #- ./continuwuity.toml:/etc/continuwuity.toml networks: @@ -18,7 +18,7 @@ services: - "traefik.http.routers.continuwuity.tls=true" - "traefik.http.routers.continuwuity.service=continuwuity" - "traefik.http.services.continuwuity.loadbalancer.server.port=8008" - # possibly, depending on your config: + # enable tls with the `letsencrypt` certificate resolver (actual name dependant on your static config) # - "traefik.http.routers.continuwuity.tls.certresolver=letsencrypt" environment: CONTINUWUITY_SERVER_NAME: example.com @@ -34,9 +34,6 @@ services: server=example.com:443 } -volumes: - db: - networks: # This must match the network name that Traefik listens on proxy: diff --git a/docs/public/deploying/docker-compose.with-caddy-labels.yml b/docs/public/deploying/docker-compose.with-caddy-labels.yml index 078e7802b..ab55f93ec 100644 --- a/docs/public/deploying/docker-compose.with-caddy-labels.yml +++ b/docs/public/deploying/docker-compose.with-caddy-labels.yml @@ -12,7 +12,7 @@ services: - proxy volumes: - /var/run/docker.sock:/var/run/docker.sock - - ./data:/data + - ./caddy-data:/data restart: unless-stopped homeserver: @@ -20,7 +20,7 @@ services: restart: unless-stopped command: /sbin/conduwuit volumes: - - db:/var/lib/continuwuity + - ./continuwuity-data:/var/lib/continuwuity - ./continuwuity-resolv.conf:/etc/resolv.conf # use custom resolvers rather than Docker's # - ./continuwuity.toml:/etc/continuwuity.toml environment: diff --git a/docs/public/deploying/docker-compose.with-caddy.yml b/docs/public/deploying/docker-compose.with-caddy.yml index 7f8d83fbf..04f827f57 100644 --- a/docs/public/deploying/docker-compose.with-caddy.yml +++ b/docs/public/deploying/docker-compose.with-caddy.yml @@ -10,7 +10,7 @@ services: networks: - proxy volumes: - - ./data:/data + - ./caddy-data:/data # mount your created Caddyfile into the container - ./Caddyfile:/etc/caddy/Caddyfile restart: unless-stopped @@ -20,7 +20,7 @@ services: restart: unless-stopped command: /sbin/conduwuit volumes: - - db:/var/lib/continuwuity + - ./continuwuity-data:/var/lib/continuwuity - ./continuwuity-resolv.conf:/etc/resolv.conf # use custom resolvers rather than Docker's # - ./continuwuity.toml:/etc/continuwuity.toml environment: @@ -43,6 +43,3 @@ services: networks: proxy: - -volumes: - db: diff --git a/docs/public/deploying/docker-compose.with-traefik.yml b/docs/public/deploying/docker-compose.with-traefik.yml index 9eac48e82..a45217af1 100644 --- a/docs/public/deploying/docker-compose.with-traefik.yml +++ b/docs/public/deploying/docker-compose.with-traefik.yml @@ -6,7 +6,7 @@ services: restart: unless-stopped command: /sbin/conduwuit volumes: - - db:/var/lib/continuwuity + - ./continuwuity-data:/var/lib/continuwuity - ./continuwuity-resolv.conf:/etc/resolv.conf # use custom resolvers rather than Docker's #- ./continuwuity.toml:/etc/continuwuity.toml networks: @@ -40,7 +40,7 @@ services: - "443:443" volumes: - "/var/run/docker.sock:/var/run/docker.sock:ro" - - "acme:/etc/traefik/acme" + - "./traefik-acme-data:/etc/traefik/acme" labels: - "traefik.enable=true" @@ -77,9 +77,5 @@ services: TRAEFIK_PROVIDERS_DOCKER_ENDPOINT: "unix:///var/run/docker.sock" TRAEFIK_PROVIDERS_DOCKER_EXPOSEDBYDEFAULT: false -volumes: - db: - acme: - networks: proxy: diff --git a/docs/public/deploying/docker-compose.yml b/docs/public/deploying/docker-compose.yml index a9d4491e0..342a94615 100644 --- a/docs/public/deploying/docker-compose.yml +++ b/docs/public/deploying/docker-compose.yml @@ -1,41 +1,38 @@ # Continuwuity - Bare Configuration (for other reverse proxies) services: - homeserver: - image: "forgejo.ellis.link/continuwuation/continuwuity:latest" - restart: unless-stopped - command: /sbin/conduwuit - ports: + homeserver: + image: "forgejo.ellis.link/continuwuation/continuwuity:latest" + restart: unless-stopped + command: /sbin/conduwuit + ports: - # If your reverse proxy is on the host, use this - # and configure it to connect to `127.0.0.1:8008` - - 127.0.0.1:8008:8008 + # If your reverse proxy is on the host, use this + # and configure it to connect to `127.0.0.1:8008` + - 127.0.0.1:8008:8008 - # If your reverse proxy is on another machine, use this - # and configure it to connect to :8008 - # - 8008:8008 + # If your reverse proxy is on another machine, use this + # and configure it to connect to :8008 + # - 8008:8008 - # If your reverse proxy is a docker container on the same network, - # comment out the entire `ports` section, and configure it to connect to `continuwuity:8008` + # If your reverse proxy is a docker container on the same network, + # comment out the entire `ports` section, and configure it to connect to `continuwuity: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_CONFIG: '/etc/continuwuity.toml' # Uncomment if you mapped config toml above + volumes: + - ./continuwuity-data:/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_CONFIG: '/etc/continuwuity.toml' # Uncomment if you mapped config toml above - ## (Optional) Serve .well-known files to tell others to reach Continuwuity on port :443 - ## If you do this, remove all routes to port :8448 on your reverse proxy - # CONTINUWUITY_WELL_KNOWN: | - # { - # client=https://example.com, - # server=example.com:443 - # } - -volumes: - db: + ## (Optional) Serve .well-known files to tell others to reach Continuwuity on port :443 + ## If you do this, remove all routes to port :8448 on your reverse proxy + # CONTINUWUITY_WELL_KNOWN: | + # { + # client=https://example.com, + # server=example.com:443 + # }