diff --git a/README.md b/README.md index 3e0ea593..a29c3f84 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # conduwuit -`main` / stable: [![CI and +`main`: [![CI and Artifacts](https://github.com/girlbossceo/conduwuit/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/girlbossceo/conduwuit/actions/workflows/ci.yml) ### a very cool, featureful fork of diff --git a/docs/deploying/docker.md b/docs/deploying/docker.md index 9fc8dc2f..7b8fd1a2 100644 --- a/docs/deploying/docker.md +++ b/docs/deploying/docker.md @@ -9,22 +9,14 @@ from a registry. OCI images for conduwuit are available in the registries listed below. -| 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. | +| 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. | [dh]: https://hub.docker.com/r/girlbossceo/conduwuit [gh]: https://github.com/girlbossceo/conduwuit/pkgs/container/conduwuit @@ -34,7 +26,9 @@ Size][shield-main] | Stable main branch. | Use -```bash docker image pull ``` +```bash +docker image pull $LINK +``` to pull it to your machine. @@ -42,13 +36,13 @@ to pull it to your machine. When you have the image you can simply run it with -```bash -docker run -d -p 8448:6167 \ - -v db:/var/lib/conduwuit/ \ - -e CONDUWUIT_SERVER_NAME="your.server.name" \ - -e CONDUWUIT_DATABASE_BACKEND="rocksdb" \ +```bash +docker run -d -p 8448:6167 \ + -v db:/var/lib/conduwuit/ \ + -e CONDUWUIT_SERVER_NAME="your.server.name" \ + -e CONDUWUIT_DATABASE_BACKEND="rocksdb" \ -e CONDUWUIT_ALLOW_REGISTRATION=false \ - --name conduit + --name conduit $LINK ``` or you can use [docker compose](#docker-compose). @@ -88,7 +82,9 @@ server. When picking the `caddy-docker-proxy` compose file, it's important to first create the `caddy` network before spinning up the containers: -```bash docker network create caddy ``` +```bash +docker network create caddy +``` After that, you can rename it so it matches `docker-compose.yml` and spin up the containers! @@ -101,7 +97,7 @@ 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: -```bash +```bash docker compose up ``` diff --git a/docs/deploying/generic.md b/docs/deploying/generic.md index 5a5eb5d1..f0391fec 100644 --- a/docs/deploying/generic.md +++ b/docs/deploying/generic.md @@ -34,12 +34,14 @@ are correctly set up. In Debian or Fedora/RHEL, you can use this command to create a conduwuit user: ```bash -sudo adduser --system conduwuit --group --disabled-login --no-create-home +sudo adduser --system conduwuit --group --disabled-login --no-create-home ``` For distros without `adduser`: -```bash sudo useradd -r --shell /usr/bin/nologin --no-create-home conduwuit ``` +```bash +sudo useradd -r --shell /usr/bin/nologin --no-create-home conduwuit +``` ## Forwarding ports in the firewall or the router @@ -60,8 +62,9 @@ change the `ExecStart=` path to where you placed the conduwuit binary. Now we need to create the conduwuit's config file in `/etc/conduwuit/conduwuit.toml`. The example config can be found at -[conduwuit-example.toml](../configuration/examples.md).**Please take a moment to -read it. You need to change at least the server name.** +[conduwuit-example.toml](../configuration/examples.md). + +**Please take a moment to read the config. You need to change at least the server name.** RocksDB is the only supported database backend. @@ -76,9 +79,9 @@ sudo chown -R root:root /etc/conduwuit sudo chmod -R 755 /etc/conduwuit If you use the default database path you also need to run this: -```bash -sudo mkdir -p /var/lib/conduwuit/ sudo chown -R conduwuit:conduwuit -/var/lib/conduwuit/ sudo chmod 700 /var/lib/conduwuit/ +```bash +sudo mkdir -p /var/lib/conduwuit/ sudo chown -R conduwuit:conduwuit /var/lib/conduwuit/ +sudo chmod 700 /var/lib/conduwuit/ ``` ## Setting up the Reverse Proxy @@ -97,27 +100,34 @@ header, making federation non-functional. If using Apache, you need to use Create `/etc/caddy/conf.d/conduwuit_caddyfile` and enter this (substitute for your server name). -```caddy -your.server.name, your.server.name:8448 { # TCP reverse_proxy +```caddyfile +your.server.name, your.server.name:8448 { + # TCP reverse_proxy 127.0.0.1:6167 - # UNIX socket - #reverse_proxy unix//run/conduwuit/conduwuit.sock + # UNIX socket + #reverse_proxy unix//run/conduwuit/conduwuit.sock } ``` That's it! Just start and enable the service and you're set. -```bash sudo systemctl enable --now caddy ``` +```bash +sudo systemctl enable --now caddy +``` ## You're done Now you can start conduwuit with: -```bash sudo systemctl start conduwuit ``` +```bash +sudo systemctl start conduwuit +``` Set it to start automatically when your system boots with: -```bash sudo systemctl enable conduwuit ``` +```bash +sudo systemctl enable conduwuit +``` ## How do I know it works? @@ -127,10 +137,12 @@ homeserver and try to register. You can also use these commands as a quick health check (replace `your.server.name`). -```bash $ curl https://your.server.name/_conduwuit/server_version +```bash +curl https://your.server.name/_conduwuit/server_version -# If using port 8448 $ curl -https://your.server.name:8448/_conduwuit/server_version ``` +# If using port 8448 +curl https://your.server.name:8448/_conduwuit/server_version +``` - To check if your server can talk with other homeservers, you can use the [Matrix Federation Tester](https://federationtester.matrix.org/). If you can diff --git a/docs/deploying/nixos.md b/docs/deploying/nixos.md index 4a591315..271393bb 100644 --- a/docs/deploying/nixos.md +++ b/docs/deploying/nixos.md @@ -9,18 +9,21 @@ conduwuit can be acquired by [Lix][lix] from various places: A binary cache for conduwuit that the CI/CD publishes to is available at the following places (both are the same just different names): -``` https://attic.kennel.juneis.dog/conduit +``` +https://attic.kennel.juneis.dog/conduit conduit:eEKoUwlQGDdYmAI/Q/0slVlegqh/QmAvQd7HBSm21Wk= https://attic.kennel.juneis.dog/conduwuit -conduwuit:BbycGUgTISsltcmH0qNjFR9dbrQNYgdIAcmViSGoVTE= ``` +conduwuit:BbycGUgTISsltcmH0qNjFR9dbrQNYgdIAcmViSGoVTE= +``` The binary caches have been recreated recently due to attic issues. The old public keys were: -``` conduit:Isq8FGyEC6FOXH6nD+BOeAA+bKp6X6UIbupSlGEPuOg= - -conduwuit:lYPVh7o1hLu1idH4Xt2QHaRa49WRGSAqzcfFd94aOTw= ``` +``` +conduit:Isq8FGyEC6FOXH6nD+BOeAA+bKp6X6UIbupSlGEPuOg= +conduwuit:lYPVh7o1hLu1idH4Xt2QHaRa49WRGSAqzcfFd94aOTw= +``` If specifying a URL in your flake, please use the GitHub remote: `github:girlbossceo/conduwuit` diff --git a/docs/development.md b/docs/development.md index fbcfb433..eda9392a 100644 --- a/docs/development.md +++ b/docs/development.md @@ -38,9 +38,11 @@ disable the default `release_max_log_level` feature, and set the `--cfg tokio_unstable` flag to enable experimental tokio APIs. A build might look like this: -```bash RUSTFLAGS="--cfg tokio_unstable" cargo build \ --release \ ---no-default-features \ ---features=systemd,element_hacks,gzip_compression,brotli_compression,zstd_compression,tokio_console +```bash +RUSTFLAGS="--cfg tokio_unstable" cargo build \ + --release \ + --no-default-features \ + --features=systemd,element_hacks,gzip_compression,brotli_compression,zstd_compression,tokio_console ``` [1]: https://github.com/ruma/ruma/