2024-04-26 00:21:48 +00:00
|
|
|
# conduwuit for Docker
|
2020-08-12 19:17:53 +00:00
|
|
|
|
|
|
|
## Docker
|
|
|
|
|
2024-08-24 03:13:43 +00:00
|
|
|
To run conduwuit with Docker you can either build the image yourself or pull it
|
|
|
|
from a registry.
|
2023-06-28 16:51:44 +00:00
|
|
|
|
|
|
|
### Use a registry
|
|
|
|
|
2024-03-31 01:38:44 +00:00
|
|
|
OCI images for conduwuit are available in the registries listed below.
|
2023-07-21 18:33:32 +00:00
|
|
|
|
2024-08-30 22:54:41 +00:00
|
|
|
| Registry | Image | Size | Notes |
|
|
|
|
| --------------- | --------------------------------------------------------------- | ----------------------------- | ---------------------- |
|
|
|
|
| GitHub Registry | [ghcr.io/girlbossceo/conduwuit:latest][gh] | ![Image Size][shield-latest] | Stable tagged image. |
|
|
|
|
| GitLab Registry | [registry.gitlab.com/conduwuit/conduwuit:latest][gl] | ![Image Size][shield-latest] | Stable tagged image. |
|
|
|
|
| Docker Hub | [docker.io/girlbossceo/conduwuit:latest][dh] | ![Image Size][shield-latest] | Stable tagged image. |
|
|
|
|
| GitHub Registry | [ghcr.io/girlbossceo/conduwuit:main][gh] | ![Image Size][shield-main] | Stable main branch. |
|
|
|
|
| GitLab Registry | [registry.gitlab.com/conduwuit/conduwuit:main][gl] | ![Image Size][shield-main] | Stable main branch. |
|
|
|
|
| Docker Hub | [docker.io/girlbossceo/conduwuit:main][dh] | ![Image Size][shield-main] | Stable main branch. |
|
2023-06-28 16:51:44 +00:00
|
|
|
|
2024-08-05 19:23:40 +00:00
|
|
|
[dh]: https://hub.docker.com/r/girlbossceo/conduwuit
|
2024-02-01 02:10:38 +00:00
|
|
|
[gh]: https://github.com/girlbossceo/conduwuit/pkgs/container/conduwuit
|
2024-08-05 19:23:40 +00:00
|
|
|
[gl]: https://gitlab.com/conduwuit/conduwuit/container_registry/6369729
|
2024-02-01 02:10:38 +00:00
|
|
|
[shield-latest]: https://img.shields.io/docker/image-size/girlbossceo/conduwuit/latest
|
|
|
|
[shield-main]: https://img.shields.io/docker/image-size/girlbossceo/conduwuit/main
|
2023-07-21 18:33:32 +00:00
|
|
|
|
2024-04-26 00:21:48 +00:00
|
|
|
Use
|
2024-07-03 07:49:33 +00:00
|
|
|
|
2024-08-30 22:54:41 +00:00
|
|
|
```bash
|
|
|
|
docker image pull $LINK
|
|
|
|
```
|
2024-07-03 07:49:33 +00:00
|
|
|
|
2023-06-28 16:51:44 +00:00
|
|
|
to pull it to your machine.
|
|
|
|
|
2020-08-12 19:17:53 +00:00
|
|
|
### Run
|
|
|
|
|
2023-06-28 16:51:44 +00:00
|
|
|
When you have the image you can simply run it with
|
2020-08-04 20:06:13 +00:00
|
|
|
|
2024-08-30 22:54:41 +00:00
|
|
|
```bash
|
|
|
|
docker run -d -p 8448:6167 \
|
|
|
|
-v db:/var/lib/conduwuit/ \
|
|
|
|
-e CONDUWUIT_SERVER_NAME="your.server.name" \
|
|
|
|
-e CONDUWUIT_DATABASE_BACKEND="rocksdb" \
|
2024-08-24 03:13:43 +00:00
|
|
|
-e CONDUWUIT_ALLOW_REGISTRATION=false \
|
2024-08-30 22:54:41 +00:00
|
|
|
--name conduit $LINK
|
2020-08-04 20:06:13 +00:00
|
|
|
```
|
|
|
|
|
2024-04-26 00:21:48 +00:00
|
|
|
or you can use [docker compose](#docker-compose).
|
2021-08-17 12:44:53 +00:00
|
|
|
|
2024-08-24 03:13:43 +00:00
|
|
|
The `-d` flag lets the container run in detached mode. You may supply an
|
|
|
|
optional `conduwuit.toml` config file, the example config can be found
|
|
|
|
[here](../configuration/examples.md). You can pass in different env vars to
|
|
|
|
change config values on the fly. You can even configure conduwuit completely by
|
|
|
|
using env vars. For an overview of possible values, please take a look at the
|
|
|
|
[`docker-compose.yml`](docker-compose.yml) file.
|
2021-08-17 12:44:53 +00:00
|
|
|
|
2024-08-24 03:13:43 +00:00
|
|
|
If you just want to test conduwuit for a short time, you can use the `--rm`
|
|
|
|
flag, which will clean up everything related to your container after you stop
|
|
|
|
it.
|
2020-08-04 20:06:13 +00:00
|
|
|
|
2023-07-04 16:41:05 +00:00
|
|
|
### Docker-compose
|
2020-08-12 19:17:53 +00:00
|
|
|
|
2024-08-24 03:13:43 +00:00
|
|
|
If the `docker run` command is not for you or your setup, you can also use one
|
|
|
|
of the provided `docker-compose` files.
|
2022-02-19 16:06:06 +00:00
|
|
|
|
|
|
|
Depending on your proxy setup, you can use one of the following files;
|
2024-07-03 07:49:33 +00:00
|
|
|
|
2024-08-24 03:13:43 +00:00
|
|
|
- If you already have a `traefik` instance set up, use
|
|
|
|
[`docker-compose.for-traefik.yml`](docker-compose.for-traefik.yml)
|
|
|
|
- If you don't have a `traefik` instance set up and would like to use it, use
|
|
|
|
[`docker-compose.with-traefik.yml`](docker-compose.with-traefik.yml)
|
|
|
|
- If you want a setup that works out of the box with `caddy-docker-proxy`, use
|
|
|
|
[`docker-compose.with-caddy.yml`](docker-compose.with-caddy.yml) and replace all
|
|
|
|
`example.com` placeholders with your own domain
|
2022-02-19 16:06:06 +00:00
|
|
|
- For any other reverse proxy, use [`docker-compose.yml`](docker-compose.yml)
|
|
|
|
|
2024-08-24 03:13:43 +00:00
|
|
|
When picking the traefik-related compose file, rename it so it matches
|
|
|
|
`docker-compose.yml`, and rename the override file to
|
|
|
|
`docker-compose.override.yml`. Edit the latter with the values you want for your
|
|
|
|
server.
|
2022-02-19 16:06:06 +00:00
|
|
|
|
2024-08-24 03:13:43 +00:00
|
|
|
When picking the `caddy-docker-proxy` compose file, it's important to first
|
|
|
|
create the `caddy` network before spinning up the containers:
|
2024-07-08 16:31:08 +00:00
|
|
|
|
2024-08-30 22:54:41 +00:00
|
|
|
```bash
|
|
|
|
docker network create caddy
|
|
|
|
```
|
2024-07-08 16:31:08 +00:00
|
|
|
|
2024-08-24 03:13:43 +00:00
|
|
|
After that, you can rename it so it matches `docker-compose.yml` and spin up the
|
|
|
|
containers!
|
2024-07-08 16:31:08 +00:00
|
|
|
|
2024-04-26 00:21:48 +00:00
|
|
|
Additional info about deploying conduwuit can be found [here](generic.md).
|
2020-08-04 20:06:13 +00:00
|
|
|
|
2020-08-12 19:17:53 +00:00
|
|
|
### Build
|
|
|
|
|
2024-08-24 03:13:43 +00:00
|
|
|
To build the conduwuit image with docker-compose, you first need to open and
|
|
|
|
modify the `docker-compose.yml` file. There you need to comment the `image:`
|
|
|
|
option and uncomment the `build:` option. Then call docker compose with:
|
2020-08-04 20:06:13 +00:00
|
|
|
|
2024-08-30 22:54:41 +00:00
|
|
|
```bash
|
2024-04-26 00:21:48 +00:00
|
|
|
docker compose up
|
2020-08-04 20:06:13 +00:00
|
|
|
```
|
|
|
|
|
2024-08-24 03:13:43 +00:00
|
|
|
This will also start the container right afterwards, so if want it to run in
|
|
|
|
detached mode, you also should use the `-d` flag.
|
2020-08-12 19:17:53 +00:00
|
|
|
|
|
|
|
### Run
|
|
|
|
|
2024-08-24 03:13:43 +00:00
|
|
|
If you already have built the image or want to use one from the registries, you
|
|
|
|
can just start the container and everything else in the compose file in detached
|
|
|
|
mode with:
|
2020-08-04 20:06:13 +00:00
|
|
|
|
2021-11-21 17:34:08 +00:00
|
|
|
```bash
|
2024-04-26 00:21:48 +00:00
|
|
|
docker compose up -d
|
2020-08-04 20:06:13 +00:00
|
|
|
```
|
2021-08-17 12:44:53 +00:00
|
|
|
|
|
|
|
> **Note:** Don't forget to modify and adjust the compose file to your needs.
|
|
|
|
|
|
|
|
### Use Traefik as Proxy
|
|
|
|
|
2024-08-24 03:13:43 +00:00
|
|
|
As a container user, you probably know about Traefik. It is a easy to use
|
|
|
|
reverse proxy for making containerized app and services available through the
|
|
|
|
web. With the two provided files,
|
2022-02-19 16:06:06 +00:00
|
|
|
[`docker-compose.for-traefik.yml`](docker-compose.for-traefik.yml) (or
|
|
|
|
[`docker-compose.with-traefik.yml`](docker-compose.with-traefik.yml)) and
|
2024-08-24 03:13:43 +00:00
|
|
|
[`docker-compose.override.yml`](docker-compose.override.yml), it is equally easy
|
|
|
|
to deploy and use conduwuit, with a little caveat. If you already took a look at
|
|
|
|
the files, then you should have seen the `well-known` service, and that is the
|
|
|
|
little caveat. Traefik is simply a proxy and loadbalancer and is not able to
|
|
|
|
serve any kind of content, but for conduwuit to federate, we need to either
|
|
|
|
expose ports `443` and `8448` or serve two endpoints `.well-known/matrix/client`
|
|
|
|
and `.well-known/matrix/server`.
|
|
|
|
|
|
|
|
With the service `well-known` we use a single `nginx` container that will serve
|
|
|
|
those two files.
|
2021-08-17 12:44:53 +00:00
|
|
|
|
2023-07-04 16:41:05 +00:00
|
|
|
## Voice communication
|
|
|
|
|
2024-05-09 01:26:05 +00:00
|
|
|
See the [TURN](../turn.md) page.
|