2025-04-20 23:50:48 +01:00
# Continuwuity for Docker
2020-08-12 21:17:53 +02:00
## Docker
2025-07-14 19:48:46 +01:00
To run Continuwuity with Docker, you can either build the image yourself or pull it
2024-08-24 05:13:43 +02:00
from a registry.
2023-06-28 18:51:44 +02:00
### Use a registry
2025-04-20 23:50:48 +01:00
OCI images for Continuwuity are available in the registries listed below.
2023-07-21 20:33:32 +02:00
2025-04-20 23:50:48 +01:00
| Registry | Image | Notes |
| --------------- | --------------------------------------------------------------- | -----------------------|
| Forgejo Registry| [forgejo.ellis.link/continuwuation/continuwuity:latest][fj] | Latest tagged image. |
| Forgejo Registry| [forgejo.ellis.link/continuwuation/continuwuity:main][fj] | Main branch image. |
2023-06-28 18:51:44 +02:00
2025-04-20 23:50:48 +01:00
[fj]: https://forgejo.ellis.link/continuwuation/-/packages/container/continuwuity
2024-12-15 22:46:56 -05:00
2024-04-25 20:21:48 -04:00
Use
2024-07-03 03:49:33 -04:00
2024-08-30 18:54:41 -04:00
```bash
docker image pull $LINK
```
2024-07-03 03:49:33 -04:00
2023-06-28 18:51:44 +02:00
to pull it to your machine.
2020-08-12 21:17:53 +02:00
### Run
2025-07-14 19:48:46 +01:00
When you have the image, you can simply run it with
2020-08-04 22:06:13 +02:00
2024-08-30 18:54:41 -04:00
```bash
docker run -d -p 8448:6167 \
2025-05-10 20:37:08 +01:00
-v db:/var/lib/continuwuity/ \
-e CONTINUWUITY_SERVER_NAME="your.server.name" \
-e CONTINUWUITY_ALLOW_REGISTRATION=false \
--name continuwuity $LINK
2020-08-04 22:06:13 +02:00
```
2025-07-14 19:48:46 +01:00
or you can use [Docker Compose ](#docker-compose ).
2021-08-17 14:44:53 +02:00
2024-08-24 05:13:43 +02:00
The `-d` flag lets the container run in detached mode. You may supply an
2025-05-10 20:37:08 +01:00
optional `continuwuity.toml` config file, the example config can be found
2024-08-24 05:13:43 +02:00
[here ](../configuration/examples.md ). You can pass in different env vars to
2025-04-20 23:50:48 +01:00
change config values on the fly. You can even configure Continuwuity completely by
2024-08-24 05:13:43 +02:00
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 14:44:53 +02:00
2025-04-20 23:50:48 +01:00
If you just want to test Continuwuity for a short time, you can use the `--rm`
2025-07-14 19:48:46 +01:00
flag, which cleans up everything related to your container after you stop
2024-08-24 05:13:43 +02:00
it.
2020-08-04 22:06:13 +02:00
2023-07-04 18:41:05 +02:00
### Docker-compose
2020-08-12 21:17:53 +02:00
2025-07-14 19:48:46 +01:00
If the `docker run` command is not suitable for you or your setup, you can also use one
2024-08-24 05:13:43 +02:00
of the provided `docker-compose` files.
2022-02-19 17:06:06 +01:00
2025-07-14 19:48:46 +01:00
Depending on your proxy setup, you can use one of the following files:
2024-07-03 03:49:33 -04:00
2024-08-24 05:13:43 +02: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 17:06:06 +01:00
- For any other reverse proxy, use [`docker-compose.yml` ](docker-compose.yml )
2025-07-14 19:48:46 +01:00
When picking the Traefik-related compose file, rename it to
2024-08-24 05:13:43 +02:00
`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 17:06:06 +01:00
2024-08-24 05:13:43 +02: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 18:31:08 +02:00
2024-08-30 18:54:41 -04:00
```bash
docker network create caddy
```
2024-07-08 18:31:08 +02:00
2025-07-14 19:48:46 +01:00
After that, you can rename it to `docker-compose.yml` and spin up the
2024-08-24 05:13:43 +02:00
containers!
2024-07-08 18:31:08 +02:00
2025-04-20 23:50:48 +01:00
Additional info about deploying Continuwuity can be found [here ](generic.md ).
2020-08-04 22:06:13 +02:00
2020-08-12 21:17:53 +02:00
### Build
2025-07-14 19:48:46 +01:00
Official Continuwuity images are built using **Docker Buildx** and the Dockerfile found at [`docker/Dockerfile` ][dockerfile-path]. This approach uses common Docker tooling and enables efficient multi-platform builds.
2025-04-21 00:19:08 +01:00
2025-07-14 19:48:46 +01:00
The resulting images are widely compatible with Docker and other container runtimes like Podman or containerd.
2025-04-21 00:19:08 +01:00
2025-07-14 19:48:46 +01:00
The images *do not contain a shell* . They contain only the Continuwuity binary, required libraries, TLS certificates, and metadata. Please refer to the [`docker/Dockerfile` ][dockerfile-path] for the specific details of the image composition.
2025-04-21 00:19:08 +01:00
To build an image locally using Docker Buildx, you can typically run a command like:
```bash
# Build for the current platform and load into the local Docker daemon
docker buildx build --load --tag continuwuity:latest -f docker/Dockerfile .
# Example: Build for specific platforms and push to a registry.
# docker buildx build --platform linux/amd64,linux/arm64 --tag registry.io/org/continuwuity:latest -f docker/Dockerfile . --push
# Example: Build binary optimized for the current CPU
# docker buildx build --load --tag continuwuity:latest --build-arg TARGET_CPU=native -f docker/Dockerfile .
```
Refer to the Docker Buildx documentation for more advanced build options.
[dockerfile-path]: ../../docker/Dockerfile
2020-08-12 21:17:53 +02:00
### Run
2025-07-14 19:48:46 +01:00
If you have already built the image or want to use one from the registries, you
can start the container and everything else in the compose file in detached
2024-08-24 05:13:43 +02:00
mode with:
2020-08-04 22:06:13 +02:00
2021-11-21 17:34:08 +00:00
```bash
2024-04-25 20:21:48 -04:00
docker compose up -d
2020-08-04 22:06:13 +02:00
```
2021-08-17 14:44:53 +02:00
> **Note:** Don't forget to modify and adjust the compose file to your needs.
### Use Traefik as Proxy
2025-07-14 19:48:46 +01:00
As a container user, you probably know about Traefik. It is an easy-to-use
reverse proxy for making containerized apps and services available through the
2024-08-24 05:13:43 +02:00
web. With the two provided files,
2022-02-19 17:06:06 +01: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 05:13:43 +02:00
[`docker-compose.override.yml` ](docker-compose.override.yml ), it is equally easy
2025-07-14 19:48:46 +01:00
to deploy and use Continuwuity, with a small caveat. If you have already looked at
the files, you should have seen the `well-known` service, which is the
small caveat. Traefik is simply a proxy and load balancer and cannot
serve any kind of content. For Continuwuity to federate, we need to either
expose ports `443` and `8448` or serve two endpoints: `.well-known/matrix/client`
2024-08-24 05:13:43 +02:00
and `.well-known/matrix/server` .
2025-07-14 19:48:46 +01:00
With the service `well-known` , we use a single `nginx` container that serves
2024-08-24 05:13:43 +02:00
those two files.
2021-08-17 14:44:53 +02:00
2023-07-04 18:41:05 +02:00
## Voice communication
2024-05-08 21:26:05 -04:00
See the [TURN ](../turn.md ) page.
2024-11-23 22:35:54 -05:00
[nix-buildlayeredimage]: https://ryantm.github.io/nixpkgs/builders/images/dockertools/#ssec -pkgs-dockerTools-buildLayeredImage