diff --git a/docs/appservices.md b/docs/appservices.md index 8d646921..839001eb 100644 --- a/docs/appservices.md +++ b/docs/appservices.md @@ -18,7 +18,7 @@ First, go into the `#admins` room of your homeserver. The first person that registered on the homeserver automatically joins it. Then send a message into the room like this: - @conduit:your.server.name: register-appservice + !admin appservices register ``` paste the @@ -33,7 +33,7 @@ the room like this: You can confirm it worked by sending a message like this: `!admin appservices list` -The `@conduit` bot should answer with `Appservices (1): your-bridge` +The server bot should answer with `Appservices (1): your-bridge` Then you are done. conduwuit will send messages to the appservices and the appservice can send requests to the homeserver. You don't need to restart diff --git a/docs/conduwuit_coc.md b/docs/conduwuit_coc.md index 3a5b8777..2547e64f 100644 --- a/docs/conduwuit_coc.md +++ b/docs/conduwuit_coc.md @@ -1,6 +1,6 @@ -# Conduwuit Community Code of Conduct +# conduwuit Community Code of Conduct -Welcome to the conduwuit community! We’re excited to have you here. Conduwuit is a hard-fork of the Conduit homeserver, +Welcome to the conduwuit community! We’re excited to have you here. conduwuit is a hard-fork of the Conduit homeserver, aimed at making Matrix more accessible and inclusive for everyone. This space is dedicated to fostering a positive, supportive, and inclusive environment for everyone. This Code of @@ -39,7 +39,7 @@ additional guidelines specific to the conduwuit community. ## Matrix Community -This Code of Conduct applies to the entire [Conduwuit Matrix Space](https://matrix.to/#/#conduwuit-space:puppygock.gay) +This Code of Conduct applies to the entire [conduwuit Matrix Space](https://matrix.to/#/#conduwuit-space:puppygock.gay) and its rooms, including: ### [#conduwuit:puppygock.gay](https://matrix.to/#/#conduwuit:puppygock.gay) @@ -74,4 +74,4 @@ a DM to one of the moderators directly. Together, let’s build a community where everyone feels valued and respected. -- The Conduwuit Moderation Team +- The conduwuit Moderation Team diff --git a/docs/configuration.md b/docs/configuration.md index 6627c3b6..b0176c47 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -1,11 +1,32 @@ -# Example configuration +## Example configuration -``` toml +
+Example configuration + +```toml {{#include ../conduwuit-example.toml}} ``` -# Example systemd unit file +
+ +## Debian systemd unit file + +
+Debian systemd unit file ``` {{#include ../debian/conduwuit.service}} ``` + +
+ +## Arch Linux systemd unit file + +
+Arch Linux systemd unit file + +``` +{{#include ../arch/conduwuit.service}} +``` + +
diff --git a/docs/deploying.md b/docs/deploying.md index fecf7647..86277aba 100644 --- a/docs/deploying.md +++ b/docs/deploying.md @@ -1,3 +1,3 @@ # Deploying -This chapter describes various ways to deploy Conduwuit. +This chapter describes various ways to deploy conduwuit. diff --git a/docs/deploying/docker.md b/docs/deploying/docker.md index e6826768..e5e6a1f7 100644 --- a/docs/deploying/docker.md +++ b/docs/deploying/docker.md @@ -4,7 +4,6 @@ To run conduwuit with Docker you can either build the image yourself or pull it from a registry. - ### Use a registry OCI images for conduwuit are available in the registries listed below. @@ -24,14 +23,12 @@ OCI images for conduwuit are available in the registries listed below. [shield-latest]: https://img.shields.io/docker/image-size/girlbossceo/conduwuit/latest [shield-main]: https://img.shields.io/docker/image-size/girlbossceo/conduwuit/main - Use ```bash docker image pull ``` to pull it to your machine. - ### Run When you have the image you can simply run it with @@ -39,13 +36,9 @@ When you have the image you can simply run it with ```bash docker run -d -p 8448:6167 \ -v db:/var/lib/conduwuit/ \ - -e CONDUIT_SERVER_NAME="your.server.name" \ - -e CONDUIT_DATABASE_BACKEND="rocksdb" \ - -e CONDUIT_ALLOW_REGISTRATION=false \ - -e CONDUIT_ALLOW_FEDERATION=true \ - -e CONDUIT_MAX_REQUEST_SIZE="40000000" \ - -e CONDUIT_TRUSTED_SERVERS="[\"matrix.org\"]" \ - -e CONDUIT_LOG="warn,ruma_state_res=warn" \ + -e CONDUWUIT_SERVER_NAME="your.server.name" \ + -e CONDUWUIT_DATABASE_BACKEND="rocksdb" \ + -e CONDUWUIT_ALLOW_REGISTRATION=false \ --name conduit ``` diff --git a/docs/deploying/generic.md b/docs/deploying/generic.md index dc47f51b..31f61f6a 100644 --- a/docs/deploying/generic.md +++ b/docs/deploying/generic.md @@ -114,7 +114,7 @@ $ sudo systemctl enable conduwuit You can open [a Matrix client](https://matrix.org/ecosystem/clients), enter your homeserver and try to register. -You can also use these commands as a quick health check. +You can also use these commands as a quick health check (replace `your.server.name`). ```bash $ curl https://your.server.name/_conduwuit/server_version diff --git a/docs/deploying/nixos.md b/docs/deploying/nixos.md index 59f95900..d6fd3929 100644 --- a/docs/deploying/nixos.md +++ b/docs/deploying/nixos.md @@ -30,7 +30,7 @@ The `flake.nix` and `default.nix` do not (currently) provide a NixOS module, so (for now) [`services.matrix-conduit`][module] from Nixpkgs should be used to configure conduwuit. -If you want to run the latest code, you should get Conduwuit from the `flake.nix` +If you want to run the latest code, you should get conduwuit from the `flake.nix` or `default.nix` and set [`services.matrix-conduit.package`][package] appropriately. diff --git a/docs/development.md b/docs/development.md index 5bffa39b..fc177c8f 100644 --- a/docs/development.md +++ b/docs/development.md @@ -7,7 +7,7 @@ it, you can safely ignore this section. If you plan on contributing, see the ## Debugging with `tokio-console` [`tokio-console`][1] can be a useful tool for debugging and profiling. To make -a `tokio-console`-enabled build of Conduwuit, enable the `tokio_console` feature, +a `tokio-console`-enabled build of conduwuit, enable the `tokio_console` feature, 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: @@ -16,7 +16,7 @@ look like this: RUSTFLAGS="--cfg tokio_unstable" cargo build \ --release \ --no-default-features \ - --features=rocksdb,systemd,element_hacks,sentry_telemetry,gzip_compression,brotli_compression,zstd_compression,tokio_console + --features=rocksdb,systemd,element_hacks,gzip_compression,brotli_compression,zstd_compression,tokio_console ``` [1]: https://docs.rs/tokio-console/latest/tokio_console/ diff --git a/docs/introduction.md b/docs/introduction.md index 17d7e83f..6b1c35e3 100644 --- a/docs/introduction.md +++ b/docs/introduction.md @@ -1,4 +1,4 @@ -# Conduwuit +# conduwuit {{#include ../README.md:catchphrase}} @@ -12,7 +12,7 @@ See the [differences](differences.md) page - [Deployment options](deploying.md) -If you want to connect an Appservice to Conduwuit, take a look at the [appservices documentation](appservices.md). +If you want to connect an appservice to conduwuit, take a look at the [appservices documentation](appservices.md). #### How can I contribute? diff --git a/docs/maintenance.md b/docs/maintenance.md index 407340bf..0e61d675 100644 --- a/docs/maintenance.md +++ b/docs/maintenance.md @@ -41,7 +41,7 @@ To restore a backup from an online RocksDB backup: - create a new directory for merging together the data - in the online backup created, copy all `.sst` files in `$DATABASE_BACKUP_PATH/shared_checksum` to your new directory - trim all the strings so instead of `######_sxxxxxxxxx.sst`, it reads `######.sst`. A way of doing this with sed and bash is `for file in *.sst; do mv "$file" "$(echo "$file" | sed 's/_s.*/.sst/')"; done` -- copy all the files in `$DATABASE_BACKUP_PATH/1` to your new directory +- copy all the files in `$DATABASE_BACKUP_PATH/1` (or the latest backup number if you have multiple) to your new directory - set your `database_path` config option to your new directory, or replace your old one with the new one you crafted - start up conduwuit again and it should open as normal @@ -52,12 +52,12 @@ Backing up media is also just copying the `media/` directory from your database ## Media Media still needs various work, however conduwuit implements media deletion via: -- MXC URI +- MXC URI or Event ID (unencrypted and attempts to find the MXC URI in the event) - Delete list of MXC URIs -- Delete remote media in the past `N` seconds/minutes +- Delete remote media in the past `N` seconds/minutes via filesystem metadata on the file created time (`btime`) or file modified time (`mtime`) See the `!admin media` command for further information. All media in conduwuit is stored at `$DATABASE_DIR/media`. This will be configurable soon. If you are finding yourself needing extensive granular control over media, we recommend looking into [Matrix Media Repo](https://github.com/t2bot/matrix-media-repo). conduwuit intends to implement various utilities for media, but MMR is dedicated to extensive media management. -Built-in S3 support is also planned, but for now using a "S3 filesystem" on `media/` works. conduwuit also sends a `Cache-Control` header of 1 year and immutable for all media requests (download and thumbnail) to reduce unnecessary media requests from browsers. +Built-in S3 support is also planned, but for now using a "S3 filesystem" on `media/` works. conduwuit also sends a `Cache-Control` header of 1 year and immutable for all media requests (download and thumbnail) to reduce unnecessary media requests from browsers, reduce bandwidth usage, and reduce load. diff --git a/docs/troubleshooting.md b/docs/troubleshooting.md index 59ee32c7..9f817a68 100644 --- a/docs/troubleshooting.md +++ b/docs/troubleshooting.md @@ -16,7 +16,9 @@ Some filesystems may not like RocksDB using [Direct IO](https://github.com/faceb #### Database corruption -If your database is corrupted and is failing to start (e.g. checksum mismatch), it may be recoverable but careful steps must be taken, and there is no guarantee it may be recoverable. +If your database is corrupted *and* is failing to start (e.g. checksum mismatch), it may be recoverable but careful steps must be taken, and there is no guarantee it may be recoverable. + +The first thing that can be done is launching conduwuit with the `rocksdb_repair` config option set to true. This will tell RocksDB to attempt to repair itself at launch. If this does not work, disable the option and continue reading. RocksDB has the following recovery modes: diff --git a/docs/turn.md b/docs/turn.md index 3b143d80..7fc8a45a 100644 --- a/docs/turn.md +++ b/docs/turn.md @@ -13,21 +13,7 @@ realm= ``` A common way to generate a suitable alphanumeric secret key is by using `pwgen -s 64 1`. -These same values need to be set in conduwuit. You can either modify conduwuit.toml to include these lines: - -``` -turn_uris = ["turn:?transport=udp", "turn:?transport=tcp"] -turn_secret = "" -``` - -or append the following to the docker environment variables dependig on which configuration method you used earlier: - -```yml -CONDUIT_TURN_URIS: '["turn:?transport=udp", "turn:?transport=tcp"]' -CONDUIT_TURN_SECRET: "" -``` - -Restart conduwuit to apply these changes. +These same values need to be set in conduwuit. See the [example config](configuration.md) in the TURN section for configuring these and restart conduwuit after. ### Run Run the [Coturn](https://hub.docker.com/r/coturn/coturn) image using diff --git a/nix/pkgs/book/default.nix b/nix/pkgs/book/default.nix index 4745e432..cafd162f 100644 --- a/nix/pkgs/book/default.nix +++ b/nix/pkgs/book/default.nix @@ -18,6 +18,7 @@ stdenv.mkDerivation { "README.md" "debian/conduwuit.service" "debian/README.md" + "arch/conduwuit.service" "docs" "theme" ];